Draw simple stars like in galaga

Started by
1 comment, last by jeskeca 8 years, 11 months ago

I need to draw stars. I currently have a game in ortho 2d much like galaga, but now I want to know how to draw stars that are maybe 3 pixel diameter at most like the background in galaga.

Are these point sprites? or is there another type to keep the processing low?

Advertisement
Personally I would take the easy way and just use regular sprites (alpha blended texture-mapped quads). With a simple batching technique, there should be no need to optimize further, even when drawing many thousands of small sprites per frame.

The easiest thing to do is use GL_POINTS, just to get something going. Next you can use a regular sprite (textured quad), rendered individually. Last, you can render the sprites batched (either via instancing, or ibo sprite batching.

This topic is closed to new replies.

Advertisement