Thursday, 24 April 2014

Lander - Dev Blog 3 and a bit

So the last week or so of work has been in fits and starts, with RL interruptions and Easter holidays and all that jazz, but this is the first update with actual vehicles in the game! There's a set of different "tools" now which the player can scroll through (for digging, placing blocks, building vehicle parts, etc), I've been making more tweaks to the player movement and voxel loading, and you can place launch clamps and vehicle parts (just fuel tanks for the moment). So, without further ado, the summary screenshot:

The launch clamp serves several purposes - from the game's perspective, it's the join between the dynamic, mobile vehicle model and the static terrain, so I don't have to be constantly checking if the player's done something daft like removed the bottom part and left a vehicle floating in mid-air - or at least, there's only one place I have to check. It also gives somewhere for the player to move and rotate the vehicle while they're working on it, rather than pretend the player is some sort of superhuman that can lift and rotate spacecraft at will. Finally, any interface activities the player needs (like saving or loading vehicle designs) will happen through the launch clamp.

The next chunk of work is to develop the vehicle object so that it's more than just a set of parts - mechanically it needs to merge all the parts into a smaller set of render & collision meshes, add up all the fuel tanks, mass and engines so it can simulate the actual flight, and possibly track more complex details like which areas of the vehicle are air-tight.

Monday, 14 April 2014

Lander - Dev Blog 2.5

Alight, this is Friday's and Monday's update rolled in to one...

My original plan was to get planet terrain rendering out to the horizon (with a sort of adaptive scaling as you gain altitude, or move around the map) but for a plain, flat heightmap, and then get the vehicle building interface working over the weekend; but it ended up making more sense to work on the terrain generation so that it scaled both in first-person view, and also up to continents and land-masses. There's a bit of bodging in there to get it just right, but you can see that the local terrain's come out pretty nicely:

You can also see a Mercator projection of the planet map (about the size of Earth), so it's distorted around the poles but you can see the continents pretty clearly. That's one continuous scaled heightmap, so the current terrain is smack in the middle of that map.

Most of my weekend went into that, and a bunch of optimising the voxel generator so it loads the current scene (262,144 voxels) in ~0.36 seconds and ~7Mb, which is good enough for the load I'm putting on it right now. I'm partway done on the heightmesh - in theory, it's just a surface mesh heading out to the visible horizon, scaled so it fits into the camera's clipping planes and follows the same heightmap (at a lower resolution) as the voxel nodes - but I've a few ideas to try out for it, based around how to progressively load it into the scene as the player walks or flies around the map.

Objective for Wednesday, then, is the launch clamp - a special "voxel" which you attach to the ground, and onto which you build your vehicles.

Wednesday, 9 April 2014

Lander - Dev Blog 1

I'm actually in my fourth week of development on Lander (excluding a week's holiday), but 90% of the work done so far is reworking the 3D coordinate system to work on an interplanetary scale, so there's not been much by way of shareable images.

But no more! I'm finally getting stuck in to actual gameplay mechanics, and the basic voxel engine is working:

You can walk around the surface, pick up and put down blocks, and the whole thing is correctly positioned 6371km above the centre of a spinning (though presently invisible) planet that's whipping round a distant sun every 365.25 days (hence the shadows). You'd be surprised how complicated that last bit actually is (here's the Wikipedia summary).

I'm polishing the digging/inventory/placing mechanics tonight, then for Friday's feature I need to extend the terrain model out to the horizon - using voxel nodes (like the 10x10 square you can see) out to about 1km, then a height-mapped curvature mesh out to the visible horizon, in a way that will adapt as you fly into the upper atmosphere.

Patreon - Dev Notes, the First

So, for the past few weeks I've been working towards an inaugural game for the Patreon page I'm aiming to set up; it's one part demoing to patrons how much I can deliver in the 4-6 weeks I expect each game to take, and two parts showing myself how much I can get through in 4-6 weeks. The longest (unpaid) projects I've actually run to completion are 48hr game jams, and as those usually involve less than an hour's sleep a day, they're probably not the best yardstick...

The current project is nicknamed "Lander", having started as a remake of the classic Atari arcade game Lunar Lander and spiralled into the illegitimate lovechild of Minecraft and Kerbal Space Program.
Long story short, it's a sandbox game in which you build rockets, fly into space and explore some PCG planets; but unlike (for example) KSP, you do everything from a first-person perspective - the terrain is a big, voxelly map that you can rebuild into scaffolds and launch pads, and (if I hit enough milestones) convert into resources for building your rockets. I think the lack of central build & launch location (unless you make one), with the ability to build & rebuild vehicle wherever you are, should give this a very different atmosphere to some of the existing space flight simulators.

The plan is to get a workable feature finished every Monday, Wednesday & Friday (with corresponding blog update) to stop me getting lost down a rabbit-hole of quaternions like I have with Lander - anyhow, that's the quick intro, next up is the current progress report.