Make a parallax background scroll in a loop

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
35
Reaction score
8
First Language
English
Primarily Uses
I want to make a circular city that's a short, wide map that loops horizontally and is played as a 2-D platformer. Is there a way to make a picture of the city's "skyline" on the other side of the city scroll in a loop so it always looks like you're in circular city instead of long city that repeats.

This is hard to describe but I can't for the life of me find or even draw a good example.
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
35
Reaction score
8
First Language
English
Primarily Uses
I tried to get it to do what I want, but I couldn't figure it out.

Are there any other scripts that might work?
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
[1] Put that script in your script editor below Material and above main.

[2] In your map property, there's a note box, put this tag in it. <full lock parallax>/<tile lock parallax>

[3] Set up a parallax sky there too.

[4] In the same place, set up your map to loop horizontally.

Now when your character move around the city in your map (horizontally), the sky background will act as if it's moving backward when compared to the tiles you use in building the city. Is that not what you want? Because from your top post, that's as far as i can understand.

You can also go check on some youtube videos and link one here that does what you want if you can't draw it down on pictures.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
There is an option on the map for the parallax to scroll right?
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
35
Reaction score
8
First Language
English
Primarily Uses
After I put the <full lock parallax>/<tile lock parallax> in the note, it just makes the background static. You definitely understand though. I want to move the parallax backwards from the direction the player moves in regardless of whether he goes left or right AND I want it to be loopable. Maybe it's just loopable automatically? I still can't get it to go backwards though. I can't find an option to make the parallax scroll right/reverse direction and that's probably what I need.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
hmm.. i thought one of those tag allow the map to scroll..

I just gave that script a try and seems like <tile lock parallax> is doing what you want but the moving backward part is a little to slow so it moves with the tile in front, but you can give it a small modify to work.

at line 160 of the script you should see:

return @display_x * 32 if parallax_tile_lock?

change the part @display_x * 32 to something like 

@display_x * 64

This should make the parallax move backward compared to the tile in front.
 

Austintatious

Veteran
Veteran
Joined
Jul 16, 2015
Messages
35
Reaction score
8
First Language
English
Primarily Uses
Thank you so much for your help MeowFace! For the record, the value that ended up making it look normal (ie the background changed at the same speed as the character walking) was about 45.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
You're welcome! And congratulations on your progress! ;)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top