ActionScripting 2.0
Ah! A day that didn't centrally revolve around boxes. Bliss.
Christine had to work today, so I was all alone in the house today. I won;t lie, I spent an hour or so this morning on YTMND, but most of the sites were pretty crappy today. There's nothing there I would recommend that you go and check out - oh, actually, there is an old one on the top of the Top Viewed list today. I have a problem with it, but it has a theme relevant to the usual theme of this blog:
Do you see the clever gaming reference? If you don't see it just watch the YTMND for a few seconds and the music will probably fire off a few gaming-related synapses and give you the "Aha!" moment you're looking for.
My only problem with this is that the user didn't actually make any of the pieces he used to create this YTMND. He simply took a picture from Threadless - a very cool website for T-shirts - and added two bits of audio from other YTMNDs. So he actually produced nothing. However, he did combine them all into the final product - so is that worth a high average rating and over 100,000 views? I'm still undecided. I'm leaning towards no.
Regardless of how I feel, someone over at Kotaku thought it was a cool YTMND and decided to link it to the front page. This site has now received 35,000+ views in the last two days. Damn. All I need to do is make a videogame- related YTMND and I'll be set.
Fun With Flash - Lights, Camera, ActionScript!
The majority of my day has been spent learning about ActionScript. Our team found an excellent tutorial on how to make a side-scrolling game, so I've been reading the ActionScript for it, trying to wrap my head around it. I like to comment out lines of code and then run the project to see what changes - it helps me to understand more directly how each piece of code affects the game.
The code is really quite clever. It builds a level by breaking the screen up into blocks. In this case, there are 15 rows of 25 blocks on the screen. In the code, a set of 15 arrays is created, each holding 25 values. Depending on the value in each array position, a certain kind of block is placed in the level - maybe a wall, a floor, a ladder, or a trap. The code also handles the movement and behavior for the player's avatar. A number of variables are created that handle its walking speed, climbing speed, and jumping power. I had fun changing the values and watching the character suddenly be able to jump and touch the ceiling or inexplicably find himself unable to turn left.
The only problem I'm having is that there doesn't seem to be any variable types explicitly declared, so it makes the code a little harder to read. Keywords, however, are helpfully highlighted in blue, which makes it easier to know what to lookup.
What we need to do this week is add some moving enemies into the mix. We also need to implement some kind of attack for our hero and give him a health meter. Brandon seems pretty comfortable with Actionscript already, and I'm sure Emily spent all weekend studying and using Flash. Didn't you, Emily?
Christine should be home soon. I think I'll play a little Fallout before she comes home, because I know tonight will bring more boxes to unpack with it.