INI Based Settings in C#/XNA

One of my first issues to handle in this, the second phase of development for hades, has been how to store settings. Of course I could have gone an XML approach, but it is not at all what people are accustomed to – we like ini files. Section, Key = Value… NEXT! Well, while the horn may have sounded in terms of figuring this out, putting things into action is a bit more involved, but not too much so.

For those of you who have worked with Unreal or looked at the configuration files for most any linux application you likely found something similar to the following:

[Engine.GameInfo]
DefaultGame=Fulcrum.FulcrumGame
DefaultServerGame=Fulcrum.FulcrumGame
bAdminCanPause=false
MaxPlayers=32
GameDifficulty=+1.0
bChangeLevels=True

This example shows off all of the typical features of an INI file based approach for storing settings, and I am fully intending to use it in Hades, but how do we start? We have to establish a couple of requirements to paint the picture fully…

Continue reading “INI Based Settings in C#/XNA”

XNA Components – Better Structure And Organization

XNA has been really quite nice to play with, a pleasant change from the grind of UDK or Source where everything is done for me, and UI is simple – a lie on Source mind you. Building the Hades POC out in XNA has been fun because it feels like I have been on an educational adventure, experimenting and rebuilding portions of the game slowly and analyzing the results then rehashing it and repeating. Of all of the elements/tools in XNA that I’ve been able to use, tripped over and even those I thought I understood but didn’t  one stands out – I love the fact that components exist.

In a moment ill show you how I used components to ensure that my screenshot mechanism never includes the debug information but always includes the screen, also known as the back buffer.

Disclaimer: All of the code & discussion below refers to XNA 4.0

Continue reading “XNA Components – Better Structure And Organization”

Hades Progress #4 – Threaded Terrain

Last week I posted a presentation overview of the performance gains that I found in switching over to a GPU masking implementation of rendering the terrain for Hades and I cannot say I was more satisfied with how things went.

Since then I have spent a lot of time optimizing, learning why you cannot overlap reference and value types in structs and trying to get the final pieces of the first phase of the game to come together. I have come to the conclusion that until I wean myself off of distractions I will likely be destined to spin my wheels. But there is always performance to be had.

That said, lets look slightly deeper into the terrain implementation.

Continue reading “Hades Progress #4 – Threaded Terrain”

Hades Progress Report #1

This semester I am taking a game programming and design class. While there have already been a few hiccups and overturned smiles in class there is something to be said for putting the material to use. I am in the process of building a game called Hades, a 2D game about digging that is of similar thread to Minecraft or Terraria, but with a bit more guidance, and of course built by me. 

Continue reading “Hades Progress Report #1”