portable version of game

Started by
9 comments, last by Bush 11 years, 3 months ago

Hello!!!
I have an interesting computer game. I want to create a portable version of this game (no installation), so users can play it without having to install (at work, for example!). What technologies for creating and using portable games do you know?

Advertisement

Not a Writing question. Moving to For Beginners.

-- Tom Sloper -- sloperama.com

If you want a single file for your users to click and run, perhaps you can look into tools like WinRAR that can create self-extracting .exe files.

This way it will silently extract to a temp directory, run the game and then clean up afterwards. I does work quite well unless the game is massive.

For UNIX you can do similar with something like makeself (http://megastep.org/makeself/).

This system pretty much works using any language, i.e you could include the whole java runtime or python environment. (Though it might be a bit large or take a tad longer to extract).

I did try it with Java and WinRAR a while back.. and it does work suprisingly well.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

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.

However if you want your game to be a single file it gets a bit more complicated.

You will have to use statically linked libraries (.lib files, not static linking of .dll's).

The resources will have to be added as actual ressource files by the linker or you just append them to your executable by using the copy command. I would prefer the second one, as mentioned before if you look for sfx archives you will find how they build their stub. The advantage is that code and resource compilation is not dependent on another. And if you're clever you will be able to remove appended ressources from you executable and replace them with new ones, no recompile neccessary.

If you thought to make a game without installation, I recommend to read a useful article in Wikipedia (at first) http://en.wikipedia.org/wiki/Portable_application + http://en.wikipedia.org/wiki/Portable_application_creators

I do not know the specifics of the game, so I can not advise sdk for creating this game

oh! I am grateful for the 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.

You can go one step further and make your application a single file, but its 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.

throw table_exception("(? ???)? ? ???");

More than a year ago, I created my first portable application.smile.png
Tip: you can find how to create portable applications on YouTube! (Search thinapp, boxedapp, cameyo, spoon)

Thanks, guys! At first I did not go that way! You have helped me! (I found the tutorials, to create portable application is easier than I thought)
Thank you all!

More than a year ago, I created my first portable application.smile.png
Tip: you can find how to create portable applications on YouTube! (Search thinapp, boxedapp, cameyo, spoon)

Yes, there are a lot of great tutorials! I use them! And I advise to you)

This topic is closed to new replies.

Advertisement