Setting up the room

We have the player, now we need a world to place it in. Since we are making a platformer, we are going to use two types of building block: a ground object and a platform object. The ground will be impassable to the player and will be used for the outer perimeter. The platform object will allow the player to jump through and then land upon it:

  1. Create a new Sprite, spr_Ground, and load Chapter 5/Sprites/Ground.gif with Remove Background not checked. Click OK.
  2. Create a new Object, obj_Ground, and assign spr_Ground as the Sprite.
  3. Check the box for Solid. This is necessary as our collision code is looking for solid objects.
  4. Let's test this out. Create a new Room, and under the Settings tab, change the name to BossArena and change the ...

Get HTML5 Game Development with GameMaker now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.