Activity - GameMaker - Finite State Machines
Activity - GameMaker - Finite State Machines
Learning Outcomes
By the end of the workshop students will be able to:
Setup
1. Read about the enum data type in the GameMaker Studio documentation:
https://manual.gamemaker.io/monthly/en/GameMaker_Language/GML_Overview/Data_Types.
htm
2. Download the file named BasicStateMachines.zip, which is linked from the assignment on
Canvas.
3. Import the project and to run it. The game runs, but is hardly functional.
Copyright © 2017 - 2024, Julio C. Bahamón, Martin Gutierrez and Riley Jones, UNC Charlotte
All Rights Reserved.
ITCS 4230/5230 - Fall 2024
4. Note that there are TODO sections in most of obj_player’s events. You will need to write code
in these sections to enable full player functionality. Try to reference surrounding code if you
need some guidance. You can use CTRL+F to find all the TODO sections in a given event.
The Block:
1. obj_block doesn’t have any code in it, actually. It has an empty collision event with other
obj_blocks though. Since they are solid, the collision event will prevent two obj_block from
overlapping.
The Room:
The room has two blocks in it. obj_player is also positioned inside the room. Use this to test your
game and make sure functionality is correct.
The Result:
obj_player will walk around as expected. When close to an obj_block, you should see a prompt
indicating to press the ‘E’ key. If you press the ‘E’ key then, obj_player will start pushing the nearby
block on either the x or y axis. Pressing ‘E’ again will stop pushing.
Most importantly, pressing ‘Space’ will cause the player to start dancing, and they will be unable to
perform any other actions while doing so.
Copyright © 2017 - 2024, Julio C. Bahamón, Martin Gutierrez and Riley Jones, UNC Charlotte
All Rights Reserved.