Jump to content
  • Advertisement

Archived

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

Drizzt DoUrden

Game Speed - Just Curious

This topic is 6024 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

I was just curious as to why when I make a small game like Pong, its incredibly slow, yet Baldurs Gate can draw 25 2D character bitmaps and very detailed backgrounds and it still runs pretty fast on my 200mhz cpu? The only logical reason I could think of is assembly, but I mean... how much of a difference could it really make? I've been thinking about this since I started OpenGL, and I never really had the chance to ask anyone (I don't know anyone who knows the answer), so here is the big question for those who know. Also, why is it that 3D applications run faster than 2D ones? Is it because of my video card? Thanks for any responses. Edited by - Drizzt DoUrden on December 17, 2001 9:23:06 PM

Share this post


Link to post
Share on other sites
Advertisement
it probably doesn''t have [much] to do with assembly... they are just better programmers than you (hey, don''t get mad, they''re better programmers than me too).
i heard that newer video cards are concentrating on 3D a lot, and newer ones either don''t, or soon won''t (i don''t know because i just read this in some other forum) support hardware 2D crap. i guess you can tell that i am no expert in this...

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
But I mean... my code resembles the code of who I learned from, the books I have read. I cannot see how different forms of organization could make my code so much slower than someone elses.

Share this post


Link to post
Share on other sites
What resolution are you running your pong game in? Most games like Baldur''s Gate run in 640x480 mode; I know Starcraft does. Also, having some real big picture would slow down your game since it absolutely blows away your fill rate.

Share this post


Link to post
Share on other sites
Those games are highly tuned. If you asked a professional to rewrite your pong game you wouldn''t even recognize it afterwards.

------------
- outRider -

Share this post


Link to post
Share on other sites
you say you are using opengl, yet you mention how baulders gate does fast 3d graphics. maybe its just me, but you are using the wrong api. also baulder''s gate if i remeber correctly ran in 8bit pallette mode which is MUCH faster then 16bit or higher. also since this is an older game, it most likly used dos for direct VRAM access.

so if you want to get comparible speed. you must:
1. use directdraw7
2. dont EVER read from VRAM
3. keep the resolution to 640x480
4. keep color depth at 8bit

that should be a good start.
the main reason 3d apps run faster, is because the 3d accelartor have more percieved video bandwidth due to archtecture. since when filling in the polys nothing except the triangle information and textures go across the bus. if done properly this transfer of data is only for the vertices required for the screen with some extras while the textures are kept in VRAM. now the card does all VRAM access internal across its own bus and does not have to go over the reletivly narrow apg/pci bus. this is why high res games are possible using 3d accelerators vs using software rendering which requires transfer the entire screen to the video card. you could of course make 2d apps that run faster then the 3d counterparts if you do many direct access effects which require messing with the video data at the pixel level which is limited on 3d hardware (pixel shaders are somethign entirly different and currently will not allow many effects possible in a pure software mode).

krez, video cards stopped increasing support for hardware 2d stuff awhile ago. which is why directdraw never got alphablending and rarly was updated (technically directdraw4 supports alphblending, but thats a special release meant for wince pdas). this is also why microsoft stopped including directdraw in directx8 since there was no need (just query for directx7 and you are set).

Share this post


Link to post
Share on other sites
My guess is because they have a large team of very experienced, highly paid developers working on it around the clock, with access to little tricks learnt through years developing software.

Share this post


Link to post
Share on other sites
quote:
Original post by a person
maybe its just me, but you are using the wrong api.


Not to start another (X vs Y) flamewar, but yes, it''s just you.

Seriously, Drizzt - there''s a lot of things you can do wrong in OpenGL. Some really silly things such as only setting rendering states as little as possible, grouping similar primitives, changing texture bitdepths, and setting low-quality high-speed rendering options can help more than you think.

Sometimes, also, you''ll find that certain primitives are just too slow. Are you using textured quads to draw bitmaps, or are you using the pixel transfer functions? If the answer is the latter, try moving to the former!


People might not remember what you said, or what you did, but they will always remember how you made them feel.

Share this post


Link to post
Share on other sites
quote:
Original post by a person
you say you are using opengl, yet you mention how baulders gate does fast 3d graphics. maybe its just me, but you are using the wrong api. also baulder''s gate if i remeber correctly ran in 8bit pallette mode which is MUCH faster then 16bit or higher. also since this is an older game, it most likly used dos for direct VRAM access.



Baldur''s Gate isn''t that old. It used DirectX.

Share this post


Link to post
Share on other sites
Yeah... there are so many minor mistakes or oversights a programmer can make, so that code looking very similar can actually execute a lot more slowly. If Pong is running slowly, I am sure you have done something ''wrong'' somewhere

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!