theARTboy
where art meets design
Categories: flash, games | Add a Comment

Matching games are a great way to learn about using arrays. I have worked with a number of ways to build the game logic for creating matching games over the years. I found an example of how to construct one in an article by Emaneule Feronato. The challenge that I wanted to explore was how […]

Categories: flash | Add a Comment

You can download the files buildingDuckHunt here. File 0 contains the artwork. File 1 starts adds the duck to the stage with ActionScript. [as3] //imports import flash.display.MovieClip; //variables var duck:MovieClip=new Duck(); addChild(duck); duck.x=stage.stageWidth*0.5; duck.y=stage.stageHeight*0.5; //functions [/as3] File 2 adds the remainder of the artwork to the stage. [as3] //imports import flash.display.MovieClip; //variables var duck:MovieClip; var […]

Categories: flash | Add a Comment

This started as a basic platform style game mechanic. I then worked to make the background scroll as the character reached near the edges. It became apparent that something needed to happen when the character hit the ground. In the interest of simplicity, I didn’t make a separate particles class, which would make cleaner code. […]

Categories: flash | Add a Comment

In my continued quest to understand the use of vectors I have put together this little game that has some of the rocket thrust fun of the trendy iPhone game Jetpack. I wasn’t planning on doing it as such, but after watching the animation generated, I realized it had a similar feel. All I was […]

Categories: flash | Add a Comment

I was looking how to work a boids demo in AS3. I found a great example with all the bells and whistles on soulwire but it was doing more than I wanted for the beginning. I dialed my designs back to focus on steering and not all the flocking stuff just yet. Revisiting my book, […]

Categories: flash | Add a Comment

I have been reading about generative art and building projects inspired by the Game of Life. After demonstrating it for my students, one expressed interest in combining it into his project so that left me inspired to work the code into a different form. Using the fantastic post about this topic by Justin Windle, I […]

Categories: flash, games | Add a Comment

Sometimes you just want somebody to chase you. [as3] private function ai():void { //calc dist var tempDist=Math.sqrt(Math.pow(player.x-enemy.x,2)+Math.pow(player.y-enemy.y,2)); //trace(tempDist); if(tempDist<150) { enemy.rotation=Math.atan2((player.y-enemy.y),(player.x-enemy.x))/Math.PI*180; //calc h or v move if(Math.abs(player.x-enemy.x)>Math.abs(player.y-enemy.y)) { //move toward player on x axis first if(player.x>enemy.x) { //player is to the right of enemy enemy.x+=2; } else { //player is to the left of enemy […]

Categories: flash, games | Add a Comment

Welcome to theArtboy. Visit my unicorn or scream games.