Discuss Scratch

9064331
New Scratcher
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
deck26
Scratcher
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
New Scratcher
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
Scratcher
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
jamtey
New Scratcher
1 post

Scrolling background for racing game

Hi everyone
SINGLEBUDDY
Scratcher
1 post

Scrolling background for racing game

IHEW
pekky1
New Scratcher
2 posts

Scrolling background for racing game

please could we try horizontal it might be good
pekky1
New Scratcher
2 posts

Scrolling background for racing game

and add coin and traps
lion334
Scratcher
100+ posts

Scrolling background for racing game

pekky1 wrote:

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

Powered by DjangoBB