Frogger - Part 2In this section, we will:
|
|
Sensing the Finish AreaWe have already created a finish area, but now we're going to create a more advanced finish area.
We want to add a new if code that only works if the frogger is still alive. Where do you add this new code?
|
|
Start at the Start!Also known as "Stop the Cheaters!"
Play around with your game right now, and you'll discover that you can stop and start the game with your frog anywhere! ... Even right beside the Finish Area!! This video only has a few instructions, but it makes the Frog start at the beginning every time! |
|
Keeping Score (with Points)No video game is complete without some way of telling who is the best!
For this game, we'll keep score by creating a variable called "Points".
April 2014
On YouTube, starwars1744 asked: "Does anyone know how to make the points not go less than zero (no negative score)??" For my solution, after I subtracted 15 points, I checked to see if Points was less than 0. If it was, then I set Points to 0. |
|
Level Up!Of course, if we're going to keep track of points, we should also keep track of the level each player achieves.
Levels. ... You wouldn't think it would be that complicated ... ... and it isn't!! |
|
Setting the Speed ...As we move up the levels, we should see the cars moving faster, right?
But if the cars are getting faster, shouldn't the frogger get faster too? |
|
... with speed for cars & frogs ...This does get a bit complicated, but stick with it! It's worth it! PLAY YOUR GAME! The only way to test these settings is to play, play, play!! |
|
... but not by that much!See!
We really did need to test our game! To only increase the speed every 4th level, try this! Trust me, if the game speeds up too fast, then nobody will want to play it for more than a minute. |
|