A
axialgentleman
Guest
I'm new to GameMaker and very excited! For my first little project, I'm creating a classic first-person escape-the-room game. The room has four "walls" -- four separate screens that the player can switch back and forth between at will, manipulating objects and solving puzzles.
I'm trying to get a handle on how to store and access information about the objects in the room, including ones the player isn't currently looking at. For example, when the player faces the North wall and presses a keypad, I need to check whether they previously flipped the circuit breaker on the South wall.
From what I've read, there are a few options:
I'd appreciate any advice on the right way to think about this! Are any of these approaches considered better practice, more effective, or less likely to cause me trouble down the road?
[I'll also happily accept RTFM responses, especially if you can point me to the appropriate term or concept to look for]
Software: GMS2 Runtime v 2.2.1.287 on Mac OS 10.13
I'm trying to get a handle on how to store and access information about the objects in the room, including ones the player isn't currently looking at. For example, when the player faces the North wall and presses a keypad, I need to check whether they previously flipped the circuit breaker on the South wall.
From what I've read, there are a few options:
- Each wall is a separate room. The objects on the walls are persistent so I can access their state at any time (e.g., check the value of the `flipped` variable on the circuit breaker object). I only draw them when the player is looking at the appropriate wall.
- Each wall is a separate room. The objects are destroyed whenever the player switches rooms but I store information about their state in a global data structure so I can check it at any time, and re-create them in the right state when the player is looking at them again.
- The entire game is in one room that contains all four walls, and I switch between them using different views
I'd appreciate any advice on the right way to think about this! Are any of these approaches considered better practice, more effective, or less likely to cause me trouble down the road?
[I'll also happily accept RTFM responses, especially if you can point me to the appropriate term or concept to look for]
Software: GMS2 Runtime v 2.2.1.287 on Mac OS 10.13