Saturday 28 September 2013

Get it right the first time, that's the main thing

I've been quiet around here recently for this reason: I've had not much to report. Not much of interest anyway. As ever, I've been re-writing my old mistakes for the sake of future ease of continued development. Here's the thing I was redoing: ALL BEHAVIOURS.

It's been a pain since every interaction between every object is handled with a variety of behaviours. This is the third re-writing and the most comprehensive. It doesn't just work better than it did before, it works a whole different way.

The obviousness of the need to go from the old trait system to the new behaviour object system made itself apparent when I started writing the code for combat. Combat between two objects using weapons. The weapons are procedurally generated meaning that their properties are chosen at random (but kind of "channeled random" so that they kinda make sense e.g. no fire AND ice damage) and then these properties need to be read from the weapon and "applied" to the victim of the attack. This was a tricky thing to do but then the more the method for doing it cleanly evolved, the more it resembled a better way to handle every interaction in the whole engine!

Consider this: how is an interaction between two combatants any different to the interaction between any other two objects? Only that in combat, an object is kind of surrogating the interaction on behalf of its owner.

Wait, I think I've reached the point of this not being at all interesting.

I'll tell you this and leave: The re-writing of behaviour is nearly finished which means the behaviour of complex, procedurally generated weapons is almost finished which means combat is about to be actually interesting!

Oh hold on, need a screenshot...just let me grab something...


This is kind of interesting and new. Sort of. The weapons along that wall are all procedurally generated. There are separate algorithms for creating swords or axes / hammers and within that they have a bunch of rules (e.g. if the sword has a guard over the hilt like the sword second from the left, a small defence bonus will be added). More on these algorithms as they evolve!

Wednesday 11 September 2013

Losing Perspective

While Jared has been busy refining and building up the Asciilands engine (now with rudimentary combat!) I've been starting to flesh out our palette of sprites and tilesets beyond the basicTerrain.ts of testIsland. Before too long, we'll have all the video game staples: grassland, forest, desert, jungle, snow world, swamp. The challenge will be to create and use them in a way that doesn't just feel inspired by the forestworlds, desertworlds and iceworlds of video games past.

I think part of the solution involves getting a better sense of what these places actually are like outside of, say, Minecraft. So today I decided to learn about swamps, and bogs, and muskeg, and bog mats.

The swamp land will probably be closer to the beautiful alien landscapes muskeg creates than traditional video game swamps. With swamp monsters.

With apologies to National Geographic


Bog mats probably won't feature in Asciilands, but they are incredible:

From Written in Stone; the lake is 20 feet deep


In any case, I've finished work on a very videogame-y test area that swaps to two dimensions. Even though everything works exactly the same as anywhere else in the game, abandoning the isometric perspective makes everything feel like a Super Nintendo era platformer. I'm not sure if it's a good fit for Asciilands, but the effect is interesting. Have a look: