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

sprite-draw fast enough?

Started by lo1989 Nov 1, 2005 at 2:13 PM 2 replies 600+ views
Original Post
lo1989
lo1989
im very new to graphics programming, so i tried to use the Sprite Class for all my 2d drawings. Even for big backgrounds. and everything works very fast (>100fps) . i can load big textures (areamaps) and show part of them and scroll through the texture. but i can read everywheer that i should use tiles .... So why should i use tile based engines for bigger images, or split them up when working with the sprite class works fine? (i have an old Geforce Card and small CPU <1500mhz). maybe bigger textures wont work, but if i limit my game to textures < 2000x2000px i wouldn`t have a problem though.
matthughson
matthughson
Rule of thumb is that textures should not be any larger than 256x256 (or some say 512x512) if you want to support all video cards.

But even with 2000X2000 textures, that's just not enough. You'd probably barely fit a level from the original Super Mario Bros. on that, let alone games today.

Edit: So basically tile maps aren't really so much about speed, and they are about conserving video memory.

Matt
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
frob
frob
Quote:
Original post by matthughson
Rule of thumb is that textures should not be any larger than 256x256 (or some say 512x512) if you want to support all video cards.

Fortunately most people can set minimum requirements, and it doesn't have to support all cards by everybody back in time forever.

Use 1024x1024 as the minimum, unless you are targeting newer hardware and want bigger textures.

The crappy Microsoft generic GDI renderer supports 1024x1024 textures. With the exception of some very old and crappy cards and drivers, that's a realistic minimum.

Delphi 3d has reports on pretty much every video card and driver set out there, just so you can verify this or check the basics of different ages of cards.


As far as texturing goes... changing textures is a relatively slow operation. If you can stick all the different sprite images on a single texture, or on a few textures and draw them sorted by texture, it will help. There is the usual noob mistake of generating 256 sprite textures, one per letter texture, rather than just creating a big letter sheet for texturing all the letter quads.

Your really big background images are an easier problem. If you choose to use a big image rather you're going to have huge imgaes no matter what you do. That's why you generally see a large skybox, or tiles, or well-placed objects on a repeating background.

Finally as a side point, when measuring fast framerates, use seconds per frame rather than frames per second. It gives you more of an insight to see that you jumped from 0.001 seconds to 0.005 seconds, rather than seeing a jump from 1000fps to 200fps

frob.
ryt
ryt
hi lo1989, im also new to coding, i bilt my own sprite but i cant get it to work, i can t see it, i dont know whats wrong, could u please send me your code of sprites to my email rytagm@gmail.com or tell me some good tut abaut them

Topic Locked

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

Sign in to reply to this topic.