Arcade Follow-Along: Dogger
Use the arrow keys to navigate your dog across four lanes of traffic and to the tasty bones!
Follow along with me as I code Dogger using MakeCode Arcade!
- To begin, visit arcade.makecode.com and start a new project. (Don’t forget to sign-in if you want to be able to transfer your game to other computers.)
Start a new project
2. Give your project a name and click “Create” to enter the code editor.
Add a Background
3. Find the block that lets you add a background. Then, create an image that looks like a 4-lane road with safety spots at the top and bottom.
Add a Your Dog
4. Add a dog sprite and get it moving. Don’t forget to make sure it stays in screen, and remember to start the sprite at the bottom in the lower safe-area!
Add a Finish Line
5. Add a sprite at the top of the screen that works as a finish line. You can use a bunch of bones, a ribbon, or kibble that’s been scattered all about the grass. Whatever you use, make sure you give it a kind, like Food, and position it up at the top of the screen in the upper safe-area.
6. Now that we have a goal, let’s make something fun happen when we reach it. Add an overlap so that when the Player overlaps the Food, the player gets a point and is transported back to the starting line.
Add A Line of Cars
7. Add some car projectiles that come out from the side of the screen at quasi-random intervals using the
% chance block and an
on game update. Position this line in the closest lane of traffic.
Add Another Line of Cars
8. Duplicate that whole
on game update statement and send another item out in the row just above, at a slightly faster speed.
Add Two More Lines of Cars
9. Duplicate both of those
on game update statements and make the
vx negative to send in two lines headed the other way. Move the cars to the top lanes and you should start to see some significant traffic!
Add the Danger
10. Make sure something happens when the dog runs into the car projectile with another
overlap event. Add a special effect or two, remove a life, and set the dog back into the lower safe-area.
And That’s It!
You should now have a playable game of Dogger!
What does yours look like? Did you code anything differently than what I have here? If so, share your game in the comments below!