How can I ensure that my game runs on every PC?
#1 Members - Reputation: 401
Posted 30 October 2012 - 06:13 AM
It runs smoothly on my machine. I tried it on Win7 32 bit ...runs fine, but its not running on WinXP 32bit(x86 / x64). ....its running but it has 1 FPS:)
Its written in C++, Im not using any special tool or something except OpenGL and a few basic Winapi functions.
I had to link two dll-s statically, I dont remember which ones.
I have no idea whats wrong. Help! Thanks!
#2 Members - Reputation: 1325
Posted 30 October 2012 - 06:48 AM
If not, maybe the computer is just slow, and/or the graphics card sucks?
Even though your GL code might seem trivial, its very possible you do something that kills the performance on older cards.
To answer your direct question, it's basically "you can't".
Not every PC.
What you can do is decide on some minimum specification, and then make sure (with tests) that your code runs on this minimum specification.
Edited by Olof Hedman, 30 October 2012 - 06:51 AM.
#3 Members - Reputation: 401
Posted 30 October 2012 - 07:04 AM
The XP one is a different computer.
My PC(Win7 64bit, i5, openGL version 3.3) - produces above 300FPS
My laptop(WinXP 32 bit, Core2Duo, OpenGL 2.1) - produces 1FPS:)
(I tried it under emulated XP on a machine with i7 ....it had 5 FPS ....weird)
Im actually quite confused about GL versions. I guess the 3.3 is what my GPU supports but that cant be the one that the compiler uses cause Im using fixed pipeline functions.(Which were removed in 3.2)
#4 Members - Reputation: 4750
Posted 30 October 2012 - 07:14 AM
No, you need to explicit create a OGL 3 context to use it.Im actually quite confused about GL versions. I guess the 3.3 is what my GPU supports but that cant be the one that the compiler uses cause Im using fixed pipeline functions.(Which were removed in 3.2)
Update the drivers on the XP machine. Are you using shaders ? Are you using ARB extensions ? Which one ?
Get very sleepy, a very easy to use profiler which should pin down the bottleneck.
Edited by Ashaman73, 30 October 2012 - 07:23 AM.
#5 Members - Reputation: 880
Posted 30 October 2012 - 07:24 AM
Not at all. Emulating hardware accelerated graphics through software is often slow.(I tried it under emulated XP on a machine with i7 ....it had 5 FPS ....weird)
Try emulating another windows 7 machine inside windows 7, it will probably be slow as well.
Edited by SuperVGA, 30 October 2012 - 07:25 AM.
#6 Moderators - Reputation: 14301
Posted 30 October 2012 - 07:25 AM
Double check that there's no errors (add glGetError after every GL call in a debug build), and/or use tools like GLIntercept or gDEBugger to check for errors in your usage of GL.
#8 Crossbones+ - Reputation: 5345
Posted 30 October 2012 - 07:34 AM
Do you check ::glGetError() religiously?
If the reason for that is because you are just doing something not supported by the OpenGL 2.1 core, in which case upgrading drivers is all you will need to do.
It could also be that you are simply not using OpenGL correctly period, but the drivers for nVidia accept some things ATI’s don’t and vice versa, so it works fine on one machine and not another.
In which case you should use gDEBugger to find out what it is.
It could also be that one driver is better at optimizing away redundant states than the others.
Do you manually optimize away redundant states? This should be one of your highest priorities.
And to answer the topic line, there is no way to make such a guarantee when using OpenGL. Vendors for Windows focus on getting their DirectX drivers right, often just doing the bare minimum to get OpenGL drivers working. Their levels of optimizations, features, and bugs varies widely between vendors and you are nowhere near guaranteed to get the same results on every machine no matter how closely you stick to the spec.
L. Spiro
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#9 Members - Reputation: 401
Posted 30 October 2012 - 07:47 AM
To give more info: I compiled the app on my laptop. It worked both on my PC and laptop. I took the code and complied it on my PC, ....and now that exe from that same code is not working under XP properly.
I was not checking for errors cause the most advenced stuff im using is display lists and 2D textures.(Not even glut i think, ...i cant check it now, im at work:))
I also tried to replace the gl headers with the ones from my laptop but it made no difference.
#10 Members - Reputation: 3830
Posted 30 October 2012 - 07:55 AM
Thanks!
To give more info: I compiled the app on my laptop. It worked both on my PC and laptop. I took the code and complied it on my PC, ....and now that exe from that same code is not working under XP properly.
I was not checking for errors cause the most advenced stuff im using is display lists and 2D textures.(Not even glut i think, ...i cant check it now, im at work:))
I also tried to replace the gl headers with the ones from my laptop but it made no difference.
does the laptop have dual GPUs ? (Intel + AMD/nvidia) and if so, did you update the drivers for both the Intel and the AMD/nvidia GPU ? it is unfortunatly not uncommon for laptops to ship without OpenGL drivers for some reason (Which causes Windows to fall back to a software driver (which supports OpenGL 1.1 but really is slow as ....).
Also , make really sure that you didn't put opengl32.dll in your programs folder.
The voices in my head may not be real, but they have some good ideas!
#11 Members - Reputation: 401
Posted 30 October 2012 - 08:21 AM
Thanks!
To give more info: I compiled the app on my laptop. It worked both on my PC and laptop. I took the code and complied it on my PC, ....and now that exe from that same code is not working under XP properly.
I was not checking for errors cause the most advenced stuff im using is display lists and 2D textures.(Not even glut i think, ...i cant check it now, im at work:))
I also tried to replace the gl headers with the ones from my laptop but it made no difference.
does the laptop have dual GPUs ? (Intel + AMD/nvidia) and if so, did you update the drivers for both the Intel and the AMD/nvidia GPU ? it is unfortunatly not uncommon for laptops to ship without OpenGL drivers for some reason (Which causes Windows to fall back to a software driver (which supports OpenGL 1.1 but really is slow as ....).
It has a single integrated ATI, ....i couldnt find proper drivers for this card, only some hacked "Omega drivers". ....thats what it uses now.
It shouldn have 1 fps even if its software rendered. An another laptop(emulated XP) with i7 and GeForce540 produced 5FPS. Theres something really wrong there:)
#12 Members - Reputation: 880
Posted 30 October 2012 - 08:45 AM
Thanks!
To give more info: I compiled the app on my laptop. It worked both on my PC and laptop. I took the code and complied it on my PC, ....and now that exe from that same code is not working under XP properly.
I was not checking for errors cause the most advenced stuff im using is display lists and 2D textures.(Not even glut i think, ...i cant check it now, im at work:))
I also tried to replace the gl headers with the ones from my laptop but it made no difference.
does the laptop have dual GPUs ? (Intel + AMD/nvidia) and if so, did you update the drivers for both the Intel and the AMD/nvidia GPU ? it is unfortunatly not uncommon for laptops to ship without OpenGL drivers for some reason (Which causes Windows to fall back to a software driver (which supports OpenGL 1.1 but really is slow as ....).
It has a single integrated ATI, ....i couldnt find proper drivers for this card, only some hacked "Omega drivers". ....thats what it uses now.
It shouldn have 1 fps even if its software rendered. An another laptop(emulated XP) with i7 and GeForce540 produced 5FPS. Theres something really wrong there:)
... Sigh... But if it's emulated then it won't matter much if it's a GeForce540 or a 3DFX Voodoo.
What makes you think that it shouldn't run with 1fps in emulated mode?
#13 Members - Reputation: 401
Posted 30 October 2012 - 05:04 PM
I tried the recommented tools, Gdebugger and VerySleepy ....they are awesome. Thanks!
BTW the original question is still open. How can I ensure that it runs properly(or as much properly as it possible) on every PC? What should I link statically? What dll-s should I put or not put in the games folder? Im not much less clueless about that.
#14 Members - Reputation: 496
Posted 05 November 2012 - 03:34 PM
These are bugs, to be solved later, don't let them slow you down now. Typically unless you are doing something really really wrong you will find it faster by just continuing to forge ahead, and by the time you do have to solve these bugs you will know your code inside and out and be a better programmer more apt to deal with these types of issues.
-Aeramor
Technical Director at Emerge Digital
#15 Members - Reputation: 4032
Posted 06 November 2012 - 06:34 AM
BTW the original question is still open. How can I ensure that it runs properly(or as much properly as it possible) on every PC?
The simple answer is this: you can't.
"Every PC" covers an enormous range of hardware and software configurations, from the most basic and primitive to turbo-charged gaming PCs and workstations, and all points in between. It is just not possible to write a program that is guaranteed to run on all of them.
OpenGL is not software. If you want to run fast and run well you are entirely at the mercy of the hardware installed on a PC; if that hardware is horrible then you just won't run fast or run well; you're lucky if you run at all.
As you've just discovered, OpenGL can be capable of emulating certain features in software, depending on the driver, but - as you've also just discovered - this is often not a desirable state of affairs.
OpenGL may have a reputation for being easy, but that doesn't mean that you get to skip reading documentation. So you need to grab an OpenGL spec (available on http://www.opengl.org), read it, understand it, know what you can do and what you cannot do, know what causes errors and what doesn't.
What your objective should be is to pick a reasonable baseline, declare that you're not even remotely interested in supporting anything below that baseline, then make that your target hardware requirement. There's no point in picking a fight that you can't win, and "run on every PC" is such a fight; choose reasonable and achievable objectives instead.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
#16 Members - Reputation: 114
Posted 13 November 2012 - 04:05 PM
You test your product on as many different system types that meet your minimum specifications as possible. Since testing costs money, you might make do with testing a few representative systems, and then you open it up to Alpha users, who expect some risk in return for free gameplay.
This will provide some level of assurance, however, non-trivial software always has bugs.
Edited by CuriosityKills, 13 November 2012 - 04:08 PM.
#17 Members - Reputation: 2010
Posted 13 November 2012 - 04:26 PM
One thing you probably want to test is running it on a machine that doesn't have any development tools installed, to find out what libraries might be missing. If you discover something that doesn't work, you can create an installer that includes the necessary libraries, or try to link them statically.
Edited by Erik Rufelt, 13 November 2012 - 04:26 PM.
#18 Members - Reputation: 175
Posted 17 November 2012 - 01:52 PM
#19 GDNet+ - Reputation: 114
Posted 18 November 2012 - 02:52 AM
Edited by VanillaSnake21, 18 November 2012 - 02:53 AM.
Time flies like an arrow; fruit flies like a banana.






