yeah, hes doing shared surfaces, meaning if you have "blah.jpg" used in several places, it's only loaded once (: ----- Original Message ----- From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx> To: <gameprogrammer@xxxxxxxxxxxxx> Sent: Sunday, July 04, 2004 4:21 PM Subject: [gameprogrammer] Re: memory management in a game with LOTS ofart > Depends if he is talking about using one shared surface or using one big > surface for all images and blitting out parts of it. Sharing surfaces saves > memory. Using one big surface does not. > > ----- Original Message ----- > From: "Eugene Marcotte" <mrpicalo@xxxxxxxxxxx> > To: <gameprogrammer@xxxxxxxxxxxxx> > Sent: Sunday, July 04, 2004 11:07 AM > Subject: [gameprogrammer] Re: memory management in a game with LOTS ofart > > > > That depends though... > > If you load an image or set of image for each object and have 5 of the > > same objects you're going to have 5 of the same surface... Right? > > > > I mean I don't know if his friend is doing this or not so I'm just > > trying to brainstorm i guess... > > > > > > On Sun, 2004-07-04 at 14:00, Kevin Jenkins wrote: > > > 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 > > > > > > > > > --------------------- > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html > > > > > > > > > > --------------------- > To unsubscribe go to http://gameprogrammer.com/mailinglist.html > > --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html