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
- Right-click Sprites → Create Sprite
- Name it:
spr_wall
- Click Edit Image
- Use the Rectangle tool to draw a block
- Fill the block with brown
- Use the Pencil or Outline tools to add some black around the edges
- Close the image editor to save
STEP B — Make a Wall Object
- Right-click Objects → Create Object
- Name it:
obj_wall
- Assign the sprite → choose
spr_wall
STEP C — Place Walls in the Room
- Open Room1
- Select the Instances Layer
- Drag
obj_wall into the room
- Place several wall blocks to build barriers
Submission
Submit 3 files:
- Your PX_lastname_GameMakerL2.png with your Gamemaker Player visible.
- Your PX_lastname_GameMakerL2.mp4 Video showing game running.
- Your PX_lastname_GameMakerL2.gml actual Gamemaker program.
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.