Hi all!
I am going to do a mario game.
In mario games, mario is in the middle of the screen, and when you walk, the screen move and when you reach the end, you can get to the bottom of the screen.
How I do this?
Goodbye.
PD: Sorry with my bad english, is not my language :S
How I do a moving background?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How I do a moving background?
I think the Gamera library (viewtopic.php?f=5&t=12033) will do what you want most easily.
Re: How I do a moving background?
If you want the background to scroll at the same speed as the foreground, just using love.graphics.translate should do the trick. If you want some parallax effect, it's a little bit more tricky but not really hard.
If you know how to draw the background to the screen, you can just draw it a little bit to the left every frame, that's a good start. Then make sure you only move it to the left when the player is moving.
If you know how to draw the background to the screen, you can just draw it a little bit to the left every frame, that's a good start. Then make sure you only move it to the left when the player is moving.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 2 guests