Need help creating auto-runner gameplay with parallax mapping or moving pictures.

Hi everyone.

So, I'm struggling massively with making a chase section where the player has to move up and down to avoid moving events that spawn on the road, as seen in the pic below.

I've tried making a static map and setting it to loop in the map settings. Then I use parallel events to keep the player moving forward and checking for up and down movement. I then have a spawner that's ahead of the player and matching their movements, which spawns obstacles based on a timer.

I keep running into issues where all the spawned objects will just vanish at certain times if the player presses enter during dialogue. It's just been really problematic. I also have no good way to destroy spawned objects once they go off screen. Because it respawns the same objects over and over, it was sort of working, but then there's some sections where the guy chasing the player catches up and talks, during this it doesn't spawn. So, when the dialogue ends and the obstacles start respawning again, most of the time they'll visible on screen and suddenly vanish to be respawned.

Is there any way I can do this without actually moving the player or anything else forwards and looping through the map?

One thing I'm trying now is Galv's Layer images plugin to put a layer behind the player. I'm using it instead of a map. I can set the layer to move in X and scroll and everything. It does look good. I thought I could just then spawn out obstacles ahead of the player and it'd be fine. The issue here is that the obstacles (rocks like below) aren't moving at the same speed as the background image, so it looks like they're literally moving rather than just sitting there on the ground.

If I can get it this way where I'm moving the map and not the character, that would make things super easy.

So, any way to move an event at the same speed as a parallax map or background image?

Thanks!


1681939437750.png
Hello, I hope I can help you. Sorry for my bad English.

I would only do this with events, because modifying existing scripts can be very complex.

In my opinion you didn't create a Global Switch that controls the on-screen elements to interrupt the parallel process that generates the off-screen objects in front of the player.

It is necessary to create a method that checks the X and Y position of the obstacles on the screen (X-Picture and Y-Picture), making them reappear only when they are smaller than 0.
That's keeping a map with horizontal looping, but double the size to give time to be recreated well ahead.

I could create an example for you, but the mechanics might not be what you're looking for.
Hello, I hope I can help you. Sorry for my bad English.

I would only do this with events, because modifying existing scripts can be very complex.

In my opinion you didn't create a Global Switch that controls the on-screen elements to interrupt the parallel process that generates the off-screen objects in front of the player.

It is necessary to create a method that checks the X and Y position of the obstacles on the screen (X-Picture and Y-Picture), making them reappear only when they are smaller than 0.
That's keeping a map with horizontal looping, but double the size to give time to be recreated well ahead.

I could create an example for you, but the mechanics might not be what you're looking for.

Hi.

I didn't realize I could check the screen X position like that. I made a parallel event that chicks if any of the obstacles are 0 or below on the screen in X and made it so when they are they go transparent and then I make them transparent again when they re-spawn further ahead of the player again.

Haven't fully tested it, but it seems to work perfectly and looks like it fixes all my issues!

Thanks for the help!

Also, your English is perfectly fine!

Cheers!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-creating-auto-runner-gameplay-with-parallax-mapping-or-moving-pictures.156827/