15 Apr 2009

N3 SDK Apr 2009 download

Here's the new SDK (see previous post), I hope releases will be a little more frequent in the future. As always, source code for the Xbox360 or Wii versions is not included for obvious legal reasons.


Have fun!

14 Apr 2009

New N3 SDK (Apr 2009)

The new SDK release should be ready by tomorrow (unless there's some last-minute fuckup). For now here's a rough What's New list since the last SDK from September 2008:

  • new command line tool: archiver3 - multiplatform wrapper for generating file archives
  • new command line tool: n2converter3 - convert .n2 files to .n3 files (Nebula graphics objects)
  • new command line tool: suiconverter3 - batch converter for SUI resources (simple user interface), currently only useful for the Wii port
  • new command line tool: synctool3 - sync local project directory from build server (only useful with our inhouse asset pipeline)
  • new command line tool: countlines3 - count N3 source code lines and generate Excel-compatible csv-file (comma separated values)
Foundation Layer:
  • brought Wii port uptodate (not part of the public SDK of course)
  • Util::CmdLineArgs renamed to Util::CommandLineArgs
  • Scripting subsystem moved into an addon
  • Remote subsystem moved into an addon
  • new Macros __ConstructInterfaceSingleton / __DestructInterfaceSingleton
  • new standard define __MAYA__ if compiled as part of a Maya plugin
  • new concept: ExitHandlers (see Core::ExitHandler)
  • new low level debug feedback method Core::SysFunc::MessageBox()
  • new concept "root directory" (see CoreServer::SetRootDirectory)
  • various changes to enable using N3 code in N2/Mangalore apps (N2 now sits on top of a very slim N3 Foundation layer)
  • SizeT and IndexT now signed (had to be done for N2/Mangalore compatibility unfortunately)
  • IO::Console is now an InterfaceSingleton
  • various debug HTML page handlers can now sort table content by columns
  • Debug::DebugServer is now an InterfaceSingleton
  • added a minimal Debug::HelloWorldRequestHandler as example for a simple HttpRequestHandler
  • new comfort method Http::HtmlPageWriter::TableRow2(), saves code when creating a 2-column HTML table
  • added Http::HttpClient class, allows send requests to HTTP servers
  • Http::HttpInterface is now an InterfaceSingleton and derived from Interface::InterfaceBase
  • new class Http::HttpRequestWriter
  • new class Http::HttpResponseReader
  • added a "single thread mode" to HttpServer
  • added new classes InterfaceBase and InterfaceHandlerBase
  • moved IOInterface-stuff under IO
  • new class Debug::ConsolePageHandler, displays console output in web server
  • generalized Zip filesystem stuff into general archive filesystem, with ZIP support as one specialization (on Wii, ARC files are used instead)
  • ZipFileSystem is now an InterfaceSingleton (no more per-thread wasted memory for archive table-of-contents)
  • added an "AsString()" method to IO::FileTime
  • new methods in Win360FSWrapper: SetFileWriteTime(), GetAppDataDirectory(), GetProgramsDirectory()
  • moved IO::ZipFileStream class to io/zipfs
  • moved path assign methods from IoServer into new InterfaceSingleton: IO::AssignRegistry
  • new standard assigns under Windows: "appdata" and "programs", mainly useful for tools
  • bugfix in IO::ExcelXmlReader for tables with empty cells
  • new class IO::HistoryConsoleHandler, captures console output into a ring buffer (used by Debug::ConsolePageHandler)
  • moved URI scheme methods from IoServer into IO::SchemeRegistry InterfaceSingleton
  • removed critical section from Stream::Open / Stream::Close
  • new method: IO::XmlWriter::WriteComment()
  • new methods specialized float4-loading methods: Math::float4::load_float3(), Math::float4::load_ubyte4n_signed()
  • vector comparison methods in Math::float4 more intuitive and flexible
  • Math::matrix44() default constructor now sets object to the identity matrix (default constructor still empty in Math::float4!)
  • new constructor from float4 in Math::quaternion
  • moved lots of math functions from scalar.h to platform-specific d3dx9_scalar.h to enable platform-specific optimizations
  • Memory::Heap constructor now accepts initial and maximum heap size
  • memory leap detection for Memory::Heap (doesn't quite work as expected yet)
  • removed global heaps: SmallBlockHeap, LargeBlockHeap, StringHeap
  • added global heaps: PhysicsHeap, AppHeap, StringObjectHeap, StringDataHeap
  • new experimental Win360MemoryPoolClass
  • Messaging::AsyncPort: can now add message handlers to already opened ports
  • added "deferred handled" flag to Messaging::Message (used in the rendering thread to keep CreateEntity messages around until their resources are loaded)
  • wrapped socket and TCP/IP classes to enable "TCP/IP-over-HIO2-Tunneling" on the Wii
  • System::Win32Registry(): split Read() method into ReadString() and ReadInt()
  • System::ByteOrder::Convert<TYPE>() methods now return a value, added new methods System::ByteOrder::ConvertInPlace<TYPE>()
  • new methods Threading::Interlocked::Exchange() and CompareExchange()
  • Win360Thread::IsRunning() now uses the Win32 function GetExitCodeThread() to detect whether the thread is running
  • new method Threading::Thread::YieldThread() (gives up time-slice)
  • new class Threading::SafeFlag
  • new concept: Timing::MasterTime and Timing::SlaveTime, main thread has a MasterTime object, and distributes "main time" to slave threads (i.e. the render thread)
  • Util::Array now has a MinGrowSize and MaxGrowSize to prevent excessive memory waste for huge arrays
  • new experimental class Util::Delegate (doesn't work in Codewarrior unfortunately)
  • new method Util::FixedArray::AsArray()
  • new methods Util::Dictionary::KeysAs<TYPE>(), and Util::Dictionary::ValuesAs<TYPE>()
  • new class Util::PriorityArray (which actually isn't needed anymore I think)
  • new class Util::RandomNumberTable
  • new class Util::Round
  • made many non-essential Util::String methods non-inline
Render Layer
  • new Character subsystem (modular character rendering, fresh rewrite of N2's Character3 system)
  • new CoreFX subsystem (ported from Mangalore's VFX subsystem (visual effects)) -> NOTE: will be moved into addon
  • new CoreUI and UI subsystems (simple user interface system) -> NOTE: will be moved into addon
  • new Video subsystem (video playback, currently Xbox360 only) -> NOTE: will be moved into addon
  • new Particles subsystem (rewritten from scratch) -> NOTE: will be moved into addon
  • new PostEffect subsystem (ported from Mangalore) -> NOTE: will be moved into addon
  • new Vibration subsystem (game pad vibration support) -> NOTE: will be moved into addon
  • new Vegetation subsystem (Drakensang's grass renderer, currently broken under N3) -> NOTE: will be moved into addon
  • new concept: RenderModules, clean framework to add functionality to the render thread
  • new concept: AnimEvents, animations can emit events at certain sample times (i.e. for playing foot-step sounds at the right time)
  • new concept: character attachments (swords, etc...)
  • lots of bugfixes and improvements to Animation system
  • new concept: AnimDrivenMotion, synchronize character movement with its current animation
  • new concept: batched messages, drastically reduce communication overhead between threads by client-side batching of messages
  • new methods: Audio::AudioEmitter::Pause() and Resume()
  • new methods: AudioDevice::SetGlobalVariable() / GetGlobalVariable()
  • added/fixed Xbox360 support to XACT audio classes
  • new class: MultipleRenderTarget, wraps MRT rendering
  • new class: MouseRenderDevice (currently only implemented on Wii)
  • added support for GPU-instanced-rendering
  • RenderTarget: added support to resolve depth buffer into texture (Xbox360 only)
  • RenderTarget: added support to create a resolve-texture which can be efficiently read by the CPU
  • added "late-binding" to ShaderVariableInstance
  • D3D9StreamTextureLoader and D3D9Texture moved from win360 to d3d9, since specialized Xbox360 versions exist now
  • Debug::MeshPageHandler can now display a dump of the vertex data in the web browser
  • Debug::TexturePageHandler now displays the current resource state of textures (Initial, Pending, Loaded, etc...)
  • new class CoreGraphics::MemoryMeshLoader
  • renamed CoreGraphics::Shape to CoreGraphics::RenderShape (because of CodeWarrior problems with identical filenames in different directories)
  • added Multiple Render Target support to Frame::FramePass and Frame::FramePostEffect
  • Graphics::Display::GetDisplayMode() now returns display mode actually set by the CoreGraphics::DisplayDevice (may differ from the requested display mode)
  • Graphics::GlobalLightEntity: all light parameter changes are now transferred to the render-thread-side post-creation
  • Graphics::GraphicsEntity: internal entity handle now only becomes valid after resources have been loaded on the render-thread-side
  • Graphics::GraphicsInterface now uses batch messaging to communicate with render-thread (only 1 message sent per frame)
  • Graphics::Handle is now a smart pointer (fixes problems where render-thread graphics entities were disposed too early)
  • Graphics::ModelEntity: support for AnimDrivenMotion
  • new Input::GamePad methods: ButtonAsString(), AxisAsString(), GetStateAsInputEvents()
  • InternalGraphicsEntities are now registered with the InternalGraphicsServer
  • lots of changes in InternalGraphicsServer and InternalModelEntity which require a proper cleanup doh
  • added support for 2-sided lighting to global lights
  • new classes: Models::AnimatorNode and Models::AnimatorNodeInstance (legacy Nebula2 stuff)
  • new classes: Models::CharacterNode and Models::CharacterNodeInstance, integrate character rendering with model nodes
  • loading of ModelNodes completely rewritten (new .n3 file format, plus n2converter3 tool to convert .n2 files to .n3)
  • new Model::OnResourcesLoaded() method, if Model subclasses need to do initialization work after resources have finished loading
  • new methods to lookup ModelNodeInstances on ModelInstances
  • new class Models::StreamModelLoader
  • lots of other minor changes in namespace Models
  • new class: RenderUtil::MouseRayUtil, convert 2D mouse position into world-space 3D-ray
  • new method: ResourceManager::CheckPendingResources(), returns true when there are currently no pending resources waiting to be loaded
  • SharedResourceServer: several methods now accept a ResourceLoader object when creating shared resources

I also did some interesting line counting statistics recently for the Foundation and Render layers (hopefully the images won't be scaled down too much):



"General" is the platform-agnostic code, which is the same for all platforms, "Win360" is the code which is identical between Win32 and Xbox360.

4 Apr 2009

Still Alive

Just a quick update, since I haven’t posted for a while:

  • I’ve pretty much gone into hermit mode for the whole of March with 10 hour-days and six-day-weeks at the Labs because of an interesting new project. Pretty much everything I did falls under NDA unfortunately, so there wasn’t anything I could write about anyway… so that’s my half-assed apology for not posting anything. Although I must admit that it was quite relaxing to simply cut-off all non-essential communication and social contacts and just concentrate on the task at hand, almost feels like I just came back from a long vacation, even though I’m a bit exhausted physically ;)
  • The Larrabee instruction set looks damn impressive, but I’ll withhold my enthusiasm until it’s actually available and doesn’t turn out to be just another fucking “onboard graphics chip”.
  • Same for OnLive. Don’t have tech-journalists any fucking common sense to hype this shit up instead of looking behind the curtain? Even Xbox Live (the current Gold Standard) takes a nose-dive from time to time when a popular multiplayer game is released, and that’s just doing match-making over its servers with (probably) a few Kbytes of traffic per session. Maybe OnLive is capable to demonstrate a system which scales up to a million simultaneous players spread across the globe, running a taxing 3D game with “acceptable” lag and image quality. If that happens I would be truly impressed. I predict that OnLive will collect a considerable amount of money from eager investors (who seem to believe that little nuisances like the Laws Of Nature can be dealt with by throwing the right amount of money at them), waste that money over the next few years, while tech demonstrations become less and less impressive (even though they’ll be fabricated), and finally, if said investors are lucky, maybe one or two worthless patents and “yet another” video codec come out of the whole venture. It’s Phantom all over again.
  • Drakensang won the new “German Computer Game Award” for “Best German Game” and “Best Youth Game”. Please excuse this uncommon display of enthusiasm, but let me just say: Yay!

I love Resident Evil 5. Capcom are my official kings of next-gen. Funny thing is: I almost skipped the game because of the demo. I haven’t played any previous RE’s (at that time I hadn’t converted to the dark side of console gaming yet), so I was completely put off by the strange “tank controls”. Also, the demo took place in “generic Middle-Eastern/North-African town”) which I already know well enough from COD4, MGS4 and FarCry2. No-but-thank-you.

But the actual game… I’d almost go as far to say that this is the best game of this console generation. The only little imperfection are those controls, but it took me only an hour or so to not even think about them anymore and use them just as automatically as the GeOW, or COD, or Rainbow Six controls. They are different from the “standard FPS controls”, but that’s the point, they are just different then the others, but with a little practice just as easy and intuitive in their own way.

The pacing of the game, the location design (there are some really breathtaking locations after “Generic Town”), the sound track, the story-telling, the characters, the cutscenes, the BOSS-FIGHTS (OMG the bosses are epic) – the way how coop-gameplay is implemented – everything is absolutely perfect. And RE5 is a console game through and through, not some FPS with more or less obvious PC heritage like COD or Gears. Little things like the “persistent inventory”, the massive amount of unlockables, the NewGame+ and Mercenary mode - every little bit of RE5 feels, tastes and smells like a 100% pure next-gen console game. Alright that’s it, I need to go play some RE5 now. Bye.