Tuesday, October 18, 2005

C# Serialization

C# Serialization is great if you want to store your complete object graph in one file. For example lets say we have object A that is reference by both objects B and C. If you serialize B and C into separate streams you end up with A serialized twice, once for each stream. Now if I had used one stream for B and C then A would only be serialized once. This is how standard serialization works in most languages including Java.

Unfortunately, this doesn't fit well for reading/writing game resources where you have a lot of objects referencing each other. I would like to be able to save the objects in separate files and then when I load an object it will load the other objects as well. For example, if I load object B it also loads object A from a separate file. Now, if I load object C that has a reference to object A as well it will be pointed to the existing loaded object A instead of loading it again.

Trying to do this with the existing System.Runtime.Serialization namepsace is pointless because it doesn't give you enough control over the serialization of an object. This has primarily to do with the object type information being serialized as well. I have some ideas on how to implement this that I'll share if I get them to work.

Wednesday, October 12, 2005

C# Game Development

In the wake of the Vista and OpenGL issue I have been looking at C# the past month. Until recently, I had been doing development in Java because of it's multiplatform and has strong OpenGL support via JOGL. Using windowed OpenGL in Vista will incur a performance penalty since it is having to pass calls through to Direct3D. If developers need OpenGL 1.2+ they will have to drop out of WinFX and back to the older desktop. For full screen games this may not be an issue but for windowed application user will wonder what's going on.

With all that being said I have been looking into C# with Managed DirectX. I figure if I ever release anything it will only be run on a Windows OS so multiplatform isn't that big of a deal. Of course there is always
Mono. I could always go back to C/C++ but for a independent developer there is far to much is to be gained from a higher level language of you can get the performance. If I ever run into performance issues I could always interop into a C/C++ DLL. I've already had to do this to get high performance timers.

Tuesday, October 11, 2005

Who is this guy?

Who an I? I'm a system administrator by day and amateur game developer by night. I have been doing game related development "stuff" for 12 years. Never done any professional game programming because I think it would lose it's fun. Or maybe it's an excuse not to do it. Beyond spending time with my family I enjoy nothing more then to put on a headset, fire up a compiler and write some game related code for hours. If I'm not coding in my free time I'm usually playing a game. So, expect this blog to contain everything related to games from coding, design, industry, and playing.