Archived

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

MatuX

DirectDraw slow?

Recommended Posts

MatuX    122
I''m an amateur game programmer in Argentina which began (along with my team) the production of an isometric MMORPG using DirectX 7, I saw your article named "Optimizing DD: A Short Overview" from a Google.com cache (those guys are incredible, every site listed I have found it was cached version of it), and I have to say that I got somewhat shocked. At first I thought, this guy has to be crazy, but after reading what you had to say it seemed pretty logical. I have been reading everywhere about not reading from video memory, sometimes I read things like "NEVER (put a LOT of emphasis in never) read from video memory" or that kind of shocking stuff, but no body says why, or at least what actually they mean with "reading video memory". Ok, I won''t do it, it''s slow, but, what about dynamically modifying surface memory to get blending effects such as dynamic lighting? If I use system memory it''ll be slow, but if I use video memory, I can''t read it so I can''t make the equations! I reached a dilemma, so, I ask you to help me on my trip We plan to add anti-aliasing and full featured dynamic lighting in the game, ala Fallout Tactics, but, what would be the best way to achieve this in an optimal performance? After watching all this, I can''t think of anything... Hope you can help me. Here is the google.com cache of what I readed: http://www.google.com/search?q=cache:GpT47ZhHVEM:members.nbci.com/dxfaq/Articles/ddraw/dd_opt_over.html+lock+surfaces+video+memory

Share this post


Link to post
Share on other sites
Null and Void    1088
I''d highly advise using OpenGL or Direct3D to do graphics if you need effects like those, they''d be a whole lot faster. But, if you insist on using DirectDraw, modify the data in system memory, then put it in video memory and blit from there. This is, of course, assuming you don''t update the data every frame, that will be insanely slow no matter what you do with DirectDraw (but would be completely reasonable in a 3D API).

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
MatuX    122
I would certainly make it full 3D, but the fact that we live in Argentina, the market we''re targeting doesn''t have good computers (it''s our second project, we certainly can''t target America, Europe or Japan, for example), and our 3D skills won''t allow us to get something good in a logical amount of time. So, that is why we''re attaching ourselves with DD, at least for now.

Fallout Tactics, specifically (the goal we set for the graphics engine) implements a dynamical lighting engine with real-time blending, ie. you can see how a burning barrel modifies the surrounding scene every 1/2 second, I also noted it isn''t per-pixel but a well-done per-tile based dynamic lighting.
The game performs pretty well even on my dad''s Pentium 2 233Mhz 32mb SIMMs and an AGP 1x SIS6326 with 8mb.

Share this post


Link to post
Share on other sites
MatuX    122
I just thought about making an off-screen buffer (something like a framebuffer) that would hold the entire map blitted, then, you just need to copy the contents of the framebuffer to the backbuffer everytime you scroll and if you modify the blending, say, you turn on a light or light a fire, it just update the needed rectangle and done.
You would just need to handle character animation in a real-time way. But you wouldn''t have the nice burning-barrel effects or the ultra-fast Baldur''s Gate fade to rainy weather.

I''m still not convinced...

Share this post


Link to post
Share on other sites