59

If all you truly needed was the PNG file, chances are they just simply added the information into the file. This is actually a practice of Steganography. A lot of the times, this is used to hide payloads or secret messages in things that are seemingly public facing. However, it is likely in this case that this method is what was used. Typical Stegongraphy ...


51

The developer of Monaco actually made an excellent article on how both they and Spore accomplished this. The basic summary of what they do is fairly simple: Convert your data into binary Convert your target image into a raw bitmap Walk along the pixels of the image in some predictable pattern (they simply do left-to-right from the top-left corner). Write ...


27

I think not overthinking this issue will give the best results so I would just implement a simple key-value saving system into your game that you store along your other save data and then load on-demand when you need to access a previous state. The flow could look something like this: Load level from file Before placing a tile / object check if it has a "...


22

Windows (Xp and following) Based on: http://en.wikipedia.org/wiki/Special_folder http://en.wikipedia.org/wiki/Environment_variable These locations assume that Windows is installed on the C: disk. Append your own directory with game name or game company then game name to these directories. If you use Window 8 Metro-style application, you'll have to use a ...


21

Save the seed which you used to generate the world, and the modifications either as atomic "commands" or the results of those. Then when loading the saved game, you do the following: Procedurally generate the part of the world you're currently visiting. Apply the saved commands, or overwrite the generated elements with the saved ones. Update: And of ...


18

Looking at my disk, I have 1 game that saves savegames in %APPDATA% 1 game that saves savegames in %LOCALAPPDATA% 2 games that save "other stuff" in %APPDATA% 3 games that save "other stuff" in %LOCALAPPDATA% 2 games that save savegames in %UserProfile%\Saved Games 21 Games that save savegames and loads of other stuff in %UserProfile%\Documents, not ...


15

MacOS Based on: http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW1 common usage In unix-based OS, the ~ directory is automatically located at the user's home directory where user-specific data are located. This means ...


14

Sometimes you might want to store your savegame data somewhere else than on the users hard drive. You might offer a cloud save service, for example. In that case you would use SaveDataToMemory to create a savegame in a memory buffer and then send that memory buffer to a server via network. Another possible use-case could be to always keep the last savegame ...


12

Linux Debian (Ubuntu, Fedora, etc.) Based on: http://www.seul.org/~grumbel/tutorials/game_install/install_dirs-2.html http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html In unix-based OS, the ~ directory is automatically located at the user's home directory where user-specific data are located. This means that whatever the language, on ...


11

(1) Only save the really important bits, (2) only save them when they have changed since the last time they were saved, (3) save them individually, and (4) save them via an asynchronous system. Much of the world is likely to be static - that data doesn't need to be serialised at all, as it probably already exists on disk in some form. At the other end of ...


10

Encrypt it. It's really that simple. Since you're trying to discourage casual editing (rather than a dedicated hacker), the encryption algorithm could be fairly simple. There's no need for PGP or something. You could use ROT13. Or develop a substitution cypher of your own.


9

One easy-ish approach is to keep old loading functions around. You need only a single save function that writes out only the latest version. The load function detects the correct versioned load function to invoke (usually by writing out a version number somewhere in the beginning of your save file format). Something like: class GameState: loadV1(stream)...


9

Text files are a perfectly fine way to create savegames. It's easy to implement and it allows you as the developer to edit savegame files in a text editor in order to test things more quickly. But for easier parsing and better compatibility between versions, you might want to use a standard markup format like XML, JSON or YAML which you serialize and ...


8

Saving a procedurally generated world is the same as saving any tile map data. You would likely want to save the world in binary format, assuming the world is built out of different types of tiles, you will have to: Decide on the total number of different tile types.(depending on that you will need more or less bits to represent each tile) Define the width ...


8

The obvious solution is to send every player command to the server as it's made and have the server log them; that way, if the game is aborted for any reason, the logged commands can be replayed to restore the game to the point where it left off. Of course, when a proper save is made, the old command log can be thrown away (although you could also save it ...


8

I just write the body and shape values to a file. Then when reading them, I create a new body and shape and set the values to those read from the file. From what I've seen this works great. I haven't seen any strange behaviors or anything like that. Bodies that were flying through the air, continue to do so when the game is reloaded. The values I read/write ...


8

I would avoid using reflection for something like this, and use a language-agnostic tagged blob format, or something like this (just one possible method for entity serialization): Have an ISaveable interface with a method that produces an Entity given a hunk of save data, and produces a hunk of save data given an Entity. public interface ISaveable { ...


8

I downloaded and examined a few Spore creatures from Sporepedia. From those I learned that: The images contain no information in addition to the standard image data. The stenographic data have been stored with no consideration for the image, one could imagine that the transparent parts were used exclusively, but they are not. The storage use depend on the ...


8

You're assigning the value of money to the print return value, not the actual int value being returned. money=print(PlayerPrefs.GetInt("Money")); Should be money=PlayerPrefs.GetInt("Money");


8

As implied by the name, PlayerPrefs is mostly intended for storing config options. But it can also be abused to store savegame data, if that data is rather small. If you target platforms without write-access to a filesystem (like WebGL) then it might in fact be your only option to persist data without relying on external online services. However, if your ...


7

I am not familiar to the particular engine you are working with, but in most languages or cases you can use a 1xn matrix (i.e. a vector) where n is the total number of NPCs, that stores the 1-or-0 values, so the position within the vector is related to the NPC number. For instance, in pseudo-code: already_talked = {1,0,1...n} //where n is the total number ...


6

Include a version number at the top of your save file. Increment the version number whenever you make a change to the format, and add code to your engine to allow it to read "old" versions and make any necessary revisions to the loaded data. Of course you will have to decide what kinds of revisions are appropriate. In a case like your example, ...


6

The key phrase you're looking for is game state serialisation. Game state is what it says. Your game has some sort of structure to keep the current state of the game. In an RPG game, you want to store the list of quests the player is on, how far they are into those quests and what their characters' stats are. Serialisation is the reversible conversion of a ...


5

You can just use a binary format and write the data structure to the file itself. To verify you are opening a proper and uncorrupted file, add a "magic" string to the data structure and check the string each time it's loaded (this is just a simple way to do it). An example of how to do this can be found here. Encryption can also be added with little hassle.


5

I would also go for the ID solution. You should give every object in your whole world (not just on the current map) a unique ID. A 32 Bit int should be sufficient. Further every object can store a state value, also a 32 Bit int value. You can squeeze a lot of information into 32 Bit, e.g. you can make 32 flags out of it to store 32 bool values. Or you can ...


5

It's been a while since I used C#, but I think you can structure your class something like this: public static class Tile { public static enum TileType { Air, Stone } public static bool IsSolid(TileType tile) { switch(tile) { case Air: return false; case Stone: ...


Only top voted, non community-wiki answers of a minimum length are eligible