Tutorial: Make a Rhythm Game in AS2 – Part 7


Written By MrSun at 7:37 am - Monday, August 04th, 2008
Categories: All Tutorials, AS2, Flash, Game Development, Intermediate Tutorials

Table of Contents

Step 7: Finishing Touches

Well, now for the last step, adding the finishing touches. Just like in my previous tutorial, I won’t really go into much description in this section, in hopes that you can figure out how to do these without my help. As always, the source file is always available at the bottom.

We haven’t displayed the score to the user yet, so we’ll do that first. It’ll be mad easy. Just create a dynamic text field (make sure to embed the font) and set the “Var:” field to score. You can also have another static text field which says “Score:” so the player knows what that number means.

We also have to show the scoreString. We can also do this with a dynamic text field. This time, however, the “Var:” field should be set to scoreString. Also, we’ve got to set the scoreString to “Bad” whenever the user misses the arrow or hits it at the wrong time. Hopefully you can figure out yourself how to do that yourself.

Now, to show the combo to the player. We first have to define a combo variable at the top and set it to 0. Then, we have to increment it every time the user hits the right key, and reset it every time the user doesn’t. Then, we can just place a dynamic text field that shows the combo where ever we want.

Finally, we’re going to have a win screen and a lose screen. Just make two frames, one labeled “win” and the other labeled “lose”. Have the user navigate to “win” when the game is over, and to “lose” when the user loses. It’s pretty straightforward. If you want to, you can display the stats. Then, make a button that will navigate back to the menu.

Well, now we’re basically done. Of course, this is just the beginning of making a game like this. You must figure out everything else on your own if you want to become a real programmer.

The Final Product:

Source .fla File

One Comment

Some Questions! - Ultrashock Forums:

[...] find a free xml flash template? (or would someone make me one?) 2.I made a Game with this tutorial Rhythm Game could someone help me to add music to it? for each level? i cant get it =( 3.If i get an template [...]


«
»