I want to place my items and enemies randomly (or as randomly as possible). At the moment I use XNA's Random
class to generate a number between 800 for X and 600 for Y. It feels like enemies spawn more towards the top of the map than in the middle or bottom. I do not seed the generator, maybe that is something to consider.
Are there other techniques described that can improve random enemy placement on a 2d grid?
Answer
Random placement doesn't look random enough to the eye. You'll probably want the enemies spaced out a bit more evenly. Take a look at this article about Poisson disk sampling, or read about blue noise.
No comments:
Post a Comment