Friday 21 November 2008

Long week and a bit...

Its official, at work we're now in crunch. Project should be out the door soon, but its gonna be hard run up till xmas! Mind this is part of why I joined the games industry, the last minute adrenaline rush to get a project finished, polished, and out the door - beats working in a shop simply crunching to get the customers out the door!

Even though I've been working late at work, I've still found the motivation to come home and grind a bit to get somewhere with Freecross Frenzy. Since I last posted, I've knocked up a quick rig and control mech using my old ODE wrapper from my dissertation. So far the control mech actually works, but is far from what I want. Biggest problem so far is realising that you can't let the player directly control the steering - it is FAR too unstable! Reading up on bike dynamics, its much better to let the player influence lean, and just moderate how much the front fork actually turns. I'm just doing this by applying a torque to try and keep the fork straight, it works, but doesn't seem a particularly nice way of doing it.

Balance is another issue I've notice problems with - bikes are stupidly unstable. 2 wheels, very small contact with the ground - It's gonna fall unless the rider corrects. Currently, I'm also applying a torque to the frame of the bike to keep it at the targetting lean angle. As with steering, this is not how I aim to keep it, but it works bloody well! The bike can stay balanced with minor leaning at 0MPH, and can lean over 45 degrees either side when moving at over 20MPH. Some how I feel I'll be writing my own friction model to deal with all this correctly, as over 45 degrees of roll on a flat surface is NOT going to happen in reality!

Tonight, I took a bit of time out of the physics side, and fixed up my material system and wrote some shader code. Previously I'd mentioned using Blender for my modelling purposes as I know it well - I found that it exports FBX pretty well - missing some bits, but kicks out enough to work with, so I've went with FBX as my primary file format. I've spent the night forcefully pulling values out of FbxSdk to fill in material properties for lighting, and realised Blender doesn't kick out quite what I need - but I need to make ends meet and just go with it for the mean time until I get a material editor as part of PsybrusEd finished up. Quickly implemented simple diffuse lighting, and specular lighting using Phong shading. the result of just over a weeks work and a few hours here and there playing Left 4 Dead:




Thursday 13 November 2008

Blender.

You mention this word to most artists, and they will cringe, and pass it off as a pile of crap. Yeah, its not as 'good' as Maya. However, its completely free, and Maya is not! Personally I prefer it, but I'm not an artist - I'm a programmer. However, I've been using Blender for there about 5 years now, and have memorised most of the tricky key combinations, can animate, rig, UV map, setup hierarchies, basically everything I *need* to be able to do to throw together simple test assets. My only gripe is the exporters - theres a few, but none of them work how I need them too. If the Collada 1.4 exporter worked well enough that'd solve my problem with the hierarchy I'm currently having. Currently putting together a test bike, properly setup as individual components to tie into physics for Freecross Frenzy. The bike is modelled whilst referencing pictures of real components used to build dirt jump mountain bikes, its *mostly* in correct scale, but I can tweak it later. Anyways, my attempt at being an artist so far:
























Sunday 9 November 2008

Freecross Frenzy, my next exciting project.

When I was in high school, I spent a large amount of time outside of programming out dirt jumping. Since then a few things have changed, and I have since stopped, not for good, but until I get myself sorted financially and can start to plough money back into buying a decent mountain bike!

A few friends used to always bug me to make a DECENT mountain bike game, and at the time I laughed it off knowing how difficult an undertaking it would be, especially since I didn't have a firm grasp on C++, and my only real projects were Half-Life mods. A few years have passed since then - in that period of time I've gotten myself a degree, a CyTech NVQ and a job in the games industry.

In my first year of university, one of our modules was games design. The project for this was essentially write a full game design document. We had over 3 months to do this but I had a small problem - I had no ideas AT ALL. Come the week before hand in, I actually started to get some ideas, and the night before it was due in, I threw together a full design document, weighing at around 50-60 pages, for a game called 'Freecross Frenzy'. 
'Freecross Frenzy', as you've probably guessed by now, is a mountain bike game. The idea was pretty much to combine dirt jumping with dual slalom and 4x. The mechanic of the game was to score points by not only completing a race in a good position, but to perform stunts whilst racing, and basically style your way to the finish line. Very simple concept, however without experience, I was unable to ever consider knocking together a tech demo. The reason I've wanted to put a tech demo together was mostly because of my idea for the control mechanism - Weight shifting. The emphasis for doing tricks in games such as Tony Hawks is focused on button combinations, which is all well and good, it gives you a pretty straight forward interface to work with, and lets you do combos with great ease. The problem? Lack of freedom. By giving the gamer control of the rider's position on the bike, it allows them to perform tricks that haven't explicitly been implemented by the programmer - encouraging emergence.

Back to the plot though, I've decided to start putting together a tech demo - nothing fancy looking, not a full game, pretty much just a track, the control system, and the physics behind it all. The physics and controls are everything for this - so theres a lot of work I need to do before I get started on the demo. This includes finishing the last couple of bits in Mapper so I can throw together a track, as well as starting AND finishing another part of PsybrusEd - Rigger. Rigger will be a simple tool I use to bolt together models with constraints, and in this case, connecting the wheels, frame and fork of a mountain bike with the correct constraints! I'm giving myself another week to get the Mapper sorted and up to spec to start lashing out levels, and then I can start properly on Rigger.

And before I go, a quick update on PsybrusEd Mapper. Height fields are in, they can't be edited yet, but they can be dropped into the world, so that's one more thing out of the way! Undo and redo are now bound back in since I've shuffled around the events a bit, and also fixed the threading problems I was having. The game is now fully updated from Python, however, the renderer sits on its own thread still so it doesn't cause the GUI to slow down - its also locked at 30FPS to keep CPU usage low. Action panels are in and working, and object selection/deselection is fully working too!





















Next hurdle to jump is to get object editing working - which would include:
- Transforming objects (Translate, rotate, scale, etc)
- CSG specifics such as clipping objects.
- Heightfield specifics such as painting the heights.