Skip to main content
GameDev.net gamedev.net
🔒 Locked

Draw simple stars like in galaga

Started by nick5454 May 6, 2015 at 8:16 PM 1 replies 3k views
Original Post
nick5454
nick5454

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?

laztrezort
laztrezort
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.
jeskeca
jeskeca

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.