Rendering tiles in Map Editor w/DX8.0, are frame rates low?

Started by
3 comments, last by flareman 19 years, 10 months ago
Okay good people, some help here... I''m stumped I was coding a 2D FFlike RPG same months ago, but I had to stop. It is to run in 640x480 fullscreen with 32x32 tiles - I wrote a preliminary gfx engine and tried to run some test drives, but the frame rate was abysmally slow on my PII350... we''re talking about 20x15x4=1200 tiles per cycle, multiplied by two triangles per tile, that gives us almost 2500 polygons per frame... the fps was terribly low (note that the engine also implemented animated tiles, and when these were used, the framerate dipped even lower)... I am perplexed; how is it that a simple 2d tile map editor performs so awfully while other applications, using tons of 2d graphics run at full-speed? Note here that I didn''t use anything like ID3DXSprite8 or sth similar, I coded the rendering routines w/ buffers and all the whistles and bells and optimized where I could... any ideas? (Sorry I can''t post any code now, it''s pretty messy in my archive and I don''t especially savor the idea of diving in there yet Thanks in advance, Flare -----------<<>>----------- Flareman (a.k.a Ga1adaN) Primus ante Adain flareman@freemail.gr -----------<<>>------------
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------
Advertisement
check your harddrive space and memory usage when the program is running. i was doing a tile thing a while back and accidently had it creating new textures every frame and not freeing them. completely filled my memory and harddrive space.
-------------------------------See my tutorial site: Click here
The first thing that comes to my mind is put all your tiles into one big texture, instead of having lots of little 32x32 textures - if you''re not already doing that. This way you don''t have to change your texture for each tile, something that could be very slow. I''m working on 2d stuff right now, and I''m making it so that all the tiles for each layer have to come from one texture. I don''t have any numbers to give you, but it''s plenty fast.
Will check hdd space and memory, even though I doubt I''ll fing anything, I had checked the code for such leaks a gazillion times back then... as for textures, done already chief all tiles are in one big file, exactly so that each layer has one big tecture resource, whence tiles are pulled at rendertime by using vertex buffers with the right U-V coordinates... for some unknown reason, when the layers go above 2 or 3 the program goes ga-ga - and I can''t reliably use me current AthlonXP1.8 cause it''s a processing beast and if the program doesn''t lag it doesn''t guarantee fast execution on lower-end machines...

Thanks though any other suggestions?
Flr

-----------<<>>-----------
Flareman (a.k.a Ga1adaN)
Primus ante Adain
flareman@freemail.gr
-----------<<>>------------
-----------<<>>-----------Flareman (a.k.a Ga1adaN)Primus ante Adain[email=flareman@freemail.gr]flareman@freemail.gr[/email]-----------<<>>------------
ID3DXSprite is your friend.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

This topic is closed to new replies.

Advertisement