04/10/2016 – Character Movement

Today’s lesson covered the basics of Platformers and Aerial View games.

Aerial Games:

  • Needs the ability to move up, down, left and right
  • Aren’t affected by gravity
  • Not meant to bounce – only stop

Aerial games can be easier to make compared to platformer games, so before covering them, we learnt about new things which can be implemented and controlled in game maker.

Frame Rate

As previously known, frame rate is a set of images played fast enough to create the illusion of movement. At between 25-30fps the video is no longer choppy to the human naked eye. GameMaker can adjust the frame rate of individual sprites and for each room/level.

Variables

Variables are pieces of code (predefined or user defined) that remember certain values – text or numbers – so they can be used/edited easily multiple times. The most common uses for variables are speed, direction, x or y, and can be defined both locally (certain parts of the game) or globally (across the whole game). However, as the variables use up RAM space, too many global variables can slow the game down.

Platformer movement needs:

  • Needs left, right and jump
  • Gravity
  • Restricted by solid objects
  • Not to bounce either – only stop
  • Velocity
  • Walk on the floor
  • Walls and platforms

For the platformer, some objects/variables needed to be relative. A good rule of thumb for determining which should be relative is if it is a force/element or not, for example:

  • Gravity is not relative as it is a force
  • Movement IS relative as it is a player controlled movement