New Platform 12.0.5. Download or Buy on Drive
Over 300 free and legal portable apps including Xonotic (Mar 1, 2015) needs your help: Please donate today

how to create portable games

Bazylio - December 27, 2012 - 7:25am
Share on Facebook

Hello!!! I am looking for an answer to my question for a long time
I have a simple game for the PC (original language is C++). I want to make a portable version of this game (without installation), so users can play it without having to install (at work, for example!). What technologies for creating and using portable games do you use?
I would be grateful for any answers.

( categories: )

No game dev...

I know very little about actual program or game development, so take my answer as such. For a program to be practically portable from the word go, avoiding registry usage, or documenting registry usage well is a good first step. If you can use configuration files instead, all the better. Another way that you can make it easier to be portable is to put an installer option for such. Like instead of installing .ini files to the user's home folder, they would go to a folder called "config" or have that path settable in the initial install. I bet if any actual devs comment, they'll add more insightful things, but hopefully this is a good jumping point.

You can search different

You can search different libraries for developers. Have you thought about that?

Yes, I was looking for such

Yes, I was looking for such libraries. So I ask here: what the library can you recommend?

Just to clarify, are you

Just to clarify, are you looking at making an existing game portable, or are you programming the game and want the end result to be portable?

It's not a bug, its a feature.

I guess any variant is good.

I guess any variant is good. I do not know how to do it better? Any thoughts?

There are programs for making

There are programs for making portable applications. They can be used to create a portable game, browser or other programs (thinapp, for example).
Also, there are libraries for developers (boxedapp, for example). They are used for the development of portable software.

Thank you. And where I can

Thank you. And where I can find examples or tutorials? I found only how to use cameyo
looks well

Here is a list of programs

Here is a list of programs that can be helpful.

Thanks for this list!

Thanks for this list!

Useful information: To make a

Useful information:
To make a portable application, you just have to package everything into a single directory (which, itself, can contain sub-directories), and then use relative paths. Make sure to include all dependencies you might need, as you can't count on them being installed on the machine that the application is running on. For save-games and settings, you want to store anything that follows the user inside that directory (say, so that they can put the game on a USB drive and continue on a different machine), and any machine-specific settings or data in someplace like %appdata% -- say, video quality settings. In general, portable software is also written to assume that the user has no special privileges to the machine; this is good practice for all software, but is necessary for portable apps, as the user may not even have temporary admin rights, say, to install necessary dependencies like DirectX.

U can go one step further and make your application a single file (it is not necessary). If you wanted to do that, you'd need to write all your resources onto the end of your .exe file, and then take special care to read them back appropriately. Usually you'd first package the resources into something like a .zip file, and then append that file to the end of the executable; hen you can treat the zip file (which may or may not be compressed) as a sort of file system. This is kind of a neat approach, but its a fair bit of work and complication, without providing much benefit over the single directory approach.


Thank you, Robert! Very informative answer. I'm impressed. Thank you very much

If you want your application

If you want your application to be just copy-able (being able to copy the whole game folder to another machine and run it) you should make sure that all required resources and libraries are located in this directory.
On Windows settings should be loaded from %appdata% and if they can't be found they should be created with some default values that make sense.

Thanks, guys! So much useful

Thanks, guys! So much useful information! I understood that I need!

executable file

Robert, you mean that the application will run as an executable file?


You understand correctly