Started learning UE4, can I get a bit of help on this part of the project?

Hi,

I’m trying to make a map that generates itself the moment I move towards a direction. That’s because I need a big map and I don’t want to just make an enormous floor beforehand. If you can, try and watch a Vampire Survivors gameplay on Youtube, that is exactly what I’m aiming towards.

I set it up topdown, put down a floor tile and added a collision box on the very right end and added a “on component begin overlap” to spawn a floor tile on collision with the box.

1 - Is it better to have a collision box on one side and check when Overlap or having one collision cube on the center and check when the player gets out of it?
2- I would need to destroy older tiles after a certain distance to not clog the whole game but I wouldn’t know how.
3- Any other ideas? The more precise the better, I’m trying to learn, sorry for having multiple questions!

Thanks a lot, I appreaciate it. Ask anything you need to better understant, I will answer.

If the map is large and you know the layout beforehand, use level streaming:

If the map is going to be procedurally generated, it’s really up to you how you do it. One easy way to decide when to destroy actors is by distance from the player.

I like the Level streaming approach, but I would want to make the map generate as long as the player decides to move in a certain direction, so that leads me to a copy and paste of a “tile”/“floor” or something like that.

My question number 1 was more about efficiency than anything else but, thinking about it, collision boxes lead me to a problem where, if the player decides to enter and leave the box multiple times, the tile doesn’t need to get generated again.

This whole logic, gets pretty hard on my beginner brain and I can’t find all of the needed commands haha

Yes, it’s a toughie.

The maze you see in this demo uses that technique:

First thing to learn about I guess is the DoOnce node :slight_smile: