Trouble Shooting Games (To add your comments link to the full post by clicking the “Read More” link.) Is there an error you have frequently come across working with your students? Your experience may help another teacher and their experience may help you. Tell us about problems you have encountered that are not already included […]
Tips for Trouble Shooting Games
The Golden Rule: Test Run Frequently!
Avoid many problems. TEST RUN the games FREQUENTLY!
Test run each time a new feature is added. Does it work?
- If it does great!
- If it does not work – you know where the problem is. Remove or correct the things you just added or changed. Then test again!
Pay attention to the Naming Rules
Gamemaker can seem to be forgiving with naming Rules. But as more and more is added to a game, if there is an early mistake in naming rules, suddenly the game will stop working. Smetimes the only way to fix it is to start over.
Rules for naming Gamemaker Resources
- Each name must be unique. No two names can be the same!
- Names can be made up of letters, numbers and the underscore symbol.
- They must start with a letter.
- They cannot have spaces or special characters with the exception of the underscore symbol.
- Limit length of names to fewer than 32 characters.
- s wall
- Wall 2
Relative Boxes Checked or Unchecked?
Not checking Relative boxes when they are supposed to be checked can cause problems.
Example 1: Players don’t move the way they should.
This problem commonly occurs when defining movements as in Keyboard Events <Left> and <Right> in Platformers.
- Check Empty – check if spot is free – Relative (to current position)
- Jump to Position – Relative (to current position)
Example 2: Special Effects like Explosions are not seen or appear in the upper left hand corner of the screen
- Check to see that Relative is checked.
Example 3:Score does not increase.
- Set Score – if points are to be added or subtracted – Relative box must be checked.
IMPORTANT: Checking Relative boxes when they are NOT supposed to be checked will also cause problems.
Speed and Gravity
When specifying Speed
The Relative box is generally NOT checked .
For Example: If for instance you specify a speed of 4 and the Relative box is checked – at every step of the game, 4 will be added to the current speed. Very quickly the Player will be going so fast he will pass through walls and disappear from the game!
When defining movements as in Keyboard Events <Left> and <Right> in Mazes.
- Move Fixed – Do not check relative.
When dealing with Gravity
Normally the Relative Box is not checked.
Negative Numbers & Minus Signs
Often a minus sign is omitted or used where it should not be.
- This is seen a lot in mazes and platform games. If the Player cannot move if the four directions check the Keyboard Events for accuracy.
Player is stuck in a wall!
Example 1: If this is noticed at the start of the game, it is probably happening because the Origin setting of the Sprite inadvertently got changed to something other than x=0 and y=0.
- Unless otherwise indicated the Sprite’s Origin should remain set at x=0 and y=0.
Example 2: If the Player becomes stuck when randomly moving around. Check the Sprite.
Unless otherwise indicated when preparing ALL SPRITES:
- Uncheck Precise Collision Checking
- Modify Mask: Change bounding box from Automatic to Full Image.
Object Property – Persistent
Objects appear on levels that they have not been placed on.
This can happen when the Object or Room is accidently set to be Persistent.
Normally Objects and Rooms ARE NOT be set to Persistent.
Game Shuts Down
Game shuts down when the end of the level is reached or at some other unexpected time.
Have a look at any Object that has an End Game routine, such as the Player Object (in a Collision Event)
Check to see that the End Game Routine is properly ‘blocked’.
In second example the Game will shut down because the End Routine is not completely blocked.
|End Game Routine is correctly blocked||End Game Routine is not correctly blocked|
SAVE SAVE SAVE
When working with a group, remind students or campers to save often and to always save before test running their games.
But SAVE properly!!!
When a student or camper starts Gamemaker, many expect to see their game that they started the day before or whenever.
They click on folders, discover that they are empty. They then click on the Sprite Icon, discover it does not contain their Sprite.
And then they go to close the empty game.
Gamemaker will prompt: Do you want to Save the Game as (Name of last saved game)?
Many students will select Yes (and proceed to save an empty game).
Their game is now an Empty Game!
Automatic Back Ups
Sometimes a lost game can be retrieved.
Gamemaker automatically makes back-ups of games.
The game file with the gm81 extension is the original game file.
Gamemaker creates back-up files with extensions like gb1, gb2, etc.
To restore a back-up file, rename it and give it the gm81 extension.
It can then be opened in Gamemaker.