Jump to content

  • Log In with Google      Sign In   
  • Create Account


How does "insalling" a game work?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 BaneTrapper   Members   -  Reputation: 1121

Like
0Likes
Like

Posted 22 January 2013 - 08:31 AM

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.


Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/


Sponsor:

#2 MrDaaark   Members   -  Reputation: 3539

Like
1Likes
Like

Posted 22 January 2013 - 08:44 AM

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

Edited by Daaark, 22 January 2013 - 08:46 AM.


#3 BaneTrapper   Members   -  Reputation: 1121

Like
0Likes
Like

Posted 22 January 2013 - 11:51 AM

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.


Current projects:
The Wanderer, 2d turn based rpg style game

www.gamedev.net/topic/641117-check-up-the-wanderer/


#4 RedBaron5   Members   -  Reputation: 573

Like
1Likes
Like

Posted 22 January 2013 - 11:55 AM

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.


Edited by RedBaron5, 22 January 2013 - 11:56 AM.


#5 RobTheBloke   Crossbones+   -  Reputation: 2300

Like
1Likes
Like

Posted 22 January 2013 - 12:18 PM

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.



#6 MrDaaark   Members   -  Reputation: 3539

Like
1Likes
Like

Posted 22 January 2013 - 12:19 PM


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

Edited by Daaark, 22 January 2013 - 12:20 PM.


#7 stevo5800   Members   -  Reputation: 182

Like
0Likes
Like

Posted 23 January 2013 - 03:07 AM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS