Jump to content

  • Log In with Google      Sign In   
  • Create Account


One surface or many?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Gav   Members   -  Reputation: 124

Like
Likes
Like

Posted 27 January 2000 - 02:52 AM

When using DirectDraw, is it preferable to use one large surface to hold all the sprites on, or a different surface for each different sprite? Different surfaces would be easier to manage but is it as/more efficient than using one surface? No sense being pessimistic. It wouldn''t work anyway.

Sponsor:

#2 Staffan   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 05:20 AM

I dont think it matters that much, as long you dont store each frame of each sprite in a seperate surface. The advantage of using big surfaces is just that they save _some_ memory, i dont know how much exactly but i dont think its that much. Also, as you said, having one surface for each sprite is much easier to handle, this is how i do it (i think this is the way most of us do actually).

#3 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 05:33 AM

The bigger the surfaces are, the more is DDraw not able to handle ''em in the best way, but the more Surfaces you have, the more speed gets lost. You should look for the best way for your program. (For example: Store all Bitmaps of one Object in a single surface)

BYE

#4 PmpCh   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 January 2000 - 06:08 AM

I think the surface containing the sprites should not be to large. If it won''t fit in the display memory, DirectX will place it in the system memory, which is much slower as we know. So smaller surfaces are preferable, since more of them can be placed in the display memory.

PmpCh

#5 INVERSED   Members   -  Reputation: 172

Like
Likes
Like

Posted 27 January 2000 - 06:14 AM

That''s in theory, but If you need x sprites to make up object player, then it would probably be best to put all of x sprites for player on one surface, if you made a lot of smaller surfaces, it would take up just as much room, if not more. Personally, I like putting all my frames for an object on one large surface, since the object is going to need them anyway, but that''s just me.

#6 Zenroth   Members   -  Reputation: 127

Like
Likes
Like

Posted 27 January 2000 - 06:34 AM

Mix the two thats the best way ive seen yet. For an example currently I have a object that comes in 8 differnt colors,Do i put them all on one bitmap? NO. Reason why in the game you will at best see only 2 differnt versions of that object. Which means i can load the 2 that are needed into video memory instead of having to try an waste memory for 8 of them.Tiles i would say go ahead and put on one bitmap(If your using sets of tiles,otherwise try an load only the ones that are gonna be in that specific level,ect instead of all of them.)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS