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

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

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

Leverage the Power of the GPU

In developing the procedural the terrain for Hades procedurally I ran into an issue – I couldn’t create the terrain at a reasonable scale so as to make it look naturally flowing without significant slowing of the rendering of the scene. Over the last three weeks I have spent a good portion of the time working on my game developing algorithms, ultimately landing on a GPU alpha masked texture solution which is at least in the ball park of reasonable performance. The slides reference the actual data for it, but I will reference the performance between the two implementations here.

Continue reading

Three Ridiculous Claims

I have made an effort to curb my religious ranting over this semester to try to focus on the details of building video games, and it has been torturous. It seems like when I was ranting the number of topics was dwindling, so I felt like I was beating all the dead horses in the world and pissing in their eyes or some such nonsense. Just as I put my pen down though, or at least removed the shortcut to Live Writer, I began to trip over fools, idiots and their ilk…

  • Obama is a muslim because his grandmother says he is, father was and he has pictures of himself in their garb.
  • The USA was founded on Christian fundamental teachings, in spite of the fact that there is a ton of evidence to the contrary (Oh, but In God We Trust is on our money!)
  • Faith is a positive virtue.

Seemingly intelligent and influential people from my life have made such claims so why would they be irritating at this point?

To be sure, I have argued about these and many other claims over the last decade of being public, but why on earth are they still coming up? We don’t argue (much) about the shape of the earth, the composition of the core of the sun, or whether Thor was an actual person… Why is Jesus considered more than an idea? Why would faith be considered a virtue that the president of the most industrialized nation to be created? Why does the religious nature of the founding fathers matter?

Why can’t I provide reasonable answers to these questions?

Oh, and … I’m back – Bring on the questions.