© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
B. TyersGameMaker Fundamentalshttps://doi.org/10.1007/978-1-4842-8713-2_13

13. Backgrounds

Ben Tyers1  
(1)
Worthing, West Sussex, UK
 

Most of your rooms will have some sort of background, whether it’s a solid color, a moving background, or a more complex parallax effect.

Backgrounds can be used for
  • Splash screens.

  • Backgrounds for levels.

  • Moving backgrounds for infinite runner type games.

Backgrounds are loaded in the same way as sprites. Load in the space background from the resources and name it bg_1.

If you wanted to move the background to the left, you can set the Horizontal Speed to a negative value, for example -2, in the room settings, as shown back in Figure  ...

Get GameMaker Fundamentals: Learn GML Programming to Start Making Amazing Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.