Monday, 26 December 2011

Not Skeletal Animation

The set of points from last week were the raw data of the "skeleton" of a Hellknight from Doom 3 - I'd intended to have skeletal animation at least somewhat working by today. No such luck, though I did fix the final issues of native library loading - it can now manage its own native code entirely, after adapting to some updates to JOGL, with a patch to skip over the part that my code already handles.

On the 3D printer, I added the Y-endstops (both home and end), and calibrated and tidied the wiring almost completely. All that remains before actually printing parts now is the X-axis belt and endstop setup (and using a spirit level to re-level the machine). A heated bed might be necessary to get the best-quality prints, though I'll see how it performs without first.

The motor for my moped arrived, too...
Finally, if you haven't already got it, there's possibly still time to pick up a copy of the Humble Indie Bundle (4) - pay what you want for some pretty awesome games (probably most notably, Super Meat Boy and Shank, both of which are gore-intense but brilliant games).

Charlie

Monday, 19 December 2011

Big steps

So, I've made some pretty big leaps forward in the game programming: 

First half of edge detection
For the anti-aliasing, I decided to use a method pretty much exactly as used in STALKER - so far, it's only detecting edges via the surface normals, but soon it'll also use the depth buffer, to ensure that all the edges are "caught" (look at the pot on the left - its edge hasn't been detected because the change in surface direction between the two surfaces isn't great enough. Once all the edges have been detected, it's a simple and quick step to blur them and so cheaply "fix" aliasing.

This step is a post-processing step, as is SSAO. I've also started to implement SSAO, though it needs configuring for the scene, and the blurring step is still not yet complete - it has to take into account depth, or the shadows will "bleed" onto bits they shouldn't. The final steps are exposure and colour correction - colour correction I've already done, but in lower-quality versions, and exposure is still in the works (fixed exposure only works at the moment).

I also wrote most of the intersection tests, which are going to form a fairly important part of the physics system, level layout and rendering optimisations. The overall plan is that every object in the world will be given a "bounding box", and quickly checked against the feature in question (for example, for checking if an object is visible, it's checked against the viewing frustrum, or for physics, a ray representing the motion of an object can be checked against anything it's likely to collide with). This can be optimised by including all objects in a "tree" of bounding boxes, where each bounding box node completely contains all of its children, so if the parent is outside the area in question,all of its children can be quickly eliminated.

The framework for a download and resource manager have been started - allowing files to be queued and made to download or update, and for resources no longer visible to be unloaded completely to save graphics memory.

I also tidied up the controller code somewhat for Windows - it can now get the proper analog values, and detect the type of controller and battery level (and interestingly, also the type of battery in the controller) of Xbox controllers. Almost completely pointless but cool nonetheless.

Finally, a teaser, most likely for next time:
No clues as to what this is for yet, but it should be interesting...

14500+ lines of code now, 333 TODOs listed.
Charlie

Monday, 12 December 2011

XInput

 So, I spent far too long working on getting the Xbox controller working - instead of using their standard input libraries, Microsoft in their infinite wisdom chose to make a separate API for the sole purpose of interfacing with their controllers. As a result, I ended up downloading a C++ IDE, and using Java's native code to work with those APIs. On the plus side, it means that the vibrate and separate polling of the triggers can be done (using the previous method, only Trigger (R-L) can be read not R and L separately) , but under Windows only.

Other than that, I tidied up the native code loading further - it now "cleanly" loads nearly all of the dlls or modules needed to run independent of platform and architecture (I still have to fix nativewindow though). Lights are now configurable in the engine rather than hard-coded into the shader (simple change but an important step), and I've started to write the basic game code/world itself.

Stuff I still need to do:

  • Intersection tests/resolver for physics, area scripting for levels
  • Scene optimisation
  • Decent gameplay code
  • Improve the importer (bring lighting, more material properties in)
  • Finish lighting optimisation - actually do the stencilling - additionally, light clip volumes
  • Antialiasing
  • Shadowing
  • Audio


Charlie


Monday, 5 December 2011

Small Steps

So, I finally sat down and spent a couple of hours coding the engine. I've started to tidy up my code layout and sort out decent input and gameplay - and in part of that, I bought a USB Xbox gamepad and played around with using it as an input. Unfortunately, the rumble feature is broken in the library I was using but otherwise, the controller works nicely and gives a nicer feel to motion - it's much smoother than a keyboard, and seems a fairly natural way of controlling a platformer-style game. I also added some very basic mechanics - nothing more than the basic laws of motion at the moment, and nothing visual either. 

Still planning to have something "playable" (i.e. vaguely resembling a game or game engine) by the end of the year if all goes well...

Charlie