You are here

how to create portable games

16 posts / 0 new
Last post
Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
how to create portable games

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

darksabre76
darksabre76's picture
Offline
Last seen: 1 month 3 weeks ago
Developer
Joined: 2011-04-19 23:28
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.

RobertMiles
Offline
Last seen: 2 weeks 5 days ago
Joined: 2012-12-27 07:27
You can search different

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

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
Yes, I was looking for such

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

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 4 hours 55 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
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?

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
I guess any variant is good.

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

RobertMiles
Offline
Last seen: 2 weeks 5 days ago
Joined: 2012-12-27 07:27
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.

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
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

RobertMiles
Offline
Last seen: 2 weeks 5 days ago
Joined: 2012-12-27 07:27
Here is a list of programs

Here is a list of programs that can be helpful.

http://en.wikipedia.org/wiki/Portable_application_creators
enjoy!

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
Thanks for this list!

Thanks for this list!

RobertMiles
Offline
Last seen: 2 weeks 5 days ago
Joined: 2012-12-27 07:27
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.

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
Thanks

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

Aram Kunar
Aram Kunar's picture
Offline
Last seen: 11 years 5 months ago
Joined: 2013-01-14 06:26
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.

Bazylio
Offline
Last seen: 4 months 1 week ago
Joined: 2012-12-20 09:46
Thanks, guys! So much useful

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

Aram Kunar
Aram Kunar's picture
Offline
Last seen: 11 years 5 months ago
Joined: 2013-01-14 06:26
executable file

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

RobertMiles
Offline
Last seen: 2 weeks 5 days ago
Joined: 2012-12-27 07:27
correctly

You understand correctly

Log in or register to post comments