Monday 17 February 2014

Building and Polishing the Jungle-forest-swamp

denseForest began as an attempt to make a swampy area. When that didn't progress particularly well - travelling big wet fields isn't actually very exciting - I started working on a woodlands area instead. When the woodlands ended up looking fairly bland, I mixed in some of my work from the swamp with some jungle vines and Mayan-style temples, and the area started to feel like a place worth exploring.

I think there's a lesson here: mixing together common tropes in uncommon ways can create things that feel greater than the sum of their parts. Many of my favourite films and TV shows did just that. Firefly combined science fiction with a Wild West feel, Awake combined a police procedural with an exploration of grief and travel between alternate realities, and Cube combined the genres of low-budget sci-fi and horror with maths puzzles, philosophical musings and an extraordinarily poor script. The rule seems true of videogames, too; Dead Space earns its unique atmosphere through combining sci-fi and horror clichés. To me, the Asciilands jungle-forest-swamp feels much more interesting (and unexpectedly cohesive) than any of my attempts at making a jungle, forest or swamp.

The first problem came up when somebody with an uncommon form of red-green colourblindness tried to play the map.

The map is primarily made up of grass, trees and water. While I could easily tell apart the shade of green used on the grass from the shade of green used by the forest, they differed only in hue. Take away the ability to distinguish between this subtle difference, and the map ends up looking like this:



To say the least, this makes the forest tricky to navigate. This is especially obvious at the top of the image, where it's nearly impossible to tell at a glance where the grass ends and the treeline begins.

Of course, there's a quick fix - just make the grass darker and reduce the strength of the filter used to make the map look darker and murkier. In the long term, we will have to keep the darkness of different tiles in mind to make sure that Asciilands is playable even with colour vision deficiency.

The revised tileset

This wasn't, however, the only problem.

The layout of denseForest started out looking like this:

The Original denseForest layout

You would begin on the part at the top right corner. The various temples all ended up in the same chamber, allowing for quick travel between locations in the area.

Naturally, there is a secret passage behind the waterfall.

Yet even though the layout of the map was fairly simple, playtesters would spend a lot of time backtracking, getting lost, and having difficulty realising exactly where on the map they were and where they had or hadn't visited. The problem was that most parts of the map looked the same as most of the other parts. You walk by similar rivers, through similar swamps and between similar trees, occasionally coming across similar temples.

One particular problem players had was a sense of disorientation on exiting the temple; each of the temples and surrounding areas looked very similar. To fix this, the next draft of the map was bigger and more complex, but also adjusted to make each area and each temple feel a bit more unique:

The updated denseForest layout

You still spend a lot of time walking by rivers and through forests, but there are more points of interest than before. There are overgrown, ruined temples, more variety in how temples are built, more variation in elevation, and more routes to quickly navigate the map. The water at the south of the map has been set below the grass, helping distinguish it from the rivers further to the north:



The temples have been reworked to make each a little more distinguishable from the others:



To make it obvious that the waterlogged swamp tiles can be traversed, you are forced to walk over some near the beginning of the map to access the rest of the area:



Finally, there's a new cave that you can pass through to access an area that would otherwise have been blocked off:



Of course, much remains to be done. The area as it exists in the moment is just a blank template to be tweaked, adjusted and populated with NPC's, enemies and loot when we begin putting together the full game. But in the meantime, the Asciilands world has become a little bit bigger and a little more varied.  

Sunday 16 February 2014

Items: material posessions

This is what I've been working on since the last post: Items with a focus on equipable items (aka., equipment). The work being done at the moment will be the foundation of the Asciilands loot system.

What do you mean "loot system"?
Pretty much all RPG games and most story-driven action games have items and some kind of loot system. Items can work in one of two general ways:

Focus on consumable items
Games like Half Life have about 10 - 15 guns (which are by far the most exciting items to find) so they need to be spaced out over the course of the game. Every time you play you get the same guns and every who plays will have the same experience using them. Most of the items you collect in the game are consumable items like ammunition or restorative items.

Focus on boundless loot
Games in this category tend to be referred to as "loot games", probably because the experience of gaining access to, and finding additional, better loot is what keeps the game's momentum going in a big way.
This describes games more like Diablo where instead of having about 15 weapons, there are literally millions. This is because the stats are procedurally generated, usually within tiers.
A strong example of this, and the one I've been keeping in my mind while I work on the Asciilands item system, is Diablo 2. There are countless possible gloves that you might find in the game but that doesn't mean you need to inspect each kind. They are neatly tiered so you can know which are worth looking at and which are not even worth picking up. Although there are only five different "types" of gloves, once you factor in all the different properties they can have as well as all the different values that those properties can hold, you begin to understand how a game can be so strongly driven by something that can inject so much variety from what is relatively little content.

Needless to say, Asciilands will have more of a "boundless loot" system. Tiers are important to any loot system so let's take a look at that.

Dropping items in tiers...or...tier drops
Diablo 2 had a clear and basic item tier system: fifteen types of gloves with sequentially increasing stats, countless variants within the tiers but still bound by the limits of the tier to which they belong. Path of Exile, however, has a slightly more complex tiering system: their is an entire set of tiers geared to the needs of each specific class. You are by no means rail-roaded into using gear that the PoE developers think you should use but when you get a feel for the kind of gear that your character get the most out of, you tend to continue looking for gear inside the continuums of your most useful items.
Makes sense? Probably not. For get it then, here's the meat:

This is how we do it
I've been experimenting with a new method in Asciilands; items will be spawned with stats conducive to particular types of characters (with enough variation that you'll find weird items useful for weird builds) however, there will be no sequential tier system behind the items. Instead, there will be a large array of materials that the items can be made out of and the properties of the materials will affect the extent to which the stats rolled on the items will help (or in some cases, hinder) you.

Woah, what? Yeah, it's weird and hard to explain and I haven't seen it done before.
Suppose you were a warrior class. You want an item that adds to your strength and your damage. Some defence would be nice, too. Naturally, you'll be looking for some gloves that add to all these things but if you want to get the best possible gloves for your build, you want them to be made out of materials that are conducive to supporting these stats.

The material system in Asciilands is one that kinda evolved accidentally. Materials will have most of the same properties that items can have but their values will act as multipliers to the items that are made out of them. I'll walk you through an example:

First off, the itemisation engine decides it want to create an item. In this case, a pair of gloves:


Gloves, like any item, can have all sorts of useful properties to improve your little ascii dude in all sorts of ways. The list of properties is rather expansive so I've reduced the list for the sake of illustration.


First thing we need to do is procedurally decide which properties will be affected by this item. This process is not completely random and is designed to boost complimentary properties rather than just scatter-gunning over the entire property list but we're only working with a few properties in the example so that doesn't matter much right now.


In these diagrams, the dice represent where random chance plays a part and the grey blocks are "concrete" or unchanging decisions. In this example, the itemisation engine has chosen the ticked properties to be featured on this pair of gloves.


The stats are rolled and applied to the item before the item even know what it will made out of. The next step is to choose the materials. The materials, like the stats, are not completely random. They need to make sense. Gloves, at the moment, are made of two materials: one for the lining, one for the outer layer. Materials are also categorised in many different ways but gloves look for a few kinds of materials depending on the type of glove. Lining might be light or heavy fabric, outer might be fabric or metal.
Here are the materials for our gloves:


As you can see, the choice of material is random but the properties of each material are unchanging. Also noticeable is the fact that material properties are much lower than the properties on the gloves themselves. This is because material properties act as multipliers*, not increments to the base property.
Also, they sometimes diminish the value or even make it negative. This is used sparingly but appropriately and in ways that make sense. Iron will have very high defensive stats but will reduce agility because of its weight. Gold will have high value but negative electrical defence because of its conductivity etc.

* When I say "multiplier" what I means is "a number that gets messed with a a bit and works with a bunch of other numbers that eventually produce a number that multiplies the base value.


Right, so now we have our item with its base properties and the materials from which it will be made which will make changes to those properties. Iron has strong damage and wolf pelt is good for freedom of movement and protection from the cold. Let's take a look at how the numbers are actually decided:


Right! What? Ok, the only stats that are even evaluated are the ones that are on the item. Iron reduces agility but the wolf pelt boosts it up again, just not as much. Agility ends up taking a negative hit. Fire defence, on the other hand, is supported by both materials and just happened to roll highly on the gloves. This kind of line-up of complimentary conditions will be what makes some items stand out for certain classes.

Ok! So what did we end up with?


A pair of gloves that hoped to be agile and fire proof. Sadly, the materials used were too heavy to be agile but both materials are fairly fire resistant to that part came through well.
Both materials are worth a bit of money, though, so that's nice.

This would be a fairly middle-of-the-road item and probably either sold or discarded unless it was fulfilling a certain need. A lot of loot hunting will be about getting just the right stats rolling with just the right materials to boost them up.

Wait, what about those tiers?
Tiers, as explained earlier, are important when it comes to deciding which gear to even consider using. In Asciilands the full tier system hasn't been worked out yet but at this stage, it looks like a large part of it would be knowing which materials boost the properties that help your build and trying to find gear made from those materials. Base level item will have to be communicated some other way but I feel the material system (And the many, many combinations of item tiers that it affords) is an interesting way to communicate and item's likely properties.

Materials also have colours (which are used in the sprite) and "collector" properties (like "aesthetics" and "mystique") which will make items worth more to some vendors than others. I'll post more about this as those particular systems develop a bit more.

That's it for now! Hope you enj...oh right...screenshot. Let me see...


testIsland.map started getting a bit bloated with a whole lot of test awfulness so I made a new map for testing new features. Goodbye, testIsland; hello, debugMenagerie! It's more organised and conducive to the kind of testing required at this stage of development. The northwest corner of testIsland was created while movement was still being tested and we're a bit past that now.
This is the item room where we can test the things items can do. There's a chest to put them in, a vendor to sell them to and tables to stuff to pick up and test. They'll fill up as more item types emerge and I have no doubt that this room will require many extensions.