• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Aliii

How can I ensure that my game runs on every PC?

18 posts in this topic

I compiled a 32bit exe using minGW/mSys on my PC(Win7 64 bit)

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!
0

Share this post


Link to post
Share on other sites
Is it the same computer running XP?

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
2

Share this post


Link to post
Share on other sites
Thanks!
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)
0

Share this post


Link to post
Share on other sites
[quote name='Aliii' timestamp='1351602255' post='4995389']
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)
[/quote]
No, you need to explicit create a OGL 3 context to use it.

Update the drivers on the XP machine. Are you using shaders ? Are you using ARB extensions ? Which one ?

Get [url="http://www.codersnotes.com/sleepy/"]very sleepy[/url], a very easy to use profiler which should pin down the bottleneck. Edited by Ashaman73
0

Share this post


Link to post
Share on other sites
[quote name='Aliii' timestamp='1351602255' post='4995389']
(I tried it under emulated XP on a machine with i7 ....it had 5 FPS ....weird)
[/quote]
Not at all. Emulating hardware accelerated graphics through software is often slow.
Try emulating another windows 7 machine inside windows 7, it will probably be slow as well. Edited by SuperVGA
0

Share this post


Link to post
Share on other sites
"No, you need to explicit create a OGL 3 context to use it."
...what does that mean?[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Now I just want to use the old functions(from GL 1.6). Im not using shader or extensions, just the basic functions.
0

Share this post


Link to post
Share on other sites
Aside from the fact that you do need to update your drivers, it could be that you are getting such a slow framerate because you are using OpenGL incorrectly, putting it into an invalid state.
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
0

Share this post


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

Share this post


Link to post
Share on other sites
[quote name='Aliii' timestamp='1351604824' post='4995404']
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.
[/quote]

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.
0

Share this post


Link to post
Share on other sites
[quote name='SimonForsman' timestamp='1351605333' post='4995407']
[quote name='Aliii' timestamp='1351604824' post='4995404']
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.
[/quote]

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 ....).
[/quote]

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:)
0

Share this post


Link to post
Share on other sites
[quote name='Aliii' timestamp='1351606908' post='4995420']
[quote name='SimonForsman' timestamp='1351605333' post='4995407']
[quote name='Aliii' timestamp='1351604824' post='4995404']
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.
[/quote]

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 ....).
[/quote]

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:)
[/quote]

... Sigh... But if it's emulated then [u]it won't matter much[/u] if it's a GeForce540 or a 3DFX Voodoo.
What makes you think that it shouldn't run with 1fps in emulated mode?
0

Share this post


Link to post
Share on other sites
Lol! This was the problem: I had a 256x257 texture, which is not OK for older GL versions.(Now it runs on 60-80 FPS on the laptop)
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.
2

Share this post


Link to post
Share on other sites
If you're making a game, don't worry about it yet, at some point you will get it out to testers and there will be platform and GPU and to a lesser extent even CPU related issues that crop up and would be very difficult to see in advance as a single programmer with limited resources and available test machines.
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.
0

Share this post


Link to post
Share on other sites
[quote name='Aliii' timestamp='1351638268' post='4995609']
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?
[/quote]

The simple answer is this: [u]you can't[/u].

"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 [url="http://www.opengl.org"]http://www.opengl.org[/url]), 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.
0

Share this post


Link to post
Share on other sites
> How can I ensure that it runs properly(or as much properly as it possible) on every PC?

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
0

Share this post


Link to post
Share on other sites
Even though you can't ensure it will run on everything, it sounds like your game is quite likely to run on most PCs, since you don't use many advanced features and it runs both on Win7 64 and XP 32.
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
0

Share this post


Link to post
Share on other sites
I find that discussion very interesting. I use an old computer for my development. That way I make sure my game will run smoothly on most computers, and perform awesomely on newest ones. My game runs at 100 frames a second or so on my PC. Was I ever pleased when I tested my game on my girlfriends PC. I had a whooping 2200 frames a seconds! And her PC is 3 years old, running Windows 7. Mine btw is 7-8 years old running XP. I think it just makes sense to use a slower machine to develop (and test the game periodically on other machines). Not only for speed but for video card features as well. I'm aware I'm not helping you with your immediate issue here, but wish you best of luck and patience in having your game runs smoothly on older machines. Cheers!
0

Share this post


Link to post
Share on other sites
There is a way to make sure you code runs on majority of pc's: use an engine. With a well written engine, most of the pc to game interaction is abstracted so that in order to make sure your game runs on a lot of pc's simply test an engine by itself to see how it handles different fallbacks in cases where a function is not supported etc. You can try to write such an engine yourself but to ensure system wide compatibility you would have to be very knowledgeable in multiple API's and be sufficiently knowledgeable of the particular OS that you're working on (even if the os is a part of windows family). So it's highly suggested to forgo building such an engine and use an already available one. I'm currently starting to learn Unity and so far loving every bit. Not only will your code most likely work on 95% of machines that support Unity (and it's been tested on millions and millions of machines by now) but you can also add a grantee* that it will work on Mac, Android, iPhone, Flash Player, and Linux starting in Unity 4. Not sure if it's the answer you're looking for since you probably want to stick with dealing with a raw API and doing everything in c++ but I'm simply saying that yes it's possible to a certain degree using certain tools. Edited by VanillaSnake21
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0