moving to xna4
Now that the Xna4 Beta is out, our team decided to take the plunge.
A few things to be aware of
- Xna4 is VS2010 only.
but xna4+vs2010 can live side-by-side xna3.1+vs2008
- Xna4CTP uninstall is a PoS (broken)
use the XNA Game Studio cleanup tool if you run into problems uninstalling any version of XNA. (you will)
- Resharper 4.5 does not work on VS2010
upgrade to 5.0!
- Resharper 5.0 doesnt really work on VS2008
a lot of key commands are broken :(
- XNA4 contains breaking changes.
especially in rendering. hope you like refactoring.
Now is an ideal time to upgrade:
we are rewriting our rendering system, so best to do this as part of our shift to xna4, especially looking at a “fixed function fallback” system.
We already did some tests to make sure our code isnt a nightmare to port, so good times.
-JasonS
incremental redesign of Novaleaf Engine
we are about 2/3 through our post e3 “fix up” month, and thought i’d share a tiny bit on what we are doing:
What was wrong with our E3 demo:
The e3 demo was pretty, but had some technical issues:
- world objects were atomic only:
this means buildings were a single, opaque object. not because we only support atomic objects, but I didn’t want to spend time finishing the implemenation of composite objects until we were sure about the entire workflow, which leads to:
- the game object system was not extensible:
our “Element” system (atomic and composite) was high performance, but extending it was not easy: a single manager class that needed to be extended as a monolithic singleton. not good for supporting various game object categories.
- the visualization system was a nightmare:
well not a nightmare really, the system worked, but was overly complex architecture, plus difficult to extend. We have a deferred rendering pipeline, and the rendering system was designed with only that in mind. So extending rendering for use with particles, etc was difficult.
- rendering suffered performance issues:
CPU stalls waiting for the GPU, plus mysterious cpu spikes of up to 30ms shows significant risk in the current rendering architecture
- misc system design issues:
the particle system and physics system were fairly poorly designed (lacked required features) and need some architecture changes
Tomorrow, I’ll start talking about the steps we are taking to resolve these issues.
-JasonS
.Net SortedSet<T> is almost awesome
I’m working on rendering infrastructure right now, and came up with an idea for how to store and sort renderPackets based on criteria efficiently using a binary heap.
What’s the BCL got?
That’s great, but I remembered seeing an MSDN article on a new BCL collection called SortedSet<T>
Nice features
It’s pretty sweet. As this CodeProject article describes, it has a neat Sub-Tree filter that can be used to partition the view, and it has good CPU performance with O(LogN) time.
Not good enough
Unfortunately, it seems like the BCL team is lapsing a bit on QC: SortedSet<T> is implemented using classes for Nodes, not structs. This has massive, harmfull, repercussions on CF.NET, and therefore makes SortedSet<T> unusable for a core, high-performance game system.
What’s to be done?
Thankfully, I can salvage the goodness of SortedSet’s features by implementing my own version of the class using a struct Node[] array as storage. It’ll take a little time, but I can use the BCL API’s as reference, and that will give me a SortedSet that offers good CPU and GC performance.
-JasonS
Everything you ever wanted to know about CF.NET performance
my thoughts on scenegraphs
Some posts on how to use or not use scenegraphs got me to write up a little on how we use them:
we use a spatial query for game objects, but a composite object (such as a building) may be made of sub-objects, so i basically have a scenegraph for those.
this also lets a composite objects manage their own collision resolutions, extending the base functionality where needed.
so a hybrid approach!
- JasonS
.net 4.0 “ElasticObject” (dynamic duck typing)
I came across something nice for .net 4.0, potentially scripting functionality
http://amazedsaint.blogspot.com/2010/02/introducing-elasticobject-for-net-40.html
Elastic Object offers a nice way to define/edit xml via duck typing, which may be useful for user-specificed data formats.
keeping it in mind, but unfortunately compiler services are not part of the CF framework, so this long-term usefulness is fairly limited at this time.
-JasonS
new sandcastle is out
At Novaleaf, we use Sandcastle to generate code documentation.
Not only code documentation, but as part of our “Novaleaf Simplified Process”, a major concept is “Close To Code”, meaning if possible, all documentation should be done in the code files.
So, code documentation tools are very important to our development methodology.
We are about 2 weeks away from moving to Xna4, which requires VS2010, and would let us support use of .Net 4.0, so i was happy to find out today that a new .NET 4.0 version of sandcastle is released.
- JasonS
free c# design pattern ebook: if you don’t own one, this may be your ticket….
Gamefest 2010 presentations
A msdn blog noted that the gamefest 2010 content is up and available to download
get the US or UK content
enjoy!
-JasonS