• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

making a game work on many OSes

Status
Not open for further replies.

gammaray

Senior member
like title says,

how the F do i make my video games work on, say;

windows 7 64
windows xp 64
windows xp 32
Fedora 15

(yes i got 3 HDs, and 6 partitions etc)

WITHOUT HAVING TO INSTALL THE GAME 4 TIMES

also, while at it, if i format one of those OS, how bloody hell can i play the game when i re install the said OS without re installing the game?

Stupid registry F$%^

thank you, it would be really appreciate if someone could point to a solution.
 
you can't... Not at least between Fedora and Windows. Each OS (especially Fedora vs Windows) has different methods of talking to the OS and getting resources. It's not like a Java program where you have a virtual runtime that translates it for each OS. As a result, each game is a different build that works for each OS. If it was between different version of Windows, it would be possible. Of course, you could always try to use Wine in Linux to use a Windows build....

If you want to reinstall an OS w/o reinstalling the game, then you need to install the OS, then the game, then make an image of that partition. Then do the reinstall with that image.
 
Last edited:
thx for replying,

+1 for the image.

but what about 3 different windows OS, do i have to install the game 3 times?

Also, couldnt MSFT develop a tool to tell the registry where a game is installed and add the entries into it automatically?

Or when we install a game, couldnt we have the possibilty to choose, like, install for your 3 (different OS) windows partitions ?
 
Depending on the game, you might be able to just link to the game executable in all three versions of Windows. Not all games need access to registry settings, while others will just create default settings if the registry entries aren't already there.
 
Registry is the least of your worries. Simply don't use it and create your own conf/ini file.

64 / 32 bit will require compiling separate binaries and dlls even for the same OS (eg: XP x86 and XP x64).

Take the least common denominator approach to the initial design (eg: don't do things that exclusively rely on 64 bit or Direct X and then expect an easy port to 32 bit and OpenGL). LCD is why most PC games today suck, they are basically console games that just happen to have a make file to spit out a PC .exe.

Avoid using as much OS API as you can. DLLs and SOs for example may be handled entirely different.

Use wrappers for everything platform specific that you cannot avoid. Use C runtime instead of OS native API as much as possible (eg: fopen calls NtCreateFile on Windows builds, etc). Don't use wglSwapBuffers or d3d->Present. Instead write your own API wrapper that calls mySwap() then write an implementation of that wrapper interface for all target platforms/apis.

Keep game code generic and separate from system level functions. The game logic itself should just be an abstract concept that runs blind in RAM on ANY platform regardless of a keyboard or video card even being present, and changing the build target just implies providing a audio/video interfaces, input, file io, and memory manager. The MVC pattern is useful for this... I should be able to "play" your game through telnet if you make the appropriate interface and attach it to a running game instance.

With proper design beforehand, you should be able to implement the game itself not knowing what platform it's on. Then think about the interface you need to use to communicate with the game world and translate that to info the player needs, whether it's showing HP and object coordinates in a command prompt or feeding that info the a fancy HUD that renders on DX11. Decouple everything from the game itself.

Keep your file system structure clean. Multi platform game binaries in the root, platform independent content in a asset tree. Quake 3 runs on pretty much anything, you just need the correct binary/app/whatever but the q3abase tree is just copied off the CD as is whether it's for Windows or Android.

That said, what you want is not possible. You will have to, at a minimum, copy or run the appropriate binary from the install path. Realistically, even that is a stretch, as you have file systems to worry about. Lot of good not having to reinstall the Windows version of the game does when it's sitting on a ext partition and Windows can't even access it.
 
Last edited:
He's not developing a game (I think); he just wants to install a game that will run on four partitions.

First thing I'd do is install the game in XP 32-bit. All the other OSes should be able to read that filesystem.

Second thing I'd do is to try to run the game from XP 64-bit and Win7. Just run the initial exe. It will either work or it won't. If it doesn't work, and you have space, try installing the game in a new folder on the XP32 drive from XP64 and Win7. Then find duplicate files and hard-link the heck out of them to save space.

In Linux, install on the Linux partition, ensure the XP32 partition is mounted for reading, then find duplicate files and soft-link the heck out of them to save space.
 
^ it may also work just as well to install to the same location (like D : \ GameName ) 3 times, once per Windows OS. Just make sure the installation location is not in Program Files.

Files might or might not be overwritten but either way the needed registry keys would be created for each OS.

Using the exact same folder instead of the hard links idea might cause problems on some newer games if the config / initialization file has any settings that are OS-specific. I don't know of any that have this, but it's a possibility.

Note though that a lot of games now still write saves to your Windows login document folder no matter where the game program is installed, and the documents folder is private to your Windows login and might not be readable by other OSs. You'd either need to find the config file setting that points there and manually change it, or copy saves out of that folder when you want to switch to another OS.
 
Last edited:
windows 7 64
windows xp 64
windows xp 32

Install it wherever. Go on each OS and click on game.exe. 99% of games work out of the box this way. You might need to copy or download some DLLs if it complains.

Plan B is to install it to the same place on each OS if it's a badly designed game which needs its registry entries or puts files in system folders.

Fedora 15

http://www.winehq.org/
 
Status
Not open for further replies.
Back
Top