- Title: Responsive Parallax Scrolling Example
- Description: Example on how to make an almost flawless parallax scrolling universe.
- GM Version: :GM8:
- Registered: Yes
- File Type: .gmk
- File Size: 674.6 KB
- File Link: .gmk only (YoYo games link)
- Required Extensions: None
- Required DLLs: None
First of all I would say thanks to Nocturne for his old parallax example, I've learned a lot from it. Well, Parallax scrolling is a special scrolling technique in computer graphics, wherein background images move by the camera slower than foreground images, creating an illusion of depth in a 2D video game and adding to the immersion. That was what Wikipedia said. In this example I'll show you how to make responsive parallax scrolling world (with moveable view), as opposed to commonly less responsive backgrounds method in which when the view moves the background will follow the view but with slight delay.
The key to achieve this "responsive parallax" is to NEVER EVER use the built-in backgrounds in the room editor (you know, the background[x]). In this simple example I've included two important script to replace those built-in background. They're;
draw_background_tiled_horizontal(back,x,y)
draw_background_tiled_vertical(back,x,y)
You can freely use them for your games if you want, no credit required.
In this example I've also drawn a foreground image that appears in front of the player's object thus they're scrolling faster than any images behind it. And finally... I've also added one building image example, this means you can also draw parallax scrolling images individually rather than tiling it.
The Awesome Parallax Universe!

NOTE: JUST DELETE THE obj_hud IF YOU USE GAME MAKER LITE











