Progress Update (June 2009)

I have been working on many things in the last 6 weeks, so I think it is time for another progress update.  In this update I will outline which components I have started and the progress, including LTrees, GPU map generation and the GUI.
It hasn’t all been quiet on the site though, as it did see some activity though roughly 2 weeks back, when I wrote the first article not related to the progress on Britonia.  I was titled ‘Overcoming Scale and Precision Errors’.  I hope to continue writing other articles and posting them in the future.For the actual game, there have been many updates, so I will take the same format as the last progress update and describe each component seperately, and then follow up with a few screen shots:

Procedural LTrees:

I mention this first, not because I have spent the most time on this area, which in fact is the opposite, but rather because when looking at the new screenshots, the first thing you’ll notice is that I have added trees to the world.  I went ahead as planned and intergrated Asger Klasker’s LTree project from into the engine.

I use this component to procedurally generate a set of trees when the world is loaded, along with an accompanying set of billboards.  The plan is to eventually render the same sets of trees with varying rotations, sizes and colour offsets, so that I don’t have to constantly generate full trees everytime the camera moves.  I have also started setting up an LOD system, which based on the distance of the tree from the camera, switches between rendering a high poly mesh, low poly mesh, single billbord or group billboard.  As I said, the LOD is still a work in progress, but it is so far working quite well.

At the minute whilst flying around the planet (see the youtube links at the bottom), you will notice that the trees are not placed correctly.  This is ‘intentional’, because until I implement the growth maps, I don’t want to lose too much time setting up a mock forests and what-not, and it is still too early for the growth maps.  I do however, still have to test the LOD for the trees, so at the minute they are just planted using a generic growth map which is sampled once per vertex grid position; this is evident by the grid pattern of the trees in the video.  I plan to generate one growth map per patch, which will be used both to identify where trees should be placed, and in the future where buildings and other objects can be placed.  This growth map will be based on the height and slope of the terrain to dictate where valid trees positions are.

GPU Diffusemap, Heightmap, NormalMap and Growthmap Generation:

Well the good news is that I’ve managed to get the terrain heightmap generation working on the GPU, using the four corners of the cube in world space, and lerping between them to generate a grid of noise values using perlin noise.  The bad news is that it hasn’t really improved performance, yet.  I still have a lot of testing to do with the GPU generation, again trying the find the best ‘low octave, good quality’ terrain etc.  I am actually hoping to get the height, normal, and diffuse maps all generated on the GPU (with MRT is available which can output upto 3 textures simutaneously, or single rendertargets if MRTs are not available).  When it is finished, I should be able to generate higher quality diffuse maps on the GPU once per patch, and then sample this like a normal tex2D() in the shader.  This will be useful because I can then a) lerp between texture LODs to avoid the current texture popping, and b) because I can then generate high resolution normal maps based off of the high-res heightmaps; the normals are currently per vertex.

User Interface:

I have also done quite a bit of work in the last few weeks on the UI, and so far I have setup a pretty neat little system whereby the game components can individually retrieve instances of windows (which are stacked on the left side of the screen in the screenshots), and set many debug variables in the windows.  It enables the game components to define custom controls (radio buttons, text boxes, slider bars etc).  This is particularly useful for changing debug variables at runtime.  So far the biggest thing missing is being able to load the UI Windows from .xml files, but I will get to this soon.

The Player Classes:

I have been working on Britonia now for a fair few months now, and while the terrain is shaping up quite nicely, I am now going to concentrate more of the player side of things. So here are some components which I will begin in the coming weeks:

HUD –                 Although this is not really a player class, this is quite obviously a very important part of any game, both because it is the players main method of interacting with the game, and also because it will feature heavily on all game screenshots etc.  So far the GUI is setup mainly to act as an interface for debugging variables, and it is very generic.  I have added a basic window system, whereby I can scale, move, dock and minimise the windows.  So I must now start to create the ‘special’ case windows such as ‘inventory, trade, shops, character skills, character paperdoll etc. etc.

Character Skills –    What would an RPG be without avatar skills?  I have played a great many of computer games over the years, and I have had the chance to play around with many different character skill systems.  I have decided to implement the character skills in much the same way as the ultima online skills worked.  For thouse who don’t know, the skills are grouped together by type, so you would have for example, all the combat skills together, each ranging from 1 to 100.  Each skill can be improved upon by using it, that is to say, to improve you skill in archery you would need to actually use a bow.  Now, per group you have a maximum attainable amount of points, say 400.  This effectily lets the player decide how to improve their skills based on how they play.  you can lock skills (to stop gaining/losing points) or complety ignore other skills which you do not use.  Once the 400 points are full for the group, you cannot upgrade anything else, until you drop points from a differnt skill.

Now it has been a long while since I last played UO (about 10 years ago :), so the numbers are just off the top of my head.  I haven’t started drawing up plans for which skills to include, because first I need to know about all the aspects of the game.  The skill points are not just combat related, but also for mining, lumberjacking, walking etc.  I even remember a skill on UO for creating kindling wood from the trees, so you could build a fire and safely log off.  Although I was young, I remember being very fond of how this all worked, so this is what I will aim for.

Bulletin Quests – I plan to start working on the bulletin quest system of Britonia.  The plan for the minute will be to base this on the kind of quests given in the old Elite games.  Only this time, instead of spaceports, you can read the bulletin either in the town taverns or from the town crier.  These quests will be completely procedural and will fall into one of the following catagories:  Assasinate (a person), Eliminate (a group or band), Gather (collect resources), Escort, smuggle, Whereabouts of? (missing person).  I would like to point out that this will not be the main quest system in Britonia, but it is something that should prove easy to implement and effective.  There will of course be a main plot and more involving quests, but they’re for another time.

Player Hands and Weapons –    I hate modelling.  Right, I had to get that out of the way.  I started maybe two weeks ago to implement the player hands and the weapons.  I modelled a pair of hands and a bow and arrow, skinned them, and put them through the content pipeline from xna creators website.  Everything seems to work.  I have added several idle animations, and the weapons follow the hand animations quite nicely.  At the minute though the right hand looks a little – strange.  I have decided to tackle this problem in little bits, once every two weeks I will dedicate 2-3 hours just modelling, because anything longer in blender makes me want to cry.  If anyone is interested I could put some pictures up on the site, but I am happy to wait for a while before showing them.  The only goal I have set for this in the short term (within 2 months) is to have the bow fire and inpact objects, and the sword(s) swing and impact objects.  This should be enough for the game to not impede the rest of the game’s development.  The bow and arrow is about 50% complete.

Terrain Textures (a quick explanation):

I realise in the videos and screenshots that the terrain texturing is looking a little off.  The seams between textures are very visible, so is tiling and so are the LOD transitions (explained above).  Around March time I worked for about a week tweaking the noise and the textures trying to get them to look good for a youtube video I wanted to make.  I finally got them to acceptable standard, and I made the video.  The same night I decided to fiddle around with the quadtree, and I increased the depth to allow for the massive improvment in scale, but then the texturing was way out again.  I mention this because I have decided to wait before re-tweaking the terrain textures.  Before I have fully added trees, and eventually grass and flowers, I will not know how the terrain will look.  So to save time, I will leave it until the ground objects are a little better.  Also, the terrain textures haven’t changed once since I created the texture pack last year.  I am sure that huge improvements can be made in the visual quality by re-drawing the textures in the texturepack.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s