The Abandon Wars

Tuesday, February 27, 2007

I've had enough of programming for a bit so I've done some modelling. It's only an hour's work but it does show the beginnings of the level walls. More importantly I've thought of quite a cool way to generate all the walls and floors in a level.

Here's a view down one of the corridors:


On the programming side I've gone on a C++ preprocessor writing spree. It's something I've been meaning to do for a long time and now I finally have an excuse too. It's related to reading and parsing C++ files so I can teach Ruby to recognise the classes I want. I know this is almost exactly what SWIG does but... I'm having fun and it gives me a chance to use the C++ parser I wrote some time ago ;)

That's it for this post, lots of work done but nothing spiffy to show for it ;)

Later!

Sunday, February 18, 2007

I hate telkom! Now that I've got that off my chest I can get down to some real posting. I've been playing with different methods of embedding ruby in C++ (or vice versa) and managed to stumble across something obscure or awkward in almost every one.

Firstly I couldn't include ruby.h: It complained about having the wrong MSC version. This was easy enough to get around, simply delete the offending check (three lines of # defines). Next the compiler started bitching about an unknown struct fd_set (syntax error : identifier 'fd_set'). It took a little longer to resolve this one, turns out winsock.h must be included before ruby.h

Then I managed to get stdafx.h into the project which caused havoc and was finally solved by starting a new project without it :( ... Following this I tried various examples I found on the web, none of which worked out of the box - generally because of old header incompatibility.

Finally I've found a c++ wrapper for ruby that looks quite interesting. It's RubyNative from www.gaffer.org; only I don't how well it will work because it's still downloading... 240K and it's taken all afternoon to download! For pity sake this is supposed to be a 1MBit line - thank you so much Telkom!

I've also used SWIG very briefly and whilst it worked it seemed a bit ... untidy. Unless RubyNative does not work I'm going to avoid SWIG for the time being.

And that's that from Ruby world. I have done a bit more work on the image combiner. It could now be considered to be in late alpha (if I cared about releases). As can be seen I've added a few more options and wired up the previously existing ones.


Later!

Saturday, February 17, 2007

This week I've been on a bit of a tangent: as I've had to enter the wonderful world that is MFC (Life without it was so good!). Below is a small application that will take a set of images and combine them into one. Useful if one has a lot of frames of animation that belong in a single texture.

Given a set of images, the combiner will try and pack them into as small an area as possible optionally forcing the output texture to have a width and height that are a power of two.


Eventually this app must be integrated into the main editor but for the time being it's a quick and dirty solution to an immediate problem. The ability to read PNGs is added by the awesome libpng library and implicitly by the zlib library - thanks guys!

Image combiners aside what I hope too achieve this weekend is Ruby integration. Unfortunately this a fairly large task: not because Ruby is hard to integrate, but because my world libraries are missing a layer of abstraction - I don't want Ruby talking directly to graphics instances.

The scene library - which should provide this abstraction - currently consists of a two files. Writing behaviour into this could easily take a couple of days so it's unlikely that I'll actually see Ruby doing anything this weekend... but here's hoping. As an aside: confusingy the scene library is a higher level library than the world library but the world library is too deeply entrenched to rename now... Oh well.

Later!

Sunday, February 04, 2007

There've been no posts for a while, we're beginning the final run at the office :( and I also had another small system death... One of the drives in y RAID stuffed out thanks the extreme heat. A bit of re-installing and all is right again, and running a lot more smoothly. Unfortunately I got a bit sidetracked and also installed Beryl (the window manager) which took quite some time ;) Oh well, it's very cool - though still very much in development.

If I'm feeling bored one day I'll document how I did it. It was under Ubuntu 6.10 which is why it was such a mission. Getting it to play nicely with the nVidia driver was also quite a lot of fun :(

Back in Space Crusade I haven't really got much done, I did a bit of programming but I can't remember what. I know I broke my window manager - I reallised that using my own virtual function tables was going a bit too far. The gist of it is that there is not much to report: I'm still waiting for Dave to model me a space marine although as he is still saying he will so it will see the light of day evetually.

I have noticed that none of the screen shots I've posted actually have textures in so here a couple are. The one below should be recognisable as a model from II (which has since been discarded).


The next one here is the standard sort of 'no textured, single textured, multi-textured and vertex coloured' object demo that only programmers can know and love.


Actually any sort of wierd data can be attached to verticies, edges and faces. For instance having different normals, different counts of UV coordinates and different textures at an edge/vertex boundary will all be dealt with correctly.

As I've mentioned I don't actually have anything new to report so...

Later!