19 Feb 2008

Nebula3 Februar 2008 SDK

Alright, here it is finally:

N3SDK_Feb2008.exe

Notable new features:
  • a "quick'n'dirty port" of our current Nebula2 modular character and animation system
  • PSSM-VSM shadow support for global light sources (which I'm not quite happy with yet)
  • some restructuring and cleanup in the Application layer
The internal Wii port is coming along nicely, Johannes got SQLite up and running on the Wii (which will also be helpful for other console ports), and apart from physics and collision detection, the Application Layer is now running on the Wii.

During the last 2 weekends I started to implement a new AsyncGraphics subsystem, which will put the Graphics subsystem and everything beneath it under its own thread. I'll write more about this in another post soon.

Finally here's a new screenshot of the new "demo character":

9 Feb 2008

COD4 Multiplayer

I have developed a serious addiction to COD4 multiplayer. Usually I'm not that big into competitive multiplayer, but I'm having my phases. Back in the old days, it was Counter Strike, a few years later I was excessively playing Battlefield2, and now for the last couple of weeks I'm totally hooked to COD4. On a console. With a game-pad. I tried the competitive multiplayer portions of Gears Of War, Rainbow Six Vegas and Halo3 before, and none of them really ticked with me in multiplayer like the old-school PC shooters. But COD4... one match did it. The reason - I think - is because COD4 is the love-child of CS and BF2, my two favorits of the past. Sessions feel very fast-paced, with an initial rush to the control-points, just like in CS. The class system and up-leveling is more like BF2, but it's more back-to-the-roots, especially the class system, which doesn't feature advanced classes like medics or engineers, instead, all classes are strictly offensive. Every single feature is extremely polished, and everything which would hinder the flow and speed of the game has been removed. And my personal killer-feature: you don't have to communicate a lot. Nothing breaks the immersion more then some jerks talking about some completely unrelated shit like their last GameStop-visit during a Team Deathmatch in some destroyed middle-eastern city. Fortunately the game plays just as well without headset. Big win.

2 Feb 2008

D3D Debugging

I just spent a bit of time debugging the D3D9 specific code. Running the test viewer under the D3D debug runtime and with the warning level to highest reveals 2 warnings:
  • redundant render state switches (which I'm ignoring for now, the frame shader system already helps to reduce redundant state switches a lot, and fixing the remaining state switch warnings would involve implementing a D3DXEffectStateManager, but before I do this I want to make sure that my own redundant state switch detection would actually be faster then D3D's)
  • more serious is the second warning: "render target was detected as bound, but couldn't detect if texture was actually used in rendering". This is only a real problem if you want to read from the same render target you're currently rendering to, which isn't happening anywhere in Nebula3 (unless you screw up the frame-shaders). I fixed the warning by adding a "UnbindD3D9Resources()" method to the D3D9RenderDevice, which is called at the end of a rendering pass, and before the D3D9 device is shut down. The method simply sets the texture stages, vertex buffer and index buffer of the device to NULL.
The most serious problem though was that Direct3D reported memory leaks when shutting down the application. Finding a D3D9 memory leak can be tricky, but thankfully Direct3D has a nice mechanism built into its debug runtime to find the allocation which causes the memory leak: on shutdown D3D writes a memleak log to debug-out, where each memory leak is given an unique id. The problem is, that even one forgotten Release() call can generate hundreds of memory leaks because of D3D's many internal dependencies. The most interesting leak however is usually the last reported, at the bottom of the leak-report. To find the offending allocation, open the DirectX Control Panel, go to the Direct3D 9 tab, and enter the last reported AllocID into the "Break On AllocID" field. Run the application in the debugger, and it should break at the allocation call in question. Turns out I forgot 3 Release() calls: one in D3D9RenderTarget::BeginPass() after obtaining the backbuffer surface from the D3D9 device, one in D3D9RenderTarget::EndPass() after a GetSurfaceLevel(), and after another GetSurfaceLevel() call in D3D9RenderDevice::SaveScreenShot().

The moral of the story: read the D3D9 docs carefully even for "uninteresting" functions, and run the application through the debug runtime after each change to the rendering code, to prevent such bugs from piling up to unmanageable levels.

I wanted to get this stuff fixed before the January SDK release, so this will come next week as time permits. Drakensang bugfixing and optimization has full priority for me at the moment.

Completely unrelated:
  • Watched Death Proof yesterday, and I was a little bit disappointed. The first half was outright boring, then 10 seconds with (probably) the most spectacular (and gory) car crash in movie history. The second half with the "new girls" was actually really good, but the car-chase at the end and the finale was quite a letdown as well, guess I was hoping to see Kurt Russel die in a more spectacular way hehe...
  • RezHD on XBLA is ... wow.

17 Jan 2008

First Render: Wii

Here's the first screenshot from the Nebula3 Wii port. There are still some rendering artefacts which we're looking into, but technically it's the first rendering which is fully running through the Nebula3 rendering pipeline on the Wii :)

6 Jan 2008

Happy New Year

The January 2008 SDK release is well on track. I think we'll have to settle for a bimonthly release cycle in the future. While the main chunk of work has gone into the Wii-port (which isn't part of the public SDK release of course) there are still two nice new features for the Win32 version:

  • our modular character system (direct port from Nebula2), so the next testgame.exe application will have proper characters instead of a placeholder geometry
  • PSSM shadow support for global light sources

I feel that PSSM (Parallel-Split-Shadow-Maps) combined with VSM (Variance Shadow Mapping) currently gives the best bang-for-the-buck in terms of quality vs. performance.

16 Dec 2007

Assassin's Creed Wrap Up

I finally reserved a few hours to finish up on Assassin's Creed. Yawn... all this cheap pseudo-science crap was really getting on my nerves towards the end. It seems that every stupid conspiracy theory ever invented has been stuffed into AC's "story".

The game itself was actually quite a chore during the last few hours, because nothing really unexpected or new happened (yes, the game tries to have some sort of a surprise ending, but one can see this coming from a mile away). For the little variety the game-play offers, the game just feels too long IMHO. Everything is just too stretched-out. Overall it's a pretty good game, but now that it's over I feel somewhat ... unsatisfied. The fact that the game doesn't seem to have a real ending doesn't help either. Yes, I discovered the credits ... but what the hell now?

4 Dec 2007

Mass Effect

Holy shit, Mass Effect is f*cking E-P-I-C. The "acting" and story-telling is better then in any Star Wars movie, game-play is (surprisingly) very Deus Ex'ish. The last 2 or 3 hours are simply breathtaking (I clocked in at about 36 hours with most of the side quests). Mass Effect is simply one of the best games ever made. There are some technical glitches (most notable and annoying is the extreme texture popup, especially after loading a saved game and at the beginning of some cutscenes... only low-detail textures are displayed while the high-detail textures are streamed in, sometimes it takes several seconds until everything looks right). There's also some stuttering during game play (most likely also loading related). The graphics quality is a mixed bag, some of the less important NPCs look very bad compared to the extremely detailed and convincing main characters, most of the environment graphics looks last-gen, interestingly one of them (Ilos) looks extremely good, almost like it has been done by a different team, or the designers had a lot more time reserved for this one location. But all in all these are just very tiny flaws and don't stop the game from being an absolute masterpiece.