Jump to content
  • Advertisement

Archived

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

Gf11speed

Slow Code! Major problem, plz help!

This topic is 6166 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 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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

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!