Wednesday, March 9, 2011

Flash Games

Hey everyone. Welcome to the newly design Workshop! I was tired of my videos and flash content being shrunk to fit that tiny column, so I found a better, wider design. hope you like it!

So, not much happening with artwork, huh?

Well, I haven't been completely idle, and I have a couple of VERY simple flash games to present. I made these in an effort to improve my understanding of Actionscript 3, which is the programming language for flash content. These taught me a great deal about event handling, classes, and game architecture.

The first is the classic Tic Tac Toe. Sorry, but there's no AI to play against just yet. I will probably try and tackle that at some later date.



This game took 185 lines of code to create. For a game, I'm sure that's very few, but I found it interesting that something as simple as Tic Tac Toe would take so much coding.

The next is a minesweeper clone. This taught me a LOT about how to make lots of the same thing and keep them all organized. You have to hold the SHIFT key down to place a flag. You win if you flag every mine or if you uncover all the other tiles.

...Now that I write that, I realize I didn't do anything to keep you from flagging every box and winning....oh well.



This game too 353 lines of code to create, which includes the code for the external "box" class. In other words, I programmed a single grid square separately from the rest of the code, and had the "main" code make a bunch of copies of that grid, then tell them what to do and when.

All the explanations are for anyone who cares :P

Enjoy! Let me know if you find a glitch in either of them. Also, you can reset the games by clicking on the Win/Lose messages.