Add a Second Object (Wall) — GameMaker

This step adds a second object which will later act as a solid surface the player cannot walk through.

Be sure to add all these groups
Animation Curves
Extensions
Fonts
Notes
Objects
Particle Systems
Paths
Rooms
Scripts
Sequences
Sounds
Sprites
Tile Sets
Timelines

STEP A — Make a Wall Sprite

  1. Right-click SpritesCreate Sprite
  2. Name it: spr_wall
  3. Click Edit Image
  4. Use the Rectangle tool to draw a block
  5. Fill the block with brown
  6. Use the Pencil or Outline tools to add some black around the edges
  7. Close the image editor to save

STEP B — Make a Wall Object

  1. Right-click ObjectsCreate Object
  2. Name it: obj_wall
  3. Assign the sprite → choose spr_wall

STEP C — Place Walls in the Room

  1. Open Room1
  2. Select the Instances Layer
  3. Drag obj_wall into the room
  4. Place several wall blocks to build barriers

Submission

Submit 3 files:

Save the files into your google drives under your class period and upload to Google Classroom.

Next Time: When we add movement to the player, the wall object will be used to stop the player from walking through it.