Starfire Level Rendering

The title says it all.  I’ve implemented the tool that packs geometry, material and texture data together into a single binary for levels. I’ve also gotten rendering working, which involved writing a script object to instantiate the level.  But there’s no scene partitioning. This means that the visibility code is currently checking EVERY sub-mesh in the level geometry against the camera frustum.

I’m considering two options for proper scene culling;

  1. Use a fixed partitioning scheme which packs a separate ”level sub-mesh” tree into the level data.
  2. Add some more code to the engine so that I can have sub-mesh  nodes, which are added when the level is created.

Both schemes have advantages and disadvantages, but I think the second method is the better one to go with.  With the first method, I would have to traverse two separate scene s during rendering, which could be pretty expensive.  The first method has a cost at level creation time, but we only pay that once and it shouldn’t be too huge.

It also means that it will make use of a variety of scene managers that the engine can use, instead of one fixed scheme which might not be so good for all types of environments.

After this is done, it’s on to adding the input manager (again) and then physics and collision.  I’m almost at the point where I can start making a game now.  Feeling good :)

Posted in Starfire engine | Comments Off

Starfire

It’s been a while since there has been a Starfire update, so I might as well given one.  I’ve been fairly busy, and the following things have been implemented

  • Further modularised the engine. The core, Render and Engine modules are all seperate libraries
  • Fixed a silly Clip Frustum bug. Doh!
  • Created a fixed-function version of the libraries and executeable.  Originaly, this was intended to run on my netbook, but for some reason, OpenGl doesn’t initialise properly.  Oh well…still, it works well and I guess is handly for older mobile devices.
  • Level models – I’m working on the tool that takes a gxml output from the Blender exporter, and spits out a level “bundle” complete with packaged materials and textures (more on this below)

Level Meshes

So I’ve been working on getting level meshes to render, which is a wee bit more work than a standard mesh.  For one, the mesh has a lot of dependancies!  At the moment, I’m working on the build tool to actually produce the binary.

I’m taking a bit of a general approach to this.  I was able to re-use the mesh export code, as its the same dammed thing as any dynamic mesh in the engine.  But for the texture and material “bundles”, I ran the risk of having a LOT of code to write if I had distinct file formats for both.

So instead, I resurrected an old storage technique called a “Data Dictionary”.  These dictionaries are nothing too complex.  They are just a generic flat file format that can be loaded in one go, but contain lots of little chunks of data which can either be indexed, or quickly searched upon by name.

In short, this cuts down the over all time needed to implement new file formats for a lot of the game engine.  It won’t be suitable for everything of course; although you could in theory re-write the mesg binary using a dictionary, it would be more than just a wee bit inneficient!

Hopefully, it shouldn’t be too long until I have level rendering working….I just need to finish the material builders, and then write out the level stream before I can concentrate on the run-time side of things.

Posted in Starfire engine, coding | Comments Off

Otaku

There was a while as a teenager, where I was completely Otaku.  Or at least as Otaku as you could be, when you don’t have any form of cash-flow.  I bought what VHS releases I could (the first being Dominion Tank Police and Project A-ko) and was an avid reader of Manga Magazine.

But where did it start?  It’s a bit odd, but I don’t think any of us who were kids in 80′s and 90′s realised that we had already been sort of brainwashed into liking Anime.  We were flooded with Japanese produced or influenced cartoons such as Ulysses 31 and Battle Of The Planets and so, the Western offerings quite often seemed rather tame and uninteresting in comparison.

But we didn’t really “get” what we were being introduced to.

Then there was a period of time in my mid-teens where the pressures of being constantly bullied at school and where home life was rather bleak, where I guess I was really suseptable to anything that would take my mind off the crapness that was my every day life.  So when I read an article in a news paper detailing Manga Entertainment’s plan to release Japanese series’ (particularly OVA) in the UK on video and describing the Japanese affinity for Anime and Manga, it had grabbed my interest.

And then after watching Laputa: Castle In The Sky a day or two before New Years Eve in 1990, I was hooked.

Here was something that I could loose myself in.  Where I could imagine my own part in all these wonderful sci-fi adventures, and didn’t have to be the kid bullied at school or worry about life at home for short periods of time.

In a way it saved me, and I became more and more Otaku.  This was especially true when I started college in 1993, where my clothing choice was usually scruffy jeans with equally scruffy trainers.  And let’s not forget my scruffy kahki jacket, too.

I developed a few favorites in this period.  Most notably, Dominion Tank Police, Appleseed (image right), Akira and a few others.  But as I got a bit older, and as my life suddenly found a form of balance, I started to loose interest.

As I said before, I started college in 1993.  I had a girlfriend, I was no longer bullied and I seemed to have found something that I was really good at; programming.  It wasn’t so much that I didn’t have time to wath Anime or read Manga; I just started to realise that alot of it was pretty much the same; scantily clad school girls with big Mech’s and variations on that theme.  Of course, what I didn’t really understand was that there was much more on offer; it’s just that what I was being offered was limited by Manga Entertainments marketing stragetgy; which was to appleal to lonely, 14-17 year old males in order to build up an initial customer base.

So as I turned 18, I read less and less, and watched less and less.  I only took the occasional interest, something that appeared a bit more out-of-the-ordinary and secretly pined that Laputa had not been shown on TV or released on video since that first viewing.

(It’s worth pointing out that I do now own a copy of Laputa on DVD)

In some ways, I guess my tastes became a bit more refined.  I still had an active like in Anime and Manga, it’s just that I didn’t ingest everything that was offered.

But for a while, I was one of the original Otaku in the 90′s. Only with better personal hygene than most.

Posted in Uncategorized | Comments Off

Raleigh Vektar

I have absolutely no idea why I googled this. For some reason, I started thinking about BMX bikes from the 80′s, especially the Raleigh Vektar.  When you’re 9 years old, it looks like the coolest bike on earth. And it STILL looks like the coolest bike on earth. Probably because it’s styling cues look a lot like Streethawk, the bike from the same named ill-fated tv series.

I always wanted one as a kid, but I already had a BMX which was made by some unknown manufacturer; which meant that there was no chance of my Mum forking out the cash for one at Christmas.  I’m pretty sure that the frame wasn’t even chrome moly, but hell, it was better than nothing and it survived some rather rough treatment at the BMX course in Tweedbank.

I remember the Dandy comic running a contest to win one, and hoping beyond all home that I would win.  I also remember my friend, Paul, saying that the Vektar was useless because the front mudguard would prevent the front wheel from steering properly and us having long arguments about this (because nobody we knew owned one.  So we couldn’t see it for ourselves).

Posted in Uncategorized | Comments Off

Family life…

I left for work this morning, feeling a litle bemused.  Ever since Flora started Kindergarten, most mornings have sort of been the same routine.  Get up, fix the kids their milk/brie, get dressed and then go to work or take Flora to Kindergarten before going to work.

With the constant business trips and meetings, my job can be pretty disruptive to our family routine.  There are time when I’m either not there in the evening when the kids go to bed, or I’ m just not there at all for a a fee days or a week or two.

So it’s nice when there are prolonged period of normality.  I think tomorrow, I’ll not go to the gym (since I was there this morning) and have breakfast, before walking Flora to kindergarten.  I think she’ll like that….I know that I will.

Posted in Uncategorized | Comments Off

Cold turkey…

Since around 2003, I’ve been a member of the games industry forum www.thechaosengine.com. It’s a site dedicated to giving video game professionals somewhere to hang out and talk shop, while keeping a high signal to noise ration.

If you can’t somehow prove that you work in the games industry, then you can’t get in (to the private forums at any rate).

Before TCE, there was a website called Fat Babies.  Not only did it provide a forum, but it also acted as a place for industry gossip.  It was sort of a tabloid website. But in 2002-2003, the site started to fall down as the forum software was changed and the maintainers simply lost interest in keeping up the gossip reports and providing any sort of moderation.

There was also a lot of spam coming from a few forum users, who tended to turn any discussion into some sort of flame war.  The site went from mildly amusing, to just downright horrible.

So TCE was born to fill the void.

The problem is, I’ve come to enjoy being a member of TCE less and less over the last couple of years.  Part of this has to do with working for a big console manufacturer, and seeing various opinions and FUD about my employer, being posted as “THE ULTIMATE TRUTH” by so many people.  I must add, have a lot of respect for many if not all of these members.

I can’t participate in these discussions, and it’s unpleasant to read a lot of it.  And in general, I find myself loosing a lot interest in the other discussions on the site.  So I’ve decided to step back.

Well…I decided this roughly week ago, and I haven’t really missed visiting the place.  I didn’t delete my user account, but since it uses an old deactivated e-mail address, I changed my password to something random and logged out.  I’m hoping that I can quietly slip away, and that my absence from a forum that I have been a member of for 8 years,  will go unnoticed.

I feel a bit sad at having said goodbye to the site, but surprisingly, it hasn’t left a big empty void in my life.

Posted in Video Games | Comments Off

Canvas is now Starfire!

So I renamed the game engine. This was done partialy, to sort of match up with the name of my indie brand (not saying what it is right now) and because I HAD to do a shit load of refactoring.

In order to cut down on the time spent doing boiler plate coding, I had just placed all of the source file for the engine in one folder. This wasn’t so bad, but it made certain parts of the engine a little less modular. And when I get to writing off-line tools (model converters, the editor etc.) it would be a real pain to have the shared source (math, gfx) living in the same place as all of the engine and game code.

There were also quite a few cross depenancies in the source that just had to be killed.

So I spent the evenings from a whole week refactoring and renaming everything.  It was a massivley painful experience. But by doing it now, I avoided much much more pain later on.  It was worth the effort.

I also split off the script interfaces into a seperate library.  This made it much easier to maintain, which is evident in the three evenings that I’ve spent implenting script interfaces for a lot of the main math/engine/scene/gfx classes.

The end result of this work being; although there are still some pretty big features of the engine to work on, I’m almost in a position where I can write demos or an entire game in script code.

Posted in Starfire engine, canvas engine, coding | Tagged | Comments Off

Canvas Engine Update

I’ve been as busy as I can be, given the limited time I have in the evenings.  A quick run down of stuff that is now working :-

  1. Basic scene partitioning – the main interface has been written and a simple scene manager has been written.
  2. Frustum culling implemented – It only does simple frustum to sphere culling at the moment, but I’ll add AABB and Rotated Box support in the neear future.
  3. Materials – Not a lot to say about these.  They’re supported and the engine can have different material types.
  4. Program, Vertex Format and Material managers have been added.  This allows the engine to store them by name, and provide fast(-ish) searches.
  5. Added a couple of default render programs that can be used out of the box.
  6. Improved some error reporting, mainly in the shader compiler and program linking stage.

Stuff I’ll be working on next (in no particular order) :-

  1. Re-instate the input manager – It’s still there, but since I re-wrote a massive chunk of the application code, I haven’t gotten around to passing keyboard and mouse events on to the manager.  A pretty simple task.
  2. Render batching – right now, rendering is performed directly. Which is pretty inneficient.  I’m going to write a batching interface for sequencing render batches, sorted by gpu program and material.
  3. Mesh loading – I’m going to modify an old xml exporter for Blender and for now, have the engine load the xml meshes directly.  I’ll have a binary build step once I have a very basic editor running.
  4. I have to write a whooooole shit load of script interface classes for the scene stuff.  It’s not difficult, just time consuming. I also have to write some script wrappers for the 3d math stuff too….ugh.
  5. Add in some command line options.  Again, ever since I re-wrote the application code, this stuff no longer works.  Need to get this working again, so I can have stand-alone builds.
  6. Write a simple quad tree scene manager.

It looks like a lot of work, but I think will be two to three evenings work for each of the largers tasks, with the smaller ones all being done in a single evening.

Posted in canvas engine, coding | Comments Off

Opening the flood gates…

I’ve changed the default settings to the blog so that registered users are automatically given contributor status.  It’s getting difficult to determine who has a real e-mail address/username and who is a spam-tard.

Only time will tell, if this is a good thing or not.

Posted in blog | Comments Off

Game engine update

So my little 2d game engine (codenamed “Canvas”) has sort of evolved in the last six weeks or so.  I haven’t had a lot of time to devote to it, but despite this, the engine has gone under some major changes. :-

  1. A whole new application layer that removes the dependancy on NeHe’s OpenGL code
  2. Support for 3d math (vectors and matrices)
  3. Shader support.
  4. 3D Mesh and scene support

So I’ve been busy, despite not being really busy :)   The biggest job was getting the shader support into the engine.  I took the classes from an old 3d engine I had written, and re-factored those into Canvas, which I think was a good idea, rather than re-writing the support for this sort of thing from scratch.

I have a really odd cross-dependancy on the application layer though, so I think I might want to re-factor the code a little, to remove this at some point. At the moment, I’m working steadily on the support for a 3d scene which I want to finish soon.

Posted in canvas engine, coding | Comments Off