Posts Tagged ‘ geekiness

Geek Out

Here’s a very techy post about the back-end of Amnesia – the hotspot system. If you’re not interested in geeky stuff, look away now:

Work on codebase is progressing nicely now. I can press a key during the game to flick into the hotpspot editor, which is separate from the map / gameobject editor. There I can place hotpots add special conditions to them and their corresponding scripts, which can do anything from say a line of dialogue, to run a complete program. Hotspots can also be attached to gameobjects, in which case the hotspot moves with it, in case I need any special case monsters or pickup items. To save game all I have to do is save copies of all the non-local variables, as well as the position and states of all game objects.

Hotspots can also be characters in which case they have a bunch more parameters and speech tree editors. I can also edit each room’s scripts, one for init, used for making sure each game object is in the right state and playing the right animation, one for each logic loop, to alter things in general play like lighting effects or simply running a timer.

I can now basically write the whole rest of the game from within the game, with nifty things like code highlighting, and even a basic intellisense. The nice thing is if I ever port it all I need to do is re-write the graphic engine, gameobject engine and script parser and the rest of it is data driven.

I still want to add a more intelligent animation system, and a neat editor for it, so you can place animations like cells with unique positions, and add attachment points and specify hitboxes, but overall I’m excited with the rate of progress! Time to iron out the little bugs and begin the long process of content creation.

technical stuff

I’m starting to get to grips with XNA, but it’s by no means a walk in the park.  3D-wise, I’ve only really used Ogre and Blitz3D, and only mildly dabbled in shaders in Ogre.  XNA is lower-level than Ogre in most ways, but then again C Sharp is higher level than C++, this means less stress with pointers and free garbage collection, but I have to learn shaders from the ground up, and re-write a lot of Ogre’s functionality.

The good thing is that shaders use the industry standard .x format, none of Ogre’s proprietary stuff to deal with, and I can test things out in RenderMonkey without having to re-code them.  Also, luckily, most of the stuff I want to do has been done already in XNA, shadows and cel-shading in particular, although skeletal animation support is non-existent out of the box and there seems to be little online knowledge about it (although I’m looking into XNAnimation…)

I’ve got the first model by my artist, Lord P.Duncan, and boy is it a beauty (you can see him in the background of the website image.  We call him The Bully.)  I’ve plugged him into the cel-shader and shadow system and he’s looking fine, fine, fine.  The time is not right to post him yet though…

I have the odd cabinet projection working too (think Final Fight perspective), that wasn’t a bit of a headache because I had to re-learn about projection matricies.

The next step is to get skeletal animation up and running, and the overlaying of shadows back onto a 2D image (should be one line in the shader with any luck.)

I’ve also written what may end up being the main musical theme, it’s orchestral, kinda Zelda-ish but dark and foreboding, with only a thread of hope in it.  Look forward to playing it to you guys many moons from now!