Tuesday, November 9, 2010

It's Alive!



Large version (opens in a new window)

It's alive! The blog, that is. After a long absence from the blogosphere (Ooh, how Web 2.0 of me!), the urge to program a wonderful little "do nothing" has overcome me. So here you have the very earliest skeleton of a virtual ecosystem. It's not much yet; mainly just little digital Roombas sucking up bits of "food" in order to survive.

At this point, we've got some slight randomization of body size (which determines how fast energy depletes), random move speed and turn times, and random lines of sight. I'm really hoping this turns into a fun little thriving ecosystem with births, species shifting, and a rudimentary idea of how natural selection works. That little countdown on each green harvester is how much energy it has left. The food replenishes itself every couple of seconds and it provides a random amount of energy to the harvesters based on size. You can click the blue "Add Harvester" button to throw another random harvester into the mix.

Inspiration came from a few things, but foremost in my mind is Larry Marder's "Beanworld", with its simple yet charming circle of life. Well, here's hoping this little nugget turns into something fun to watch!

Thursday, June 17, 2010

More Doodling...



Large version.

Hrm...

EDIT: How interesting! Originally the boxes were getting stuck halfway down the screen. They are meant to check if they're at the stage's height (though I did account for the height of the box). In this case, the stage is 600 px high. But the embedded .swf is resized to 400 x 300. The .swf seems to have gotten its bounds set as 400 x 300, but still saw half the .swf height as...300!? Bizarre! Easily fixed with hardcoding the y>600, though.

Sunday, June 13, 2010

Alternate Tribes



Full version.

Here's an alternate version of the Tribes piece. Different music, the tribe members now smile as they play louder, and an issue was fixed where if you grabbed a tribe member when it was in the center, it was possible to have him get "stuck" on your cursor. This was due to the fact that a shrinking tribe member could potentially get away from your mouse cursor. No contact with the cursor means no mouse release!

On a side note, I'm more than happy to make more alternate versions if people have suggestions or want to submit 8-16 track compositions (in .wav format if you please).

“What should young people do with their lives today? Many things, obviously. But the most daring thing is to create stable communities in which the terrible disease of loneliness can be cured.” - Kurt Vonnegut

Saturday, June 12, 2010

Tribes



Full version.

Well, I've been tweaking and tweaking this thing. Here's my first acceptable version of it. This is essentially a little piece influenced by some recent conversations I've had about music and and culture differences. The original idea was to have 4 "tribes" each playing a very definite style of music. On their own, they sound wonderful - but even as each tribe intermingles with other tribes, the music STILL sounds good! Now unfortunately, I'm at the mercy of Apple's built-in GarageBand loops as my own musical skills are, while existant, not up-to-par for a project like this. However, I do plan on revisiting this and tweaking the music. For now, though, enjoy the festive sounds of Latin Music!

Friday, June 4, 2010

Faux-3D Wire Sculptures



Large version.

CLICK FOR A NEW CONFIGURATION

Okay, I'm revisiting the curves again. Through a bit of an accident, I managed to create a faux-3D effect using some trig. What's going on is similar to the last curves expriment, only this time we're not randomizing the movement. Also, we're only moving points on the X-axis. Those points are moved by a sin of a steadily increasing number (.01 - interestingly, .1 created jittering line segments and .001 caused the figure to warp on the X-axis).


So WHY does it look 3D? I believe it has something to do with the sine wave having a pretty up close and personal relationship with the circle. Check this out for a graphic that illustrates this in 3D.

I also slapped on a minimal drop shadow to give the lines some depth.

Overall, I'm happy with this little mistake!

Thursday, June 3, 2010

Saxomophoooooone....saxomophooooone...



Large version.

I've been playing with the microphone. This is the "rough" version of what I want to do, and I expect the final to be quite different. So, enjoy! Make sure you have your microphone on - Otherwise, this would be rather boring...

What we're doing here is having Flash interface with a microphone connected to the computer - it listens at the framerate (in this case, 31 frames per second) for external sounds. If it detects anything, it reads back a value greater than 0. By the way, -1 seems to be an inactive microphone, 0 is detecting no sound, and 1-100 is the sound level detected.

Every frame, if we DO hear a sound, a circle is added to the stage which fades at a rapid rate, leaving a glowing impression on a BitmapData field. Adding a little more to it, louder sounds (which return larger activityLevel values) will generate larger circles. If the sound is over 1, we also swap out the color of the glows.

So enjoy! Remember - turn your mic on!

Monday, May 31, 2010

can't let that glow go



I am absolutely falling in love with the BitmapData glow!

If the above is running a little slow, check out the large version in its own window here.

OR

Download the .swf itself here.

If interactivity is more your thing, check out the clickable version here. The standalone .swf is here.

The reason I'm offering so many options is that yes, these ARE a little intensive on your computer. But when they flow smoothly, boy are they fun to watch...at least, I think so! Enjoy!

Saturday, May 29, 2010

I've been playing with curves...



Specifically, I've been playing with how to animate curves and keep them random but smooth. This here's my second version. The original is below. A little less trippy...or at least a different trippy.

OH, by the way. Click the above to change the color of the glow. Some glows are more powerful than others, so if you don't see much of a glow...click!



The bulk of this is done by connecting an array of points with Flash's curveTo function and then then slightly changing the curve values every frame. The top was made with a BitmapData field over the top to give that glow effect (see 2 posts ago). As for the non-glowing version, I simply told the curves to fill in with a color. Since the points are intersecting all sorts of wobbly angles, you'll have some "negative" areas that won't be filled in, generating a nifty little checkerboard effect.

UPDATE: Looking at this little project the day after the fact reminds me why I love doing this so much. I put a VERY slight offset in the curve points that are randomized. The curves work wonderfully to show how a small change can have a large impact. If the initial offset was too large, you'd see the curves jitter as they scramble to their new random point. With no offset, the curves would essentially loop indefinitely in the same pattern (I'm using sin to loop). This tiny tiny offset adds upon itself, so once through the sin period, it has altered ever so slightly. Given that there are....I think 50? points on each glob of curves, that winds making a whole new pattern EVERY time it cycles through! The odds of getting the same exact curve are next to nothing! Add to that the fact that there are really 3 individual continuous curve globs and you really won't see the same thing twice...fun!

Friday, May 28, 2010

Perlin Noise



Okay, so messing about with BitmapData inevitably led to learning about Perlin Noise. Named for Ken Perlin, a VFX fellow, it is used to procedurally generate textures in an organic way. I'm still trying to wrap my head around how exactly to use it, but the above is my first baby step into transforming a Perlin field...next step is to apply that field to something else!

Thursday, May 27, 2010

Sparklies!



No large version.

Okay, so thanks to this, I feel I've gained a little knowledge in the world of the BitmapData class in Flash. And good god...if you want some absolutely stunning effects, learn more about it! What we've got here is essentially a Bitmap (literally a...map of bits...) that is showing off its pixel data (naughty!). Since this data is now available to us, we can manipulate it however we'd like. In this case, we're putting a little glow and blur filters on it. HOWEVER...the Bitmap that we've drawn on the stage is a solid rectangle. So why does that glow appear inside this rectangle?

Enter the "draw" method of the BitmapData. See those little flickery particles? Those act as "holes" in the BitmapData. Every frame, Flash is redrawing that initial rectangle and taking a peek at what it looks like. If we have one of our particles over the rectangle, that rectangle isn't visible where the particle exists. So, as far as Flash is concerned there's nothing there. So we get a hole...a hole that can have a blur and glow filter applied to it! Nifty!

Tuesday, May 25, 2010

It's almost like a fortune cookie...



Large version - highly recommended.

Whee! Twitter API AWAY! I've spent a little while now trying to get an understanding of the Twitter API and integrating it with Flash. Turns out there are some nice resources out there on how to get it running, but the thing that gave me the most difficulty was learning how to deal with the incoming data (which is in the form of an Atom feed with the Search API).

So...enjoy!

Friday, May 21, 2010

Remember Populous?



Large.

Man, Populous was fun...

Anywho, what we have here is a fun little world-building tool in an isometric view. Simply grab your parcel of land, and drag up and down to bring it up or down. While that panel is highlighted, use keys 1-8 on your keyboard to swap out different types of land.

The wonderful thing about this, is how easy it is to change. I went with a Green Hill Zone from Sonic the Hedgehog for the design...because...well, it lent itself to it, I guess. Or maybe Sonic 3D Blast really got wedged deep into my brain.

Anyway, changing. If you want more land types, it's easy! I just need to draw it in an isometric view. No programming changes or anything. We could even adapt the programming to use multiple tilesets (say we allow the number keys to now change the FAMILY of tile, and repeated presses will cycle through different panels of that family).

So, have fun. Build things!

Tuesday, May 18, 2010

Glowy Things



Large version.

Here's another "gotta make something" post. I'm actually pretty happy with the ethereal feel of it. Sort of ghostly, but not necessarily spooky. There are two elements at play here.

1). Glow Filter. I talked about filters in the last post. This is just adding a glow filter via actionscript. I'm adjusting the strength of the glow with the second important element of this .swf.

2). We're using TRIGONOMETRY again! Now, there are several ways to get the pulsing glow effect, but I thought about it...and...the sine wave came to my aid! If you're familiar with the sine wave, you know that it oscillates from a crest to a trough and continues this (think of a REALLY sloppy sideways "S" - that's pretty much a sine wave). Each of these full runs is called a period. So we have a curve that goes from n to 0 to -n and back to 0. Handy for a repetitive movement! I'm essentially feeding sin an increasing number (representing the x axis - in other words, we're moving RIGHT along the wave) and it's spitting back a stream of numbers that go uuuuuuup and back doooooooown and back uuuuuuup until we all vomit, we're so dang full of numbers! Er. Or something. So our glow strength is going from 10 to -10 and back again. Since a negative strength on a glow makes the glow invisible...well...we don't see it.

OH, almost forgot two little things. The spat out number (the ups and downs) are amplified by 10 to get a strong glow effect. We're upping the amplitude of the sine wave! Joy of joys! The other little thing...when the glow is negative, I'm having some fun making the origin points of the glows jump around randomly in the dark. Creepy little buggers!

NOTE: One last thing, I swear. As each origin point is created, it also randomizes the QUALITY of the glow. That's why you sometimes see nice round glows, and other times you'll see more squared off glows. In this case, I wouldn't say there's a difference in quality. Just different effects.

Monday, May 17, 2010

Playing with Light



Large.

You probably know how nifty Flash's built-in filters are. Dropshadows, glows, bevels, oh my! BUT, rather than activating these filters with the properties panel in Flash, why not take a peek under the hood and tweak them?

That's exactly what's going on up there. You see, each of those above green shapes is constantly redrawing its shadow relative to the yellow light source. It's actually a pretty easy technique to use, and it's a handy tool for faking light sources in your games and animations.

To actually use a filter in Flash, you'll first need to import it (import flash.filters.* where * is a wildcard OR the name of the specific filter you want). From there, you can just set up a var placeholder for the filter. Something like:

var myFilter;

Then we'll set that "myFilter" to a the filter we want. So...

myFilter = new DropShadowFilter(1,45,0,1,4,4,1,1,false,false,false);

What's up with all those numbers after the DropShadowFilter? Well, those are what we call arguments, and those are the specific parameters of the dropshadow. Flash has a nice built-in assistance tool that will fill you in on what each is. The ones I specifically messed with for the above .swf are the first two (1 and 45, the distance of the shadow and angle of the shadow, respectively).

Now at this point, it's important to note that the myFilter = new DropShadowFilter line is in the ENTER_FRAME of my movie clip - things will be changing, and I want to check for those changes every frame.

Let's take a look at MY version of the above line...
myFilter = new DropShadowFilter(distance*.05,newAngle,0,1,4,4,1,1,false,false,false);

The difference, of course, are the first two values. Those don't mean much without the backing code, so...
diffX = x - LightSource.main.newLight.x;
diffY = y - LightSource.main.newLight.y;
var distance = Math.sqrt(diffX * diffX + diffY * diffY);
newAngle = Math.atan2(diffY,diffX) * 180 / Math.PI;


What's going on? Well, we're first figuring the distance between the green object and the light source (subtract the light source's position from the green object's position for both axes). With our good buddy Pythagoras, we know the distance between two points is equal to the square root of the difference on each axis squared. Uh...C = the square root of A^2+B^2. Trust me. 


So there's the distance of the dropshadow! Note that I multiplied it by .05. That's because I wanted to keep the shadow from getting too crazy long. 


Now the meat - the ANGLE - of the dropshadow. The line starting with newAngle is where the magic happens. Using some trigonometric witchcraft known as the arctangent, Flash can calculate the angle between two objects. We just need the difference in positions (already got that, remember? diffX and diffY). And since Flash sees fit to deal with trig in radians, but rotation in DEGREES, we need to convert it. Easily done. Just multiply by 180/pi. Huzzah! Trig!

Saturday, May 15, 2010

Rainbow Rain



Large version.

I'm not really sure what's up with this one. I've been a little dry in the creative area lately, so I wanted to just make SOMETHING...so, enjoy Rainbow Rain!

On a side note, my homepage is now up and running! Let me know what you think.

Monday, May 3, 2010

Hooray!



Large version here.

And if you're interested, here's the project in AIR form.

Why is this post entitled "Hooray!"? Well, because every little box that goes across your screen is a potential party! Click at the right time to smash through the colored boxes. Now, you may notice your confetti enlarges based on how many boxes you take out in one swipe - more smashes at once equals more party!

So...enjoy this! It's been sitting around my drive for a while in one form or another.

Monday, April 26, 2010

Menu 2 - A little more useful!



Here's the second menu in large form.

This might have a little more purpose. Imagine a contractor wants to offer his or her services, but wants to give potential clients an estimate on the type of work he or she does. Bingo! Done! This would also be useful for just about any shop that sells a variety of items...or any site that wants to show options of any sort, for that matter. Heck, a character artist could show off their creations in a gallery format!

Oh, and it's fairly dynamic - if you want to add another item, it's about a 30-second process (not counting whatever content you add to the panel at right). Yay expandability!

Menus! Menus! God, how I love menus!



Large version here.

Here is the first of two little menus I whipped up. I realized that this "does nothing" stuff is a lot of fun, but creating something that serves a purpose has its place, too! And so, here you go...

This one is a hypothetical color preview panel. It's not completely useful, but it would have its applications, I suppose. It needs just a few little extras to make it really useful. It wouldn't be a huge stretch to calculate the complementary color for the selected tile to show a little color palette. Anyway, enjoy!

If you didn't figure it out, you can roll over the colors to see them in the large panel. Click the "More" button to slide in a random assortment of new colors!

Saturday, April 10, 2010

GloBounce

Hi there! Since I am delighting in being retarded and not being able to figure out the issue with embedding my .swf into a blog post, you can find the second iteration of the GloBounce here.

If you'd rather have a direct .swf download, you can find that here. Make sure you open that in dedicated Flash player, not just a web browser.

This isn't quite complete, and I may decide to go in a completely different direction with it. For now, though, you can influence the white bouncer's movement based on your mouse position. The bouncer only changes direction when he bounces, so you'll need to plan your movements! The further the mouse is from the bouncer at the time of the bounce, the higher the movement influence. You also control his bounce height this way.

At any time in the air, you can click to initiate a mini-bounce. You can only do this 10 times in the air. Once you hit the floor, your jumps are replenished (man, I should put a meter in there...).

Finally, the point of it - see those white circles? See how many of those you can smack before touching the floor! Some day, I might even have proper scoring in there!

Hope you enjoy.

Thursday, April 8, 2010

Bouncin' Along...

If you're interested in seeing the next little experiment in progress, check it out here!

I'd recommend right-clicking and hitting "save as" to ensure that it displays in the proper bounds.

Wednesday, March 31, 2010

Bonus Post! Collatz Conjecture



I definitely suggest you look at the large version.

Actionscript, of course, is a programming language. And one thing computers and programming languages do much more efficiently than humans is...well...compute! We can use this to our advantage and help display very complex math problems nearly instantly. Flash is a wonderful tool to use in eLearning in that the behind-the-scenes number crunching can easily be reflected graphically.

In this case, I stumbled upon something called the Collatz Conjecture. It's a conjecture that basically says that if you start with an integer, you check to see if it's even or odd. If it's even, divide by 2. If it's odd, multiply it by 3 and add 1. Repeat that over and over, and you will ALWAYS wind up with a value of 1.

With larger numbers, this process could take quite a while...so...enter Flash! Simply type in a number you want to check (I've limited it to 8 digits) and click "Go!" to quickly see the resulting path to 1.

Dynamically Shifting Menu UPDATED



Large version.

Okay, as promised...I've updated this. I was considering making the image loading dynamic, but I kept running into little pitfalls. Nothing a little more time couldn't have solved, but there are already plenty of fantastic external image loaders out there!

Anywho, I've updated this into a photo gallery with a dynamically sized frame to house the images. To preserve the rounded corners' proportions, I enabled 9-slice scaling guides on the movie clip. If you're not aware of it, next time you create a movie clip, look for the little check box titled "Enable Guides for 9-Slice Scaling. When you go in to modify your movie clip, you'll see some dashed lines that are draggable. Whatever is inside of those guides will scale like you'd expect, but the four corners outside of the guides will NOT! Pretty fantastic when you're enlarging rounded curves, especially if the scaling is not proportionate.

Monday, March 29, 2010

Dynamically Shifting Menu



Large version.

This is the first of a two-stage little doodle I put together. At this point, it is just a grid of menu items that reacts to whatever button you've rolled over. It was a nice little exercise in two-dimensional arrays. Nothing too crazy, but pretty useful for adding a little life to an otherwise ordinary field of buttons. Keep in mind that you can adjust anything about these buttons with the same basic code. You can shift the alpha, the color overlays, size...whatever your little heart desires!

The next step is to turn this into a dynamically loading photo gallery. Why? Why not?

Stay tuned for part 2 in the coming days!

EDIT: Fixed the little odd rollOver issue.

Sunday, March 28, 2010

Coming Along...



It's been a little while! Here we have some progress on the BubBomb game shown in the past couple of posts.

What's new?
Well, there's a new scoring mechanism in place that allows for chaining of pops. In other words, if you pop captured enemies in rapid succession without firing off another bubble, your score stacks!
You'll notice a few new visual features, such as a living background, start button, and score feedback messages.
Powerups are in! Well...sort of. Every so often, you'll see a gold enemy. Pop them to release a powerup into the field. Capture and pop the powerup and you'll get....NOTHING! I've not actually put in powerups yet, just a placeholder item. So as of now, powerups don't do squat. Some potential ideas are modifying your bubbles' behavior or offering a bonus multiplier on your chain pops. Any other suggestions?

Finally, and this is a minor fix, I had noticed an occasional bug that occurred when capturing an enemy too close to the edge of the stage. That seems to have been fixed, but be sure to let me know if it happens again!

That's it for now. Keep it funky!

Monday, March 15, 2010

I'm starting to think I have a thing for bubbles...



Large version here.

Alright! As you saw from the last post, I've adapted the bubble catching turret game into another game style. Here you have a free-flying ship controlled with your mouse. Click and hold to drop off a bubble mine, and release to detonate it. Any enemy (represented by gray dots) caught in the expanding bubble will be considered "captured". Once you've got a nice run of them captured, ram them with your spiky body to pop them into oblivion!

Be careful, though...you can catch yourself in your own bubbles! Make sure you're a safe distance away before you detonate or else you'll wind up losing precious seconds...

Note that this is a work in progress, and due to that, we're in a sort of free play mode. You have unlimited ammo, no real goal, and no real way to lose. So have fun and get a feel for it! I plan to turn this into a full-fledged game with multiple enemy types (maybe some will require multiple hits before they're captured...), maybe some powerups, and who knows what else?

Comments are always appreciated.

Wednesday, March 10, 2010

Things are brewing...

Nope, I've not forgotten about the blog!

For the longest time, I was having issues trying to decide what to work on. So, as I often do, I revisited my old experiments and projects. I've decided to update/reimagine something I created nearly a year ago. You can see a very very rough version of it here.

Gameplay-wise, it will be quite different from the bubble turret I've been showing, but it will share some elements with it.

Stay tuned! I hope to have a little more into it within the next couple of days.

Tuesday, March 2, 2010

Bubbles, pt.2



Large version.

Well, the bubble catching game has been updated a bit. What's new in this version?
1) The enemy catching thing is pretty much completed. Now you can catch enemies in bubbles, and once they are caught, they can be successfully eliminated by hitting them with a regular bullet.
2) Powerups! I have the powerup generation in overdrive right now, but you'll notice these black and white logos sliding by. Hit them with a bullet (NOT an exploding bubble!) to activate a powerup. There are 3 - larger bullets, tri-shot, and rapid fire.

I think that's about it for now! Upcoming will be multiple enemy types, maybe alternate types of bullets, and...well...an objective!

Enjoy!

Sunday, February 28, 2010

Not much to say...



Large version here.

Not really much to say here. Slider controls bpm, etc. etc.

I don't know if the bpm is completely accurate.

The plan is to use the growing bars in a better experiment. Soon.

Tuesday, February 23, 2010

Sorry for the Delay!

Hello, I've been taking it just a bit easy on the blog posts in preparation for setting up my personal homepage.

It's nothing much now, but consider that domain PARKED!

Sunday, February 21, 2010

Bubble Trappings (WIP)



Large Version.

Keep in mind, this is a WIP! I'm giving you guys a sneak-peek at a little game I've been whipping up. Here you can see the initial bubble cannon aiming, firing, and detonating. Hit tests are all in, and the next step is to make the trapped enemies catchable. There are some other things to do, but this should be wrapped up in the next few days!

Let me know if you have any immediate observations or suggestions. Thanks for reading!

Saturday, February 20, 2010

Wind Redux...Redux...



Large version.

Source.

I have decided to go back to an old project and rewrite it in AS3. I've probably not 100% optimized this to the point that it COULD be, but I just wanted to see how difficult it would be to convert something from AS2 to AS3. Turns out, not too hard! Though I do have to say that dealing with dynamic text is a bit more involved than in AS2. Gone are the days of just dropping in a dynamic text field and saying "go!". Ah well...

I've not yet added the little tag that pops up the beads, but that probably wouldn't be too crazy to do. Just add a text field to the Bead class that ties in to the ID.

I tried to add a blur filter to faster moving beads, and it was working well. HOWEVER, I ran into some really odd behavior when it came to blurred objects and rollOvers. If a blurred object was rolled over just on the edge, it would spaz out and jump between being considered rolled over, and being rolled out of. I'm not sure what the deal with that is! So...no blur! Of course, if we threw out the idea of rolling over, then we could dump the blur in. VERY easy and very nifty!

I've provided the source at the request of mikeland.us.

Wednesday, February 17, 2010

I Feel I Have Arrived...



Large version here.

Phew. I'm feeling pretty good. Why is that? Because the above is my first thing ActionScript 3 that I can say I'm pretty happy with! That's right! I have made great strides in AS3 tonight!

I'm all giddy with the possibilities...

As for the coding itself, there's nothing too awfully insane here. We've got a ship that follows the mouse cursor loosely; it does this by moving the distance between itself and the mouse times a fraction of the distance every frame. In other words, if it's 50 pixels from the mouse and we've moving with .5 drag, it will move 25 pixels, then 12.5 pixels, then 6.25 pixels, etc. etc. until it reaches 0.

The bomb is simply a class that initializes with a movement speed on the y axis of -10. Instantly and in every frame, that movement speed increases by .5, giving the illusion of acceleration.

Once the bomb hits, it is removed from the stage and replaced by a shape tweened circle. I manually animated the growth via timeline, but it would be very possible to do so with straight code. That little rainbow flourish you see as the explosion fades is just me playing with code tweens and the ColorTransform object. I simply tween the ColorTransform from a random color to another random color.

There you have it! AS3...I'm warming up to you!

PS:I found this tutorial to be incredibly helpful in learning to get classes to speak to one another. Be sure to download the AS3 source code. Interestingly enough, I had my "a-ha moment" with the AS2 version of this tutorial...hmm...they must be doing something right!

Monday, February 15, 2010

8 Points



Large version.

This is an offshoot of something I was trying to which was, actually, radically different. Originally, I meant to create grid of dots that would react to your mouse position. In a way of testing when a dot was near enough to the mouse cursor, I had a line tracing between the mouse and dot. Quickly moving around, I noticed you got some nifty little patterns going.

And so, this was born. I had to drastically cut down the number of dots, as the original number (about 80, I think) caused a lot of slowdown.

I could see a simpler version (say just 4 dots/lines) being a nifty little way to add a bit of interest to a simple menu.

UPDATE: I noticed that eventually, this would get draggier and draggier...this was because I wasn't actually able to clear out an array that contained all of the lines. As a quick fix, I set the array to reset every 10 seconds, SO if you see all the lines suddenly blink out of existence, that's what you're seeing.

Sunday, February 14, 2010

The Colors!



Large version.

This is a result of me learning a bit about adjusting the color of a movie clip via actionscript. It was surprisingly very easy! Here's a quick trimmed down version of it. Keep in mind, this is contained within the onLoad function of a the colored panel's Class file.

var colorful = new Color(this);
var colorTransform = new Object();
colorful.setRGB(0x003366);
colorTransform = {ra:Math.random() * 100, rb:'0', ga:Math.random() * 100, gb:'0', ba:Math.random() * 100, bb:'0', aa:'100', ab:'100'};
colorful.setTransform(colorTransform);


The first line sets up a Color object and assigns it "this", or whatever movie clip you want it to adhere to. After that, we create an Object called "colorTransform" which will contain all the information for the actual color transformation. That information includes, as you can see, a long list of parameters such as "ra" and "ba". It seems like a long list, but there are essentially two types of parameters that relate to the red channel, green channel, blue channel, and alpha channel. The three I'm dealing with here are the ra, ga, and ba parameters which is a number from -100 to 100 and controls the percentage of that parameter's color. So, something like ra:100, ga:50, and ba:50 would yield a pinkish color.

Once we've set up what the colorTransform IS, we simply set it to our original Color object. Simple, eh? You can experiment a ton with it and even set up color tweens with this.

Bonus! You can use this on photos, too! Just be sure to set the imported picture to be cached as a Bitmap and the above code will work on it.

Enjoy!

Wednesday, February 10, 2010

Silver - the Musical

Hey everybody, I just finished up helping a buddy put together a site for his upcoming project.

It's called Silver, a musical based on Robert Louis Stevenson's Treasure Island. Check it out!

Sunday, February 7, 2010

Bing!



Large version here.

This little guy started out life as a simple sorting experiment. Originally, the falling discs would pass through the flashing white "sensor" and be sent to a different column based on their color and type. Once that was out of the way, I decided to add a few more things. For one thing, why not give the user some feedback when a disc leaves the stage? The version just prior to this one had no user interactivity; you just watched the discs falling and they'd "bing" as they left the stage. Due to the random nature of their spawning, it produced some nifty little melodies. Never anything TOO intricate (we are just dealing with 4 notes here...), but enough to be amusing.

Though I was rather pleased with the non-interactive version, I wanted to let the user feel like they were having an effect on the little Bing World. So, I slapped in an Breakout-style paddle that let the user keep a disc from being instantly removed. Next came some wrestling in my mind. Do I want the user to just influence what happens? OR do I want the user to CREATE what happens? In other words, should sounds come only if a user does something, or should the sound ALWAYS happen - the user just redirects it? In the end, I decided to let the user create the sounds, so a disc won't bing unless it has been first been hit by the user's paddle.

What do you think? Would you like to see sound happen even without user input? Or is it a better feeling knowing that, in a way, you created a quasi-composition?

And another thing...are the sounds too annoying? If anybody has any ideas on different sounds, let me know (or better yet, send them to me in .mp3 format - if it's nifty enough, I'll put it up here!).

Anywho, take care everybody. And enjoy.

Thursday, February 4, 2010

Updated Embers

Hello, just letting you all know that the source code for an updated version of the previous Embers.swf is now available on My Media House.

Enjoy! By the way, exporting as an .html and setting it as your desktop wallpaper gives a little life to your desktop. Just...be careful not to overdo it.

Monday, February 1, 2010

Since the last one did too much...



Large Version Recommended.

In a departure from the previous project, I whipped up something that's just fun to look at. When the .swf loads, you'll get 4 little orbs of light that fly around randomly, leaving a trail of glowing embers. You can hit one with your mouse to cause it to pause and grow a bit. Clicking will produce a brand new one.

So nothing TOO crazy here, but each ember's flight path is based off its previous position. Every frame, the ember looks at its current move speed and then varies its vector by a small degree (between -.5 and .5, which when added 31 times per second really adds up!) In other words, you get generally smooth arcs instead of rapid sudden changes in movement. If you wanted to produce a slower, lazier arc, you'd just put a bit of a delay in the change in position. Maybe have it adjust its flight path every 15 frames instead of every single frame.

So, enjoy and gaze a bit!

Saturday, January 30, 2010

Links

No real blog update at this moment, but I wanted to bring your attention to a new section to the right of the blog. I've added a spot reserved for links to other sites that are of interest to me. The first is a link to My Media House, a site that's just getting revved up. Right now there's a nice batch of FREE stock files including a few photos and Flash files. Expect this site to grow in content in the near future! I plan to be contributing to this site often.

Also added is a link to Oxygen Education, my current place of employment. For those interested in how Flash is applicable to an educational setting, take a look! Or take a look if you just like really nifty-looking interactive programs based in Flash.

Well that's it for the moment!

Wednesday, January 27, 2010

Wahoolazuma!



Big version here.

I'd heavily recommend downloading the .swf and running it from your local machine, but through a web browser is fine, too.

First off, let me say this game was inspired by Larry Marder's Beanworld. If you've not checked it out, it's definitely a fun read! Equal parts quirk, wonderment, and charm, it makes a great gift for just about anybody!

In Beanworld, the behaviors and lifestyle of the native beans are explored. Though it seems to be a pretty contained system that makes some sense, the nature of the beans is a simple one, often left to the imagination. In other words, a wonderful source of inspiration for fun little mini-games!

In case you're wondering the story behind the above game...well...go read Beanworld yourself!

By the way, this is a simple, rough version. If I were to create a game for anything other than my own personal learning experience, there are a few things I'd change. Any suggestions? I just might touch something up if you demand it!

EDIT: So it seems you can't score any points UNTIL you get a multiplier. I'll fix that up...soonish.

Saturday, January 23, 2010

And I'm back...flowers in hand. Er...screen.



Big 'un here.

Yikes...it has been nearly a week since my last update! I can't let this happen again...

Anyway, the above is the result of a quick little experiment. The instructions, should you want to know what you're doing before you're doing it, are as follows:
The white flower is considered the "active" flower.
Click any segment of the active flower to spawn a new flower in that segment's direction.
You can also use your arrow keys to spawn a new flower.
Click the purple diamond to send out a tracer that traces the history of the buds.
Click the purple circle to clear the field of flowers.
The green slider lets you move the field around, so you can construct flowers even outside of the window!

That's it for now! I've been touching up the slingshot, and I've also been putting together a couple of mini-games for work. If I can, I'll post those games so you can see what it is that I do.

Speaking of work, we've just rolled out our new website!

Take a look!

Saturday, January 16, 2010

Gotcha!



Large version.

I lied! Here's an update to the slingshot. I've got a decent idea of where I want this headed now, so I plan to get it polished up in the next few days!

The biggest addition here is the addition of the capturing bubble that seeks out berries that have fallen. Once it "sees" one, it rushes to it and grabs it. With berry in tow, it returns it to the center of the screen, drops it off, and a new berry spawns. This will be a huge element in the final product.

Wednesday, January 13, 2010

Slingshot pt. 2

Well, today has been quite the day. Little annoyances have plagued me throughout the day. I'm sure we've all been assaulted by the terrible images coming in from Haiti. All of my little issues seem so small compared to what they are going through down there. I encourage you to send good thoughts (or better yet, a little spare cash) down south. Our local Fox affiliate has a nice collection of links you can find here.

Right-o, then.



Large version.

As you can see, I've made some progress in this slingshot app. I have an idea of what I plan to do with this, but it might not be fully realized for a short while yet.

Monday, January 11, 2010

Slingshot (WIP)



Large version.

I'm not completely done with this one yet, but I did want to upload my progress so far. To fire off a shot, click and hold one of the two yellow dots. Drag back, and release it to fire! You can pack a lot of energy into a shot, so if you pull back too far, you'll likely send it flying insanely fast off the screen.

I'll be touching this up and doing a little more with it in the next few days.

Saturday, January 9, 2010

Wind Redux!



Large version.

I decided to go back to the .swf from a couple of posts ago and add a few features. I think that this really shows how this could be formed into a useful application.

Controls are the same, but now rolling over any of the particles with your mouse allows you to see a few scraps of data from it, including:

  • the ID (based on when it is added to the stage)
  • the type (in this case, based on the color)
  • the weight (which determines size and speed)
  • the speed on each axis at which the particle is moving

Thursday, January 7, 2010

Letter Scramble (WIP)



Large version.

Okay, this project is not quite 100% finished, but I'm not sure what else I'm going to do with it.

Not much to say about it. Type something in the white field and then click the grey INPUT button. Once the button is clicked, whatever is in the text field is split up using Flash's .split() ability. Each letter is sent into an array in order. From there, a movie clip is added for each letter. This movie clip has a target letter which is what we want the movie clip to ultimately display.

The randomization is achieved by having an array of possible letters (a-z, and A-Z). Every 2 frames, the text field is filled with a random letter from the array until this swap has happened a set number of times (25*letter position+10). When the set number has been reached, BAM! The field is then filled in with that target letter from earlier.

I plan to flesh this out and maybe even use it in a useful way in the future, so if you have any suggestions, let me know!

EDIT: Linda asked about having all of the letters stop at the same time. Here's a .fla file that contains the code that does that.

Wednesday, January 6, 2010

Any way the wind blows...



Click and drag the green gem on the above .swf.

Large version here.

I was going to post something about randomizing text with input fields, but this little guy popped into my head on the drive home from work. At my place of work, Oxygen Education, I recently helped a co-worker develop a wind turbine simulator. It was fairly simple, where the _rotation property of a movie clip changed based on where a specific draggable movie clip was.

Well, I decided to take this concept a step further and control an entire ARRAY of movie clips with it. And I thought to myself, I thought "Well, why not allow movement in all directions?"

And so I did. A simple for loop adds the bead movie clips to the stage at random positions. As they are added, an empty variable called "weight" is filled in (which I've set as a number from 1-10). The weight adjusts how large the object is, and also has an effect on the movement speed. You'll notice the larger, and therefore "heavier", beads move a bit slowly. This is accomplished by setting the movement rate to a number multiplied by a decimal (determined by the weight).

So there you have it! Another useless, yet fun to watch, Flash experiment!

Monday, January 4, 2010

Placeholder

Okay, I really don't have anything for you guys today. I have SOME things I could post, but not really the time tonight to fully explain them. So...enjoy this hastily-scrawled vector turtle thingum I found sitting in my "Doodles" folder.

Sunday, January 3, 2010

Tilepalooza



Large version here.

I'm really not sure what to DO with this yet, but I felt I'd share it anyhow. Seems like it's not a bad idea to try and keep posting a Flash working every day or two. Any ideas anybody? It almost seems like a nice start to a puzzle game or a fun little password system.

Saturday, January 2, 2010

Mockery

A week or so ago, I was helping out a buddy Jake Mansfield with setting up the coding basics of his personal website. He essentially wanted the site to act like a desktop, with draggable icons and such. So, taking the little bits of code I used from that, I decided to whip this up last night.



Large version here.

No real content of worth on it, but you could definitely use this as a starting point for an actual website! In fact, I just may do that...

Friday, January 1, 2010

Capstone 2009



Well, a new year is upon us. And just about a month ago, I presented my final Capstone project at the 2009 MAS Capstone event at IUPUI.

This requires a larger space than I have available on this blog, so here's a link to the large version. And here's a link to the local version all zipped up nice and tidy for you to see on your local computer (running the .swf in a standalone Flash player is MUCH faster than through a web browser). You can run each .swf individually in the local version, but the main interface is titled "container_cursor.swf".

For now, just play around with it and let me know what you think! In the next few posts, I'll focus on each individual aspect of the project. I'd be happy to answer any questions and share with readers some of the source code.