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


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


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


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

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


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

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");


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


5

A simple way to achieve a semblance of versioning is to make sense of the members of objects you are serializing. If your code has an understanding of the various types of data to be serialized you can get some robustness without doing too much work. Say we have a serialized object that looks like this: ObjectType { m_name = "a string" m_size = { 1.2, ...


5

From your latest comments, it looks like you're trying to save/restore all the internal simulation state inside Bullet (overlapping pairs, contact points, etc.). This sounds... daunting! Another idea: Every frame, remove and re-add all your dynamic objects. Obviously, this is hugely bad for performance, but you indicated that you don't have many dynamic ...


5

Gameplay Design Technically, it depends on the style of gameplay you are designing. In some game genres, it is almost explicitly expected to have certain "save types". For instance, in online casual flash adventure/RPG games, you will often save every tiny change into a cookie so if the player accidentally (or intentionally) closes the browser, the ...


5

Your hunch is pretty much spot on. Games like skyrim will save the orientation, speed, and all other physics for each object. Some games will speed this process up by skipping over distant object and simply replacing them to their starting position. Games appear to be quick about it because they use multi-threading. This means the game can be running while ...


4

A window handler should not be an entity property. As you said it will be retrieved every startup. So no need to store it as property. Store the handler in a subsystem responsible for dealing with windows. Your meshes: the entity properties should contain everything to recreate the meshes, but not the meshes themselves. Read the necessary data from the ...


4

Two pieces. First, it's handy to have an idea of "archetypes." This is some data that defines a type of game object and which components it has and what their data is. For instance, you might have data file like: Player: Sprite: image: character/players.png Physics: size: [2,2] center: [1,1] PlayerController AudioListener Health: ...


4

You could develop your own SOAP or REST API, host it on a website and have your apps connect to that. You'd have full control over it and wouldn't have to pay for anything (other than hosting, of course). There is more of a development cost up front than using some kind of pre-built package, but you have the control to scale as you need to and make the API ...


4

The toString() part on its own doesn't seem so bad. I think one way of handling the re-loading of the objects would be through use of Reflection. // an example of a forName argument: "java.util.Map" Class loadedObjectClass = Class.forName(xml.getElementValue("clazzName")); Object loadedObject = loadedObjectClass.newInstance(); I'll also note some people ...


4

Unique identifiers are a good option. However, they don't need to be used in game, only when writing and then reading the data from a save. Hopefully you'd already have some way to differentiating between entities you can use, otherwise you can make something up (typically an int or long) Pick a unique ID for each entity, then proceed to writing the ...


4

Simple Answer Use a class to load the original prefab from Resources.Load(string prefabPath, typeof(GameObject)); Store this returned prefab into a resource pool class by path key. For instance: Dictionary<string, GameObject> prefabLookup; You can then grab the original prefab anytime you need it. Use a helper method to automatically load at ...


4

The client side asks the service "Am I allowed to keep playing with you?" every five seconds and the server responds with true or false. You store the date value that represents the last time the player "pinged" the service. Also store a single session key that is randomized and sent to the client upon logging in or at the beginning a game (if no login is ...


4

I don't care to recall the number of games I've had to start over after a backup/restore or similar thing because I moved all my important files from my documents, but totally forgot about user application data such as save files because it's often in with the program files or other weird places (like in a hidden folder such as appdata). Personally for ...


4

If the data's small, just use a text format like XML, JSON, CSV, or your own flavour. If OTOH the data is massive and/or private and/or size / parse speed important, then binary's probably best. You will need to create a binary data format / layout to be used. This would denote a byte array of a certain size and which bits therein are used for what, e.g you ...


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