Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Scrolling background for racing game
- 9064331
-
3 posts
Scrolling background for racing game
Hi folks, can anyone help me with a script for a vertical scrolling background for a racing game? I was thinking of using the same background for the track but with obstacles positioned at random places along the track
Thanks
Thanks
- deck26
-
1000+ posts
Scrolling background for racing game
http://scratch.mit.edu/projects/16180710/ gives a simple example of vertical scrolling. If you make sure the background sprites are behind the racers that should do. Does that help?
- 9064331
-
3 posts
Scrolling background for racing game
Great thanks, is there anyway to make it scroll a lot further when the up arrow is pressed?
- deck26
-
1000+ posts
Scrolling background for racing game
How far it scrolls just depends on the sprites you have to provide the background. You can also use multiple costumes. So for example consider a strip of backgrounds one on top of the other -
Sprite 1 costume1
Sprite 2 costume 1
Sprite 3 costume 1
Sprite 1 costume 2
Sprite 2 costume 2
etc
Sprite 1 costume1
Sprite 2 costume 1
Sprite 3 costume 1
Sprite 1 costume 2
Sprite 2 costume 2
etc
- pekky1
-
2 posts
Scrolling background for racing game
please could we try horizontal it might be good
- lion334
-
100+ posts
Scrolling background for racing game
and add coin and traps
so idk exactly what you mean but maybe just make the ppl feel like you're moving? example: add some objects that are floating by after a random amount of time (1-3s) so it feels like you're moving. Maybe add a slower movign Background? That way it would feel like you're racing really fast while, indeed, you're just not moving but the landscape around you is.
-> Have you ever looked out of a train window in a train station and then saw how the train besides you starts moving? Feels like yourself are moving, right? Just as Reference.
- lion334
- Discussion Forums
- » Help with Scripts
-
» Scrolling background for racing game