[gameprogrammer] Re: memory management in a game with LOTS of art

  • From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Sun, 4 Jul 2004 11:00:49 -0700

That doesn't save you any memory aside from the small per-surface overhead.

----- Original Message ----- 
From: "Eugene Marcotte" <mrpicalo@xxxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Sunday, July 04, 2004 10:47 AM
Subject: [gameprogrammer] Re: memory management in a game with LOTS of art


> I don't know if it's very feasible in his case(or even what you're
> looking for), but making one image with all the artwork and putting them
> in one file(or files if you split them into groups or something) and
> loading it to a global variable of some sort then just blitting
> selections out of the stored surface of all the artwork. 
> 
> This saved me alot of memory because each object doesn't need it's own
> surface for artwork, it's all shared with all the objects(plus it makes
> doing animations easy as adding a number to the id if you design it
> properly)....
> 
> One trick I used is if there are images of different areas (32x32, 16x16
> etc) put the images of the same size in their own files so you'd have
> artwork16x16.png with all 16x16 artwork and then load that and make
> blits from it.
> 
> Not sure if this method would work for him but you weren't very specific
> as to what he was trying already... I dunno..
> 
> See ya,
> Eugene



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: