Slow Code! Major problem, plz help!

Started by
12 comments, last by Gf11speed 22 years, 8 months ago
I have nearly completed my first major game, which I have been working on for 6 months now. However, throught the game''s development, I neglected to test it on another machine. Well today I tested it on two other machines and it was dirt slow! Definately not playable! So I come to ask for help... what exactly is making my code run so slow, and what could I do in my code to make my game run faster? I''m using C++, and DirectX. My system specs: 700Mhz,640MB RAM,Voodoo3 Test system specs: 800Mhz,128MB RAM, GeForce2 MX 450Mhz,64MB RAM, cheap/unknown video card It doesn''t make sense that it would run slower on the 800Mhz machine than it runs on the 400Mhz computer. Someone please help!!! I would greatly appreciate it. Thanks.
Greg FieldsSyntasoft Gameswww.syntasoft.comPost-Time Horse Racing (Available Now)
Advertisement
Is your game using Direct3D? I read somewhere that 3DFX cards take only a small performance penalty when changing states, far less than non-3dfx cards. Maybe that''s your problem?
If you are using D3D and you''ve hard coded it to use the voodoo3 (which is a secondary device), then when it runs on a non-voodoo machine it''ll use the software emulation mode - which is painfully slow.

You can only avoid this by using proper device enumeration.

Cheers

Matt

I saw you had 5 times more RAM on your machine. If your game needs more than the 128MB or the small overhead of Windows and your game need more than 128MB RAM. If that is so the comp would try to use the HD for extra mem (extreamly slow by up to 10x). That would definitaly slow down your machine. Just a thought. Hope that helps.


Tazzel3D - Zach
quote:Original post by sysmark
Is your game using Direct3D? I read somewhere that 3DFX cards take only a small performance penalty when changing states, far less than non-3dfx cards. Maybe that''s your problem?


I have a Voodo 5500 AGP on a 500 Celeron and it ''processes'' my D3D prototypes twice as fast as my 800 PIII using a ATI 128 Pro.

So my guess is state changes.

I have had to build a preprocessing graphics pipeline that orders all graphics primitives by state change BEFORE sending them to DX. On 3DFX boxes this slows down the frame/sec as there is more processor overhead, but on non-3DFX boxes the frame/sec actually increases, as there is less work the GPU has to do.



D.V.
D.V.Carpe Diem
The game is a 2D game, using just DirectDraw. However, the funny part is when I recently commented out the whole game, except the calculations of the FPS, and it still ran slow! That tells me that my code has nothing to do with it, that something else is the problem.

I also added another test system to the picture. I used a 400Mhz, 128MB RAM, 2D/3D Banshee card and it ran at around 60 FPS! Which is just a tad bit slower than on my 700Mhz.

So with this said, what is going on??????????????? This is weird...

Oh... could the initialization of many global variables be a part of it? I took out my code, but I didn''t eliminate the initialization of my global variables.


Thanks again.
Greg FieldsSyntasoft Gameswww.syntasoft.comPost-Time Horse Racing (Available Now)
You''re not using GetTickCount(), are you?

Johan Torp - http://www.destruction.nu
Johan Torp - http://www.destruction.nu
ok, here''s couple of thoughts.
ive noticed lots of people that finished
their software, just ship the final file (ahem.. Micro$oft)
anyway, why not remove (after youve completed the whole
debugging process to:

change from "Debug version" to "Release version",
what does that help you?
decreases LOTS of code -> smaller (sometimes i had 2mb->200k)
and a whole lot faster.

try it.

Gil
[email=gil@gilzu.com]Gil Zussman[/email]Check out Goose Chase, Coming this fall!http://www.gilzu.com
thorpe said:

"You''re not using GetTickCount(), are you? "

I am using this to calculate frame rate on my project, whats the problem with it?
“If you try and please everyone, you won’t please anyone.”
kingy, use timeGetTime(), it has a better resolution than GetTickCount().

This topic is closed to new replies.

Advertisement