Tuesday, February 12, 2013

Restoring Depth

I've been refactoring some of the drawing code in the Rogue Moon game engine.  I've had nice bounding box drawing working and in the same manner wanted to add some sort of 'engine trail' effect.  I got this working, but then decided that both of these needed to move to a 'post process' step.

Tuesday, February 5, 2013

Game Engine Part 2

As I said in the last post:

I'd been mulling the engine design over in my head while working on the graphics engine.  I wanted, above all, to make it easily extensible and cleanly separated from the rendering engine.  After all, Rogue Moon is to be an online client-server game.

Then I got off onto the tangent about game networking.  But it did have a direction.  If you followed that post, you may have realized that modern latency-compensating online games require two simultaneous (yes, I know I said simultaneity largely goes out the window) simulations, client and server.

Monday, February 4, 2013

A Game Engine

So, it's been a while since I made a post; Christmas and the like interfered a bit.  But I have done quite a lot of work.

For now the shadows and rendering engine are 'good enough', so I've moved on to the meat of the game engine, as it were.

I'd been mulling the engine design over in my head while working on the graphics engine.  I wanted, above all, to make it easily extensible and cleanly separated from the rendering engine.  After all, Rogue Moon is to be an online client-server game.

Edit:  this turned into a post about networking and game engines, not where I initially meant to go.  But I'm going with it...


Sunday, October 21, 2012

Cascaded Variance Shadow Maps

Previously on Devblog.Drheinous.com...

Heh.  Anyway, previously I'd talked about cascaded shadow maps and how they worked.  As I said implementing them was easy as Neil Knight had done most of the hard work.  The quality still wasn't quite good enough for the voxel terrain my engine could push. I could easily draw a lot of terrain and have the far clip plane way out, but as it got bigger the quality of the shadows suffered.  CSM mostly fixed it, but still left some aliasing mostly due to self-shadowing.  Here's a good example from the GPU Gems chapter on the subject:

Another problem with percentage-closer filtering is that it inherits, and indeed exacerbates, the classic nuisances of shadow mapping: "shadow acne" and biasing. The most difficult to solve biasing issues are caused by shadow-map texels that cover large ranges of depths. This scenario often results from polygons that are almost parallel to the light direction, as shown in Figure 8-3.

08fig03.jpg
This would be Figure 8-3, GPU Gems 3 illustration of shadow mapping artifacts.

Cascaded Shadow Maps

So I've done quite a bit more work on shadowing. Clearly as the previous post illustrated, ordinary shadow maps weren't good enough for large terrain. After a bit of looking around, it seemed that Cascaded Shadow Maps were the ideal, and commonly used solution. Project Vanquish even had an implementation, and it worked right off the bat (well, there were a few minor changes I made, but very minor indeed).

Sunday, August 5, 2012

Shadows

Well, I got the Project Vanquish shadowing to work right with the instanced trees.  It'd had been more or less working with the terrain.  Turns out the problem, as I thought, was in the shadow map, or lack of resolution there of... 

On XNA and UIs

HTML UI using Awesomium in XNA
A couple of years ago, while working on my old 'Settler' project, I looked around at the state of user interfaces available in XNA, having little interest in writing the nuts and bolts of my own.

There really wasn't that much, a lot of half working and abandoned projects. Some nice things in C, but my preferred working environment was C#. 

Wanting something a bit more useful in a complicated RPG than a simple shooter style interface, I eventually downloaded a trial of the DigitalRune UI library and fiddled with that.  It worked ok... but come a year or two later when I go back to look at my project the trial key has expired, so now I can't run my old code without either getting a new key or hacking out all the UI stuff.

I decided I wasn't going down that road again, so now I was looking for a better way to do a UI.