Creating realistic asteroids
Posted on 1998-11-15
I am working on this game in which there are simple graphics. I am trying to create a good algorithm for making asteroids. The asteroids are drawn using the Polygon function, so as you can imagine they don't look that good.
Here is my current plan. I have an array of 6 POINT structures. These POINTS are relative to the center of the asteroid. So the coordinates in them can be positive or negative. To pick the points, I simply pick random numbers like
point[n].x = rand () % 25 - rand () % 25;
point[n].y = rand () % 25 - rand () % 25;
This, however, creates some pretty strange asteroids (i.e. not real at all). I am wondering, is there a way to create decent looking asteroids at run time, or do I have to pick design the asteroids myself, and then at run time have it randomly pick a shape similar to the real asteroids game.