- Home /
Infinite runner spawning enemies, need some guidelines.
Hi,
I'm currently working on an infinite runner and i have most stuff set up already. Now I'm trying to figure out a good way of adding obstacles/enemies to the game and was hoping that someone could give me some directions on how to do this.
Currently i have a spawner moving along the x-axis, which randomly picks a platform out of an array and placing it inline with the previous one. Pretty basic.
So onto the question. Do experienced developers have some kind of standard on how to manage the creation of obstacles? Or are there any preferred ways?
I had an idea in mind, but not sure if it's optimal. Basically, since there is an array with all the platforms that could spawn (they all fit together, so its kinda like a puzzle on the go). Can i define each platform to have enemies, obstacles etc included on them, or would that be a bad idea?
For example. Platform 1 is defined with a enemy in the middle, platform 2 got an enemy on the far left, platform 3 got no enemies, and so on.
Thanks in advance!
Personally, how you just explained is how I would set up enemy spawning, but have it randomized on the platforms, rather than plat 1 being middle spawn it'd be completely random where there are. Another thing to add variety, if possible, would be to add flying enemies for an extra challenge!
Alright. Thanks for your reply! I will look more into that approach
Your answer
Follow this Question
Related Questions
Unity2D spawn frequency not working C# 0 Answers
Using fog/mist to disguise enemy spawning 2 Answers
Max Spawning Obejcts 0 Answers
Spawning enemies in hieararchy 1 Answer