• Advertisement

Archived

This topic is now archived and is closed to further replies.

2d sprite speed issues

This topic is 5154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I''m in the middle of my design phase of my game project and found out that my game; a tile based-multi-layer RLS (Real Life Simulator as Harvest Moon) needs a huge amount of tiles. I''ve decided to use tiles that are 32 * 32 pixels in size and that makes it (640 / 32) * (480 / 32) = 300 tiles per layer, but each layer won''t use all 300 tiles so i''d guess that about 5-600 tiles will be visible constantly. Now here comes my speed issue; i thought that my own software blitter could handle these amouts, but i was wrong, or to be more specific; it wasn''t fast enought. Now i had 3 options: 1. use ID3DXSprite 2. use textured quads. It was very easy to convert my class to a ID3DXSprite, but that just killed the performance totally; my software blitter could handle about 400 tiles as a decent 40fps (radeon 9700 pro + amd 1700+) but the ID3DXSprite reached the same framerate at about 200-250 sprites. I took the day of my hobby programming for some programming optimization courser yesterday and just finished my renderer using textured quads and got a decent speed; 400 tilesat 200fps. However, i fear that it isn''t enough; the tiles are untextured and no other game code has been written; game logic, animation system and pathfinding. I really need some tips here, ''cause i really like my idea, and i think it is a project that i could finish sincerely yours

Share this post


Link to post
Share on other sites
Advertisement
ID3DXSprite should be treated as a sprite blitter, not a sprite object. Make one ID3DXSprite and use it for all of your sprites. What you''re doing is like creating one device for each model you draw.

Share this post


Link to post
Share on other sites

  • Advertisement