How does "insalling" a game work?

Started by
5 comments, last by stevo5800 11 years, 3 months ago

Hello.

I was thinking, and it came to my mind.

How does "installing" a game work?

Lets say the game consists of this list:

GameName.exe (executable)

Folder

Folder\Images

Folder\MapData

Folder\SaveData

Folder\Fonts

Folder\Images\ Images needed for game

Folder\MapData\ .txt files that hold map data

Folder\SaveData\ .txt files that hold save data

Folder\Fonts\ .tft font files

What library would i need and what would i need to do.

If someone would be willing to provide a quick info or link to tutorial.

Advertisement
You can use one of many available install program builders, or something like WinRar's self executing extractors. Just make sure to program your game to save data correctly! It doesn't go in the program folder, it goes into the user's proper folder for saving program save data and settings.

You might like the NSIS system: http://nsis.sourceforge.net/Main_Page
Just make sure to program your game to save data correctly! It doesn't go in the program folder, it goes into the user's proper folder for saving program save data and settings.

Mhm... why would this be "correct" way to save data?

I know allot games do save "save files" in "my documents" folder or "my documens/Games".

Googling provided little info on this matter.

Just make sure to program your game to save data correctly! It doesn't go in the program folder, it goes into the user's proper folder for saving program save data and settings.

Mhm... why would this be "correct" way to save data?

I know allot games do save "save files" in "my documents" folder or "my documens/Games".

Googling provided little info on this matter.

Many people don't want to remove their savegames when they uninstall a game. Keeping them separate from the actual game folder provides an easy way to allow uninstall/reinstall without losing any savegames.

Edit: Also, I would highly suggest using NSIS as Daaark suggested. I've created multiple installers using it and the scripting is very powerful.

Just make sure to program your game to save data correctly! It doesn't go in the program folder, it goes into the user's proper folder for saving program save data and settings.

Mhm... why would this be "correct" way to save data?

I know allot games do save "save files" in "my documents" folder or "my documens/Games".

Googling provided little info on this matter.

Because you can only write to the "C:/program files" directory if your app has been granted admin privileges. Typically your installer will force windows to bring up a UAC dialog, and then you should write save games to "My Documents" (which any user is able to do). The player of your game is likely to get quite annoyed if a UAC dialog pops up everytime he/she saves a high score, config, or save game. Try googling "Windows 7 compliance" and you're likely to get better search results.


Just make sure to program your game to save data correctly! It doesn't go in the program folder, it goes into the user's proper folder for saving program save data and settings.

Mhm... why would this be "correct" way to save data?

I know allot games do save "save files" in "my documents" folder or "my documens/Games".
Googling provided little info on this matter.



Because it's not 199x anymore, and modern versions of Windows like to do things properly, and not assume the machine is being run by one user with root access to everything. We have proper user accounts now, and people should generally only have write access to their C:\Users\Username folders. As a side benefit of this, anyone can just grab their user folder to back up or move everything they need.

When someone else logs in, everything from their desktop settings, to their program save data in in their own user folder.

Shared data has it's own place too, for high scores, or whatever needs to accessed by everyone.

When you don't save in the proper locations, you are just making a big mess, and requiring higher levels of access. Windows will often make a shadow folder anyways, and make more of a complicated mess.

So you should learn to save to the proper locations!

*older windows version pre vista use the DOCUMENTS AND SETTINGS folder and not USERS, so there are shortcuts you can use to find the proper folder. Look on MSDN

+1 for NSIS, I recently got into it with a windows forms app I made. There's a few examples out there that could help you. You can pretty much install files anywhere on the system, create an uninstaller and you specify what you want to remove.

This topic is closed to new replies.

Advertisement