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:
Create a new Sprite,
spr_Ground
, and loadChapter 5/Sprites/Ground.gif
with Remove Background not checked. Click OK.Create a new Object,
obj_Ground
, and assignspr_Ground
as the Sprite.Check the box for Solid. This is necessary as our collision code is looking for solid objects.
Let's test this out. Create a new Room, and under the Settings tab, change the name to
BossArena
and change the Width to800
. We will want a good size room to fight in.Add instances of
obj_Ground
around the border of the room. Also add a single instance ofobj_Player
near the floor of the room.Run the game. At this point the player should be able to run and...