Sprites

I’m making a game very similar to Age of Empires and Starcraft, and it’s getting there, my problem is that it is realllly slow. I’m using glDrawPixels() to display the sprites, and having the image in GL_RGBA to specify the transparent parts. This goes so slowly, even on a great computer, i’m wondering if i’ve forgotten to disable something or if i’m using the wrong technique or what… Anyone know?

glDrawPixels is just slow in general (there are exceptions for specific video cards and situations). Use textured quads for your sprites and things will typically go much faster.

How to make more faster sprites.

what is a sprite?

From The Free On-line Dictionary of Computing (13 Mar 01) [foldoc]:

sprite

 <graphics, file format> A small {bitmap} image, often used in
 animated games but also sometimes used as a synonym for
 {icon}.

 (1997-06-29)

Howdy,

hmm, you think? I’d argue… well, “muse” might be a better word, that the term ‘sprite’ doesn’t really apply anymore. There is nothing these days to distinguish a sprite from a camera aligned quad… but it wasn’t always like this.

ANyone ever coded on a commdore 64 (or Amiga or …)? I’d argue that they had real sprites =) You could enable a sprite and then move it without worrying about the background since they lived on a separate plane. Thats, IMHO, a real sprite because it referred to something the hardware did, rather than some ‘magic’ property like always been aligned, or some ‘term’ like a bitmap.

Of course, everyone is entitled to disagree with me.

cheers,
John

Just for nostiaglias sake, My favourite ever sprite has to be the “FAT NINJA” on “Bruce Lee” game for the C64. anyone got any others

Those little one-eyed aliens in Comm.Keen:Invasion of the Vorticons kicked ass

Originally posted by Platinum:
Those little one-eyed aliens in Comm.Keen:Invasion of the Vorticons kicked ass

I remember, they were cool.

I also think of the the flat characters in doom when you speak of sprites. I think these were also ‘real’ sprites but different from the origional use which were strictly for 2d games. Billboards is the new name for camera aligned geometry.

use textured quads…
It’s much faster…