The Abandon Wars

Sunday, July 30, 2006

Things are moving fast now. I've completed skinning, it should work perfectly on any graphics card now.

I have also spent a fair amount of time mucking around with the windows message loop... why? Well I want screen resizing and alt-tabbing to work properly. I don't have a clean solution yet but I do at least have a temporary one which will get me through the competition. The clean solution is too reset the direct 3d device which involves destroying and recreating everything in video memory. Not a small task but not a difficult one either; I just have more important things to do with my time - Space Crusade perchance.

Far more important than alt-tabbing is animation. Having worked like a demon on it I can almost (but not quite) say it's finished. Technically the animation does work, it's just the setup which doesn't.

That is beause I've got the sub objects local position and rotations setup in the wrong frame of reference. They should be in world space but, alas, my understanding quaternions is limited. I need quaternions for rotation but when I make the transform matrix from a position and rotation I don't get quite what I expect. On the brighter side I have now added a quaternion library ;)

As far as animation goes it's very flexible: the same animation routines can be used to flip between cels in a textured animation as can be used to do vector interpolation. It's based heavily on the code I wrote for Creatures 2 which was going to be my entry into the 2004 competition. Unfortunately the computer with that code on was stolen (Hey justin - do you have any of the art from creatures anymore?)

There are no screen shots this time 'round. There's nothing particularly interesting to see except possibly a bent cylinder which I'm to lazy to screenshot.

And that's it from me now. I'm going to go and sleep on the quaternion problem (I can vaguely see a solution but it's not quite there yet). So...

Later!

Sunday, July 23, 2006

I had such high hopes for today, I had two major tasks to complete before I could begin working on Space Crusade gameplay. Frustratingly though I didn't manage to finish either of them. The first task was to polish up skinning - which is basically done - and the second is to finally implement object picking - which depends on a lot of data done in the skinning setup.

I'm left with three issues before I can sign off object skinning. The biggest (but least import) is to get it working on the NVidia GeForce 7. A secondary concern is that all my matricies are at the wrong angle. The screen shot below shows the three bones in the mesh (the wireframe) and the solid object oriented correctly. I'm really hoping this isn't a major error and just a glitch in my matrix transforms.


The last and most annoying issue is that every vertex references matricies 0 through 2 (giving a total of three as shown below) but somehow when the object gets drawn a fourth matrix is used which looks completely stuffed up! If I set the fourth world matrix to be the same as one of the first three it looks fine however as I have quite strict checks to make sure that vertex matrix indicies don't go out of bound I don't know how this can happen(?).

Whilst I didn't get a chance to look at object picking at all; there is a bit of good news in that Dave has offered to draw the space marines for me (Yay! thanks Dave) which will free me up from trying to model.

On a remakes note: I was browsing through the remakes forum (yeah I should have been working but I didn't feel like it;) and the competition looks pretty good (ie: bad for me) which is cool.

To remind myself that there will be an end; and that it can't all be problems I dug up IOx, our 2003 entry which had plenty of issues of it's own but still managed to make it into the competition (by about one minute ;)

As the Space Crusade engine is still somewhat using the old IOx engine (although much more stable and user friendly) I thought I'd post a screen shot of it, just for nostalgias sake.


And that's it for now so...

Later!

Saturday, July 22, 2006

The crusade continues! Quite a lot has happened since my last post but unfortunately not much of it was Space Crusade related :( (incidently I deleted my last post 'cause it looked icky(!)).

On the computer front I finally sent my monitor in to be repaired... little known to me the company I sent it to was going to liquidate the following day. Thus when I tried calling to find out where my monitor was, nobody answered the phone. I only found out they'd liquidated when I drove down to see what was going on and someone in the office next door mentioned it.

So I am now monitor'less until Philips' attorneys manage to retrieve it - not something I'm particularly happy about. Shit happens... so... here's a Chaos Marine!


Now assuming I eventually get my monitor back again I bought myself a brand spanking new NVidia Geforce 7600GT graphics card. Wicked! (This before I knew the mess things were in)

It handles pretty well for the price (oblivion shunts along at 20 frames a second in full detail - as opposed to the 3-4 frames a second I got on my old X300). All I've used it for is to play Far Cry though (well it's fun!). The fact that I've changed graphics cards is import because it has had an adverse effect on the crusade, but not for any reasons you might imagine... read on.



In the coding world I discovered a small little-bitty bug which has taken me a good fraction of the day to fix. In a nut shell skinned meshes didn't work and I though I'd written code to handle them years ago - that came as a bit of a surprise. This was complicated slightly by having installed a new graphics card - some of the DirectX capabilites I was assuming were there, were not. Specifically the GeForce 7 doesn't handle indexed skinned matricies whereas the X300 did...

The upshot of this is that I've had to install my old X300 again untill I've finished fixing and debugging. Later I'll have to write things to work on the GeForce 7 but I don't want to change too much at the moment. Moving along; here is a picture showing skinning failing to work in all its glory (it should look like a solid smooth shaded cylinder - it doesn't).



Luckily I have since fixed this but forgot to take a screenshot of it before I broke everything again. I was actually still working on the shape picking before I got side tracked into skinning. I've just started working on that again - it's very nearly finished now - but I don't feel like doing anything further this evening so I'm completing this post and then playing Far Cry - on the X300 'cause it too much effort to swap the 7600Gt in again ;)

Later!

Wednesday, July 12, 2006

Heres comes space marine model one in a blatant attempt at getting sympathy modelling out of Dave ;). See two weeks and thats all I've managed to do - fortunately I've go the lighting just right so you can't see the interesting triangulation and objects cutting through each other.



And as I don't intend to do any work and hadn't meant to post tonight; thats it. I'm going to bed now.

Later!

Monday, July 10, 2006

Well, I completed my renaming binge and cleanup and also moved an awful lot of objects around - much more navigable now.

More importantly I finished amalgamating my Shape and Mesh objects and took all their little helper classes - like faces, trianlges and sphere - and moved them into their own files because they were really cluttering up the main files.

And with that I leave you with the title screen of the commodore version of Space Crusade; mostly to remind me that I should be working towards it! (ie: not faffing with shape libraries)


Later!

Sunday, July 09, 2006

Well this weekend was a bit of a coding fest... but I don't have anything to show for it. How depressing.

The goal was to get object picking working so I could select objects in the editor. What actually happend was I wrote (and rewrote) a hierarchical collision library and removed a lot of DirectX dependencies. On the brighter side the creation routines all seem to work so I must have achieved something.

The implementation so far is: take the graphical mesh and copy all its triangles into a shape object. Then place spheres around each triangle (or triangles if adjacent triangles are contained also). Then take clusters of about 4 spheres and place them inside another sphere and so on, until the final cluster is placed in only one sphere.

The outcome of this is a quickly traversable tree of spheres with the triangles as leaf nodes. Yay! (all the intersection routines are written aswell).

Quite a lot still remains to be done though. Notably my mesh object and shape object share a lot of information and have similar levels of complexity which probably implies they should be collapsed into a single object (not a rewrite I'm looking forward too).

All the hierachy information is in an intermediate format and still needs to be converted into something that can be used at runtime. This is almost done bar cleanup.

And lastly I have a few naming issues I need to work out (eg: the runtime shapes names all end in 'trans' which is a bit crappy).

So much to be done :(



In other news: I finally gave up on my monitor as it is no longer usable (it took to switching between input A and B about every 10 seconds). I'm taking it to be fixed - again - on Monday morning. Stupid Philips crap.

And truly lastly this time: I've decided to write the gameplay in Ruby (http://www.ruby-lang.org/en/) because it needs so little management compared to C++ or java and plugs into C++ fairly easily.

Later!

Tuesday, July 04, 2006

Not much too report. I mostly went on a code cleanup spree and fixed a few memory leaks and a really annoying renderstate bug which was stopping me from changing to fullscreen mode (code reuse by copy-paste is bad. Period.)

I've also taken the first tentative steps towards the level editor. The grid seen below will be used to align and place the wall and floor tiles of the derelict space craft. If you view the full sized image you'll notice... fullscreen - 1280x960. Anymore and my monitor gets unhappy. It's currently going throught the worlds slowest monitor meltdown +- 4 months and counting- but slightly worse every day :(


Thats it for this evening.

Later!

Sunday, July 02, 2006

Things are coming along nicely now. I've finished almost all of the major particle system features I wanted and only made one blunder along the way (I didn't consider how difficult it would be to sort particles in a freelist).

So whilst the following screen shots might not look like they have anything to do with Space Crusade rest assured that a good particle system should make blowing stuff up look great. And with no further ado, here is the first shot:


It's a field of pretty flowers and the embryonic alien. Why? Just because!

All the expected particle goodness is here: Specifiable UV coords, sizes and rotations. It's also possible to fade and/or shrink particles as they turn away from the camera as well as alowing the particles to be axis aligned (for billboarding). The space ship that can be seen
(sort of) here has nothing to do with anything; I just use it as point of reference - it's actually a concept model I did for someone else.

The next two screen shots are considerably more boring. They demonstrate that it is possible to set the number of triangles that a particle can be drawn with (1 or 2). The reason being two triangles give a nice square particle which is easily textured but requires 6 vertices whereas one triangle only requires vertices 3 and is perfect for round particles.


All in all I'm happy with the weekends work although it would have been nice to get some Space Crusade specific code going. I might have, had I not run into an interesting renderstate issue. Which took about 3 hours to track down (don't use D3DRS_WRAP0 with D3DWRAP_U as well as D3DTADDRESS_WRAP this has some seriously strange behaviour and gives a maximum UV range of 0.5).

And on that technical note I'm going to leave my computer alone now.

Later!