Building a Frogger-style
|
|
|
Now, you have the building blocks,
so change the settings that: if the right arrow key is pressed then move the frog 3 steps to the right
|
|
Create the HighwayThere are two choices below.
They both show how to construct the highway image for the stage (background). What to do -- click image for animated GIF -->
How to do it -- below on YouTube . |
Creating a moving car
To make a car move, we use the same basic structure as when we wanted the cat to bounce around inside the fence.
However, in this case, we have highway lanes that are perfectly horizontal. So, to make sure that the cars stay in their lanes, instead of "moving 10 steps", we're going to just "change x by 10".
However, in this case, we have highway lanes that are perfectly horizontal. So, to make sure that the cars stay in their lanes, instead of "moving 10 steps", we're going to just "change x by 10".
Duplicate the Second CarObject-oriented programming is great because everything is an object. If you want another, just "duplicate" it.
What did you say? You tried it, but it's all messed up? Ah ha! The dreaded copy-and-paste error rears its ugly head! Watch this video to see where to make changes. |
|
Duplicate the Third CarYes, you're completely right. After showing us how to do the second car, there is absolutely no need to make a video showing how to create a third car.
So go ahead. It'll be easy.... ...right? Ummmm. Teacher! Why is my car smashing into the wall? ... over and over and over again? Well, that's not really "bashing". No, it's more like a "jiggly dance", and the car is doing exactly what you've programmed it to do. Maybe you should watch this video to discover the simple solutions to fix your problem. |
|
Killing the FrogSadly, in a video game called "Frogger", the whole point is to see how long the frog lasts before it dies.
Thankfully, no actual real live frogs were harmed in the making of this game. But today, you get to learn how to kill those pesky virtual frogs. You need to start by thinking like the blue car. Once you can get into the mind of the blue car, everything else is easy. |
|
Frogger Lives Again!Now that you've killed the frog, it's time to bring the poor guy (or girl) back to life!
So, here's a list of all the things that need to happen between the death and re-life of the frog. In ALL cars:
In the frogger:
|
|