conversion of program state into a storeable format

learn more… | top users | synonyms

0
votes
1answer
41 views

Creating Entities from Identifiers (C#)

I am writing a game in C#/XNA. Often, it's useful to have a function like this in a game engine: Entity CreateEntity(string id, Vector3 location) { ... } So that, for instance, you ...
0
votes
0answers
8 views

Java Serialization and references [migrated]

Say I have a serialized class that is used to save the state of my game. This serialized text is stored in a text file. If I restart my computer, reinstall java, etc. If I try to deserialize that ...
0
votes
1answer
49 views

Unity Player Prefs Deserialization not working in web build but is working in the editor

for some reason i can deserialize in the editor just fine with player prefs but when i make a web build it simply doesn't work. and since there's no real console log, i can't get any useful feedback. ...
1
vote
0answers
43 views

XNA and Json.Net - Recognizing types when deserializing with inherited classes [closed]

The title may seem a bit confusing, so let me explain. I am using Json.Net and XNA. I have an entity class, that has a virtual update method. I also have a class named Monster, which inherits the ...
2
votes
1answer
77 views

How do I serialise a mesh to a text file?

I'm building a game engine in OpenTK (OpenGL for C#). Is it ossible to take a terrain mesh (in any format) and convert it into a text file (or a really small character-filled file, no more than a few ...
0
votes
0answers
61 views

How to replace reference to an object by content ID in binary serialization?

So here is the thing, the project has lots of logical objects, fed by data objects, data comes from serialization of yaml assets, containing model properties, like how fast a troll walks and such, ...
0
votes
1answer
1k views

Binary Serialization of C# for GameObject in Unity?

I'm trying to serialize a GameObject (with children and textures) using the binary serialization for C#. It works with many data types but not with GameObject. In the docs it says should be ...
8
votes
3answers
322 views

How can I handle versioning changes when saving assets?

I've been working on an RPG now for a while and I use two of different serialization techniques. Enemies, Weapons, items are as saved as XML. Maps and events are saved as "controlled binary" (every ...
1
vote
1answer
72 views

How do I implement references or relations for entities within a serialized savegame?

I have a 2D tile based RPG for which I'm developing save game function. In particular, I'm trying to save this structure: A caster can have multiple buffs that he maintains. Each buff can have ...
1
vote
1answer
228 views

XNA Monogame GameState Management not deserilaizing

I am having some trouble serializing/deserializing in a little game I am doing to teach myself monogame. Basically, I am using the gamestatemnanagement resources common to monogame (screen manager ...
2
votes
1answer
340 views

libgdx default saving mechanism for box2d world

I want to save my game in libgdx, and I have no problem using Kryo to save everything, except the box2d Worlds and the RayHandlers from box2dlights - these are not Serializable and do not have default ...
1
vote
5answers
488 views

How to correctly aggregate networked data into UDP packets while avoiding fragmentation

I am starting to get my feet wet with game networking, having iterated many times now on some simple 2D games. For learning purposes, I've read the fantastic Gaffer on Games networking article a ...
0
votes
1answer
245 views

Where to save enemy positions in C++?

I'm wondering how and where to save the positions my enemies should spawn. My idea was to use a struct such as: struct enemy{ int x,y,type; } And save an array of it in a .dat with fwrite() ...
6
votes
2answers
313 views

How do I duplicate a Box2d simulation, mid-simulation?

I want to serialize the state mid-game, send it over the network to an identical computer (same CPU, same OS, same binary), load it there, and have the two games run in tandem doing the exact same ...
21
votes
3answers
2k views

Should I use text files for my save data?

My question is whether or not I should use text files to save my game data. I have some basic concerns over doing this: There's really no way to protect the data, and thus, the user could screw up ...
2
votes
1answer
184 views

Advantages And Disadvantages Of Resource Serialization

A good example is let's say I'm making a pong game. I have a PNG image for the ball and another PNG image for the paddles. Now which would be better, loading the PNG images with a PNG loader, or ...
1
vote
0answers
216 views

DRY 0-bandwidth-overhead-serialization in C#: virtual, delegates or reflection? [closed]

I'm (de)serializing some datastructures for a network-multiplayer game, and for each datastructure that's to be (de)serialized, I want to define the order of (de)serialization only once for ...
0
votes
1answer
492 views

C++ formatted serialization [closed]

I've decided it's time to implement serialization in my simple engine but this has caused me many headaches for the past couple of days/weeks. My engine uses an entity/component based approach similar ...
6
votes
2answers
563 views

Networking Questions: Serialization and Frequent Small Packets or Fewer Large Packets

I'm working with a socket server and I'm trying to decide how to update all of the clients. I'm currently sending few packets with entire objects serialized in JSON. In most cases this adds a lot of ...
11
votes
8answers
3k views

Converting a 2D curve into points for data storage

I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database. The method is simple: it moves three points in equal steps ...
0
votes
0answers
99 views

Sceneview Lags when using Arrays

I'm getting a strange behavior here - when i create a simple C# script which holds an Array of classes, where both, the script class and the array classes, are marked as Serializable, my sceneview ...
2
votes
2answers
359 views

Seeking an C/C++ OBJ geometry read/write that does not modify the representation

I am seeking a means to read and write OBJ geometry files with logic that does not modify the geometry representation. i.e. read geometry, immediately write it, and a diff of the source OBJ and the ...
1
vote
1answer
243 views

How do I implement Unreal-like object serialization?

Recently, I've been working on the core of my engine, and as I'm moving forward I find myself developing throwaway code to read files and simple data into the engine. This got me thinking about how I ...
1
vote
0answers
133 views

Saving/loading code structure [closed]

I have a tree of game entities composed of components. I want to save/load everything to xml file, where my saving/loading code must be located: Scene class containing root node and functions ...
0
votes
1answer
383 views

Multiplayer Game Data Serialization Problems

I want to create a simple game that can be played with one to two player. I plan on using TCP sockets, Farseer Physics, XNA, a BinaryFormater and a Memorystream. as far as i know i can't do the ...
8
votes
1answer
1k views

Why does XNA's ContentManager follow generic type parameters for serialization purposes?

I've finally gotten to the bottom of a problem and am wondering what my best recourse is. In short, the problem is that XNA's ReflectiveReader reflects into generic type parameters, even if no ...
20
votes
6answers
14k views

How do I create a save file for a C++ game?

I am coding my final for a Video game Programming course, and I want to know how to create a save file for my game, so that a user can play, and then come back later. Any idea how this is done, every ...
1
vote
1answer
462 views

Deserialize inherited classes into the same list in XNA

I am writing a Gui for a game (for what else ...). Therefor I wrote a class GuiElement which has some serializeable fields. From this class I deflect a Class "Button" which has one serializeable field ...
6
votes
5answers
1k views

What is Serialization?

I have been around programming for a while as a hobby, but I did not start seeing this concept until recently. I have google'd "what is serialization" numerous times, but I never actually get any sort ...
11
votes
8answers
17k views

What are good solutions for serialization in C++? [closed]

I'm curious what solutions game developers have come up with for serializing the different types of data that they deal with for their games. Do you guys use some monolithic GameObject hierarchy that ...