Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

2D infinite runner enemy spawning system question

Discussion in '2D' started by UnrealHavok, Feb 4, 2015.

  1. UnrealHavok

    UnrealHavok

    Joined:
    Feb 4, 2015
    Posts:
    1
    Hello all,

    i'm still new to the game dev world, my first game would be an infinite runner with enemies , so a shoot em up kinda game.

    the problem i'm having is, i don't know what's the best logic to use when making the spawner system. do i spawn enemies randomly and put distance between each spawn? or use random timer to spawn?

    what would be the best logic to use to avoid issues such as, predictable enemy positions or frequency, overlap and fair enemy spawning.

    i'm not looking for code (although wouldn't mind xD) but more of the logic to use or such.

    thanks in advance!
     
  2. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    It is more a Game design related question sooo I would say your not in the right part of the forum :)

    but to give you an answer, it totally depends of what you want to do; there is not something as " the best logic"
     
  3. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,256
    You could use a random timer to simulate distance with an infinite runner. I suggest that you make a system like that and then feel out what is the best distance/interval for spawning enemies.

    There are many ways to spawn enemies and each one is more suited to a particular situation. As a games design evolves, so will its spawning system to suit the games mechanics. Start with something simple then work up to something that works with what you want.
     
    theANMATOR2b likes this.
  4. Masoncakes

    Masoncakes

    Joined:
    Jan 5, 2018
    Posts:
    1
    WHAT IS UP MY DUDES
     
  5. MrKjeld

    MrKjeld

    Joined:
    Jan 20, 2017
    Posts:
    7
    You could have spawn triggers with random positions?
    In the case of an infinite runner you could also have set spawn positions that follow the player and spawn enemies periodically and at random. Sort of depends on what you're after I guess. :)