The Power of Backwards Engineering
As I stated in my previous post, I'm looking at recreating the Flash game 'Tonti' just to get an idea what it takes to develop such a game. Here is what I've got so far:
Tonti Game
Click on the start button (instead of typing "0").
If you want to play the original game, go here.
This is not supposed to be an exact copy. I'm just trying to emulate the same functionality. So far I was able to create the interface, make the individual movies of the character popping up, getting the keystrokes for 'whacking' the Tonti, and keeping a basic score. I was also able to make a pause button work, which was not as easy as it seems.
First off, to save time I just took a few screenshots of the original game. I roughly made duplicates of a few parts to use for each row of characters.
After doing some web research on determining how to read a keydown event in Flash, I was able to get some interactivity into it. Instead of the little mallet, I used an explosion, which I thought was a little more exciting when whacking the Tonti. The explosion consists of about 13 individual images of an explosion. I had to code it in such a way that you could only blow it up if it were showing. So when the Tonti character gets so far up, I set a variable that it is available to be hit. When it goes back down, it's not able to be hit.
I used a timer mechanism to randomly trigger each of the 9 Tontis to come up. It's not going nearly as fast as the original game, but I can change that by adjusting the timer. I did run into a problem with this. What was happening at first was that if a Tonti was coming up and its number got randomly called again, it would disappear and start over again. So I had to add a variable to tell it to skip a number if its animation was already active. Not sure how the original game pulls this off, but that's how I did it.
The pause button on the lower left works, although you have to click on it instead of typing a "0" key. It was easy enough to stop each of the 9 animations, but when you click it again to resume, that's when it got a bit tricky. I checked to see if an animation is active before telling it to play or I'd be telling them all to play.
Scoring was pretty simple. At the end of the animation sequence where the Tonti blows up, I just increment the score variable by 200 and it's displayed on the lower right.
I decided that 20 Tonti was good enough to be considered a level, so I put a counter in the timer mechanism that counts every time it fires. After 20, it kills the timer.
Not sure how much further I'll take this, but it's helped me think about how to set up a game. I'm a big fan of backwards engineering things to see how they work (or might work).

Pat -
Very nice job with the re-implementation of Tonti. Playing your version gave me horrible flashbacks to a life of Tonti addiction so many moons ago. Though I must say, your custom explosions make your version far more appealing than the original =)
I remember way back in elementary school, we learned to type with a very rudimentary "game" that was little more than an accuracy reader with a words per minute calculator built in. It wasnt anything nearly as entertaining as Tonti, and yet even still, I remember having all sorts of competitions with other students in the class to try and get the "high score".
If you could do the same thing for a full keyboard that Tonti did for a number pad, I think you might be onto something really cool, really fun, and really useful. I hope you go through with it!
Thanks, Chris. It's pretty rough around the edges, but it was fun to make. Maybe that could be a project for the gaming institute to make the typing game. Your reply reminded me of a game we played on the first generation Macs. I forget what it was called, but it was a game where you're flying a helicopter and you're shooting at other choppers and tanks in a city. You had to dodge catwalks between buildings and the whole game was wireframe - no color or even gradients (before color computers were even available). Anyway, I used to work on the day shift as an illustrator and the night shift supervisor would always try to top my score. He did quite often till one day I decided to play the expert level, which normally you'd get to after playing thru about 20 levels of the easier mode. Well, for getting thru the first 3 levels of expert mode, my score about quadrupled his best ever and he thought I'd spent the whole day playing the game when in fact I'd only played for 1/2 hour over my lunch break. Ha! He couldn't believe it when the others told him I only played it for a half hour. Never did tell him the secret. :-)