Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a FPS/MMORPG and ran into a problem at spawnpoints, when I enabled collision detection between players. Neither player would be able to move if both spawned at the same time, because both players would essentially be "trapped" within each other's meshes. What is the best way to resolve this problem?

share|improve this question
up vote 6 down vote accepted

The usual way to avoid this problem is to do a collision check before spawning the player, to make sure that the spawning area is clear of obstacles before spawning.

In general, you want to have several different spawning positions (as many as possible), so that if one of them is blocked, you can spawn the player at a different one.

If all spawning positions are blocked, then you need to delay spawning the player until one of the spawning positions becomes clear. (This is why you need lots of spawning positions, to keep a team of players from conspiring to grief their opponents by intentionally standing in all the available spawning positions and keeping their foes from respawning)

Your extra spawning points don't even need to be in different parts of the world; it's very, very common to make "clusters" of spawning points that are very close to each other. This lets you still know approximately where players will spawn (which can be useful from a design point of view), but still have spawnpoints available for immediate use when a player doesn't immediately move after spawning.

share|improve this answer
Which generally means, either n + 1 spawn points for n players per team; or a radial spawn, ie any position in an area that has width * height free volume. – dcousens Jun 6 '11 at 11:08

You might also consider just not having players collide with each other. Besides simplifying the spawn problem it also eliminates griefing such as door blocking.

share|improve this answer
The opposite is true; I hate friendlies running into my line of fire (perhaps stealing a kill, perhaps friendly fire), this creates another set of problems and game play quirks. Such as hiding 10 people in the same spot. Sounds like a bad solution. – dcousens Jun 6 '11 at 11:09
in your solution would the players run through each other like ghosts ? that would make for strange game play. – Skeith Jun 6 '11 at 11:48
Depending on the type of game, this is a good solution. In an MMO, a few players could block off relevant areas (i.e. a shop, quest-giver or similar) of the game to annoy others. These are situations where collisions should be removed. – bummzack Jun 6 '11 at 12:18
Skeith, yes. That's exactly what WoW does for example. You'll NEVER perfectly solve the spawn problem. – Tim Holt Jun 6 '11 at 21:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.