Game Speed - Just Curious

Started by
30 comments, last by Drizzt DoUrden 22 years, 4 months ago
because baldur''s gate was made in canada! that''s why it''s better...

seriously, as said before, the coders who worked on bd or any other professional game are GOOD. they spend a long time profiling their code, squeezing out every last drop of efficiency (ideally, this is not always the case).

also, any 3d application has a hugely more complex rendering pipeline then a 2d game. the processor (either cpu or gpu) has to do transformations and lighting for instance...2d is generally a straight blit. 3d also generally brings with it more complications especially in areas of lighting, collision detection, and animation (calculated in realtime).

and by the way, assembly does make quite a big difference, usually. it is most effective in getting the programmer to simplify and make more efficient their algorithms. you should try coding a huge switch statement in assembly...you might rethink it after a couple hours...

but why is your pong slow compared to a polished game? it could be your drivers, it could be the api, but likely if you are an inexperienced programmer you are not doing things very efficiently. i would suggest that if you are doing this as a learning experience, don''t worry. efficient code (in my experience) is generally not much fun to work with.

<(o)>
<(o)>
Advertisement
It could have nothing to do with graphics (even though you think it does). It could be that your game loop is out of sync and you''re spending lots of time idling...

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
For The Love of God:
BALDUR''S GATE ISN''T 3D.

I think I can say with authority, the performance difference between your SOFTWARE-RENDERED, VECTOR 3D Pong game and the RASTER-RENDERED, ISOMETRIC Baldur''s Gate is due to this fact.


Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Drizzt DoUrden said:
"I mean, my point is that Baldurs Gate was programmed to work on computers that are even under 200 mhz(thats what I have), and it is huge, so one small mistake in OpenGL shouldn''t really give me trouble to the point where I can''t move the window."

You can''t move the window? It sounds like your program
isn''t processing Windows messages often enough - if at all.
Make sure something like the following appears in the main
game loop:


TranslateMessage(&msg); // Translate The Message
DispatchMessage(&msg); // Dispatch The Message


If not, check out nehe''s OpenGL tutorials to see an example
of how to process Windows messages in an OpenGL game. They''re at http://nehe.gamedev.net/


Steven Borkman
Home Page: http://www.acsu.buffalo.edu
Video Game Page: http://www-student.cse.buffalo.edu/~borkman/projects/game/index.php
quote:Original post by Magmai Kai Holmlor
For The Love of God:
BALDUR''S GATE ISN''T 3D.

I think I can say with authority, the performance difference between your SOFTWARE-RENDERED, VECTOR 3D Pong game and the RASTER-RENDERED, ISOMETRIC Baldur''s Gate is due to this fact.


Magmai Kai Holmlor



LOL. My Pong game is 2D, too, thank you very much.

It moves the window, it just moves it incredibly slowly, and my frame rates are always low. I''ll figure it out some day. But I have a few questions:

Is it slower to load a 320x320 bitmap, or to load a bunch of 32x32 bitmaps untill it reaches 320x320?

How do "scrolling background" games work, when it comes to loading the background? Are there any tutorials on it? Or is it simple logic that I just haven''t made my way to yet?
------------------------------Put THAT in your smoke and pipe it
you do realzie that as said before. most old video cards dont support hardware opengl thus you are running the software renderer which is slow. just because you say your pong game is 2d, your are using a 3d api to create it. this is just plain stupid unless you know what you are doing.

DONT use glReadPixels() or glWritePixels() too slow for ANYTHING.
USE textured quads.
MAKE sure another opengl game runs on that pc at fast speeds.
use directdraw, much beter option for a 2d game on older hardware.
quote:Original post by a person
DONT use glReadPixels() or glWritePixels() too slow for ANYTHING.
USE textured quads.
MAKE sure another opengl game runs on that pc at fast speeds.
use directdraw, much beter option for a 2d game on older hardware.


I did use textured quads, I did everything anyone making a small 2D game in OpenGL would do. I did check other OpenGL applications, and even NeHe''s stuff runs alittle slow on my computer.

I''m not blindly walking into game development, as much as the posters here seem to think. I know what I am doing I just don''t understand why the outcome is the way it is if I am doing it right.

Anyway, I am going to make a Pong game in SDL and then remake on in OpenGL see which is faster, and see what I can learn.
------------------------------Put THAT in your smoke and pipe it
There''s no such thing as a 2D OpenGL game... You may only be presenting screen aligned quads - but the entire 3D pipeline is still being executed. The leanest 3D pipeline is about an order of magnitude more work than the fattest 2D rasterizer.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
From reading all your "symptoms", I''d say Guardian Light is right. Your card is probably not optimized for OpenGL. I have an old 3dfx voodoo card and it hates to see direct3d or opengl, but runs lightning quick in 3dfx, and since 3dfx is no longer with us, I think it''s time for a new video card


- Free Your Mind -
- Free Your Mind -
quote:Original post by brewknowc
I have an old 3dfx voodoo card and it hates to see direct3d or opengl, but runs lightning quick in 3dfx, and since 3dfx is no longer with us, I think it''s time for a new video card


Is it just me, or has nobody else ever heard of this lightning quick 3Dfx API?

This topic is closed to new replies.

Advertisement