Kiki’s Corner
Published in

Kiki’s Corner

Build a Platformer Game with MakeCode Arcade

Level 8 from “Jungle Jump”

What is a Platformer?

A “platformer” is a type of game where your main character hops around between platforms to avoid enemies or make progress across the map. Versions of these games that encourage movement from side-to-side are called “sidescrolling platformers” — or “sidescrollers” for short. Versions that encourage movement mostly up or down are called “jumpy platformers.”

Super Mario Bros. continues to be one of the most well-known platformers on the market and you can get pretty close to replicating most of its features using MakeCode Arcade.

Learn with Skillmaps

To get a head start, complete the jumpy platformer, Turkey Day. This will introduce you to the idea of adding characters, jumps, and win-states.

For a more advanced look, complete the Jungle Jump sidescroller. This will introduce you to danger-tiles, wall-breaking, multiple levels, and more!

Get Your Character Moving

As with most games, you’ll want to start with a sprite character that you can move around the map. To do that, add a sprite to your project, then add the move sprite with buttons block.

You’ll most likely want to expand the block (by clicking the white plus on the right) and disable the vy movement so the character can’t move up or down.

Don’t forget to set the camera to follow the sprite so that you can continue to see it as it moves through the world that you design!

Setting the Scene

A fundamental part of any platformer is the platform itself! In Microsoft MakeCode Arcade, platforms are added using tilemaps.

The tilemap editor allows you to construct a background of individual 16px x 16px tiles that form a larger world. You can also add “walls” to that world, which allow your character appear to stand on tiles without falling through.

To learn more about using tilemaps in your game, read “Using Tilemaps in MakeCode Arcade.”

Making the Jump

Turkey Day allows your character to fly, and Jungle Jump use a “magic” block called gravity jump to make sure you don’t.

The gravity jumpblock was created especially for tutorials and doesn’t exist in our default library…but it’s not hard to replicate for a platformer! All you need to do is check that your sprite is already on the ground before you allow it to lift off. You can do that using this code here:

To learn how our more robust magic version works behind the scenes, read “Jumping vs. Flying: Catching Air in MakeCode Arcade.”

Joy and Pain

Next, you’ll need to add the different “game over” states. What makes you win? What makes you lose? To create your overlaps and conditions to trigger each of those actions, read “Collisions and Triggers: Using Overlaps in MakeCode Arcade.”

Another Level, Another Life

To add length and increasing difficulty to your game, try adding extra lives and more levels!

Lives and levels are both great ways to let your users experience multiple successes and failures in the context of the mechanics that they’ve come to know.

There are several ways to add levels to your game. To learn more, read “Adding Levels to Your Game with MakeCode Arcade.”

Adding lives is even easier. To learn more, read “Lives, Energy and HP in MakeCode Arcade.”

Conclusion

As you can tell, making a great platformer can be a lot of work. However, if you follow the tutorials and read the stories linked above, you should have the start of something amazing in just a few days!

Don’t forget to link your finished platformer below. I’d love to see what you create!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kiki Prottsman

Kiki is an author, educator, and the Director of Education for Microsoft MakeCode