• Advertisement
Sign in to follow this  

portable version of game

This topic is 1824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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? 
 

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


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

Share this post


Link to post
Share on other sites

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!

Share this post


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

Edited by termintator2012

Share this post


Link to post
Share on other sites

I really found a lot of useful information and videos. Thank you all!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement