Monday, May 2, 2011

A Valley Without Wind Pre-Alpha #10 -- Overworld Maps, Soft Focus, and NPCs

It's been a busy two weeks!  This is the game at 14 weeks of development.  The new screenshots are on the official AVWW page, and here's the new video:



Here's a quick rundown of what is new since update #9, followed at the bottom by a few longer explanations of some of the items (overworld maps and soft focus in particular):

The Executive Summary

The most visually apparent change is the new soft focus style around the entire game.  It makes our colors more saturated and dramatic, it ties all the elements together, and it's really a big improvement.

We've also hugely redone the way that overworld sections work, and it's way more varied and interesting now -- marrying some procedural techniques with some aspects of hand-crafting.

And last but definitely not least, we've put in a ton of work on crafting, NPCs, settlements, and more -- all that "what is my motivation for playing this" sort of stuff, versus the mechanics of how to play.

Overworld Map Changes

* We now have a map editor, which is a standalone .NET 2.0 program.  It's got a variety of functionality for drawing, filling, smoothing, and so forth.

* Overworld chunks now use heavily-randomized maps to generate a  structure of obstacles, entrances, lost-in-windstorm points, and open paths.  This marries designer creativity with procedural processing, resulting in thousands of possible obstacle setups per individual map; and when combined with the existing randomization and chunk scripts for populating outdoor areas, the possibilities are multiplied even further.

* We now have three maps in six variants, four done by myself and two done by Erik.  This already creates a huge variety, but there's much more to come!  Some are very open, and others are more closed and twisty at the moment.

* All of the overworld chunks are now 256x256 in size (many of them were previously 128x128).  This is fourfold increase in size, making each tile on the world map something like 2/3 the size of the the entire Zelda 1 world map.  The maps that are applied also now make them vastly more twisty, which makes them feel even larger.

* The Ice Age (thawing and regular) now are the first regions to include new "Point of Interest" scripts, which define certain unusual landmarks that are not centered around a building.  Very little has been done with this so far, but a lot more will be in the coming months.

* Having a sky visible over the top of a cliff used to be something that was more limited and which was built into the chunk script itself, but now it's randomized by region type and these can appear at any time.  This makes for less duplication of chunk scripts while still providing more variety.  These also dynamically combine themselves with the overworld maps, making for even more variance.

New Entities And Background Tiles, Etc

* We now have both flowing water and flowing lava in many chunks (lava only in the lava flats, and with three different visuals possible all in one chunk), and these are presently always bordered by one of six different kinds of sedges (plants) for water, and one type of burnt-sedge for the lava.

* We now have a new shadbush obstacle type that is used in places like the woods and small towns.

* We now have a new winter mahonia type of reed, which is dramatic bright red and now used in the ice age in some circumstances around buildings.

* Added in a new Weed Patch type of plant, which is a tall and imposing sort of armpit-level undergrowth that you can walk through.  Presently this is limited to Small Town areas; some are absolutely plastered with it, while others just have a few spots of weeds here and there.  It really differentiates them more from other areas now.

* Added two plum trees and one walnut tree, which can be seen in the various grasslands areas (walnut trees mainly in the grasslands-with-tree-clumps regions).

* Added about sixteen new vehicles (including new ice age futuristic cars), including many more that are broken, flipped over, etc.

* Added three new "factory stacks," and some concrete barriers, that currently show up in the junkyard and later will be used elsewhere.

* There is now a second type of sky, in addition to the one we've had since the first developer diary!

* Added in a higher-level new The Deep region, which is an evil place filled with pulsing darkness.  We're not going to be showing screens or video of this, players will have to find them in-game on their own!

* There are now chasms, rocks, and large birch bushes that work as obstacles on the world maps in addition to the aforementioned lava and water.  The south, east and west sides of the chasms aren't completely polished yet, but they're getting there.  Most of the angles and the north are the way I want.

* There are now shortswords, broadswords, and rapiers in addition to longswords, and they all handle a bit differently (stabbing versus slashing, speeds, powers, etc).

* Three massive new ice age fossils are now seeded as occasional "points of interest" in the ice age regions.  These are a good example of something that is interesting but which isn't a building, which serves as an anchor point on the map. 

Minimap Improvements

* Dropped item bags (that a player intentionally put down, or dropped when they died) now show up as a blinking orange blip on the minimap, so that they can actually be found again in the middle of large chunks.

* The minimap now shows obstacles as dark tiles, aiding in actually finding your way around.  Additionally, trees, hatches to the underground, vehicles, shipping containers,and roads all show up as a middle-dark color, adding extra shaping and information to the minimap.  All of this is only shown in parts of the chunk where you've actually found the Point of Interest that reveals that section, of course.

* There are now three sizes of minimap that can be toggled through using the M key (128, 176, and 256).  128 is the old size, and 176 is the new default.  Personally, on my really large screen I really like the largest minimap size.  It's really easy to see a ton of detail even in giant outdoor chunks on it, now.

* The player dots on the minimap now blink between a larger state and a smaller one, making them MUCH easier to see and find.

* Entrances are now shown in the minimap, instead of explored points of interest (which are mostly pointless to show, anyway).  The entrances are now shown in full red, rather than light red, so that they are much more visible, as well.

* The region level is now shown in the in-game hud (that's pretty important info!).

Settlements And NPCs
* Settlements are now a part of the game, which is a huge step forward, although they are fairly simplistic so far.

* NPCs who live in settlements can ask you to forge a safe path (using wind shelters) between their settlement and another nearby settlement.

* NPCs can now ask you to clear the area of monster nests to protect the settlement they live in, in order to gain more trust for them.

* NPCs can now ask you to explore nearby regions to their settlement, providing them with some degree of protection from the unknown.

* NPCs can now ask you for a certain quantity of an item (which if you don't give them, they probably will eventually get on their own, anyway).

* NPCs in general now have an underlying system of hopes and needs, and they have intermediate goals along the path to their hopes.  These are things that can be accelerated by your intervention, but many of these are also things that the NPCs will eventually solve on their own without your help.  So you can help out where you want, without being forced to babysit a guy who wants to be a better blacksmith or whatever, if you don't particularly care about his smithing ability.  But if it's useful to you, you can help him along much faster!

* Characters now have crafting profession tiers, and get more proficient with crafting through various means (as hinted at, above).

* NPCs are now able to migrate from one chunk to another, useful for when they agree to migrate to a settlement (which you can now do, in a testing sort of fashion that's the basic framework for what we later have planned).  They do this only after you've also left the chunk they are in.

* A lot more internal work on the state of NPCs in general is now in place.

* NPCs can now have various personality traits that affect their hopes and needs, such as professional pride and protective, as the two we're currently working on.

* NPCs now have an interest in actually building up their settlements, and there are now those with a Builder interest that build small homes and bunkhouses for other NPCs to live in.

Crafting

* There are now a variety of metal and crystal material types, all used for crafting different kinds of weapons and equipment.

* All of the various spells and equipment items now have some sort of crafting recipe that can create them.  And in the case of physical weapons like swords, etc, those have multiple metal tiers at which they can be crafted in.

Gameplay

* There are some "monster nests" that can now be found around the world, and which spawn monsters.

* It is now possible to Wait on the world map, advancing the windstorm counter by one, rather than having the only way the windstorm counter decrements be to move.

* Added a new Light Snake ability to the third ability bar.  It replaces the idea of the light tracer, this time with a slower, snake-like stream of particles that move past obstacles and then clump somewhere.  The snake lasts for 10 seconds and casts quite a lot of light as it moves.  It has a very long logistical recharge time of 15 seconds, though, as its main cost.

* More work on the melee weapons and effects, but it's not quite there yet.  We are now planning all manipulation of swords and such to be telekinesis-based, which we have some cool effects for, but it's only partially implemented.

* The system for cooldowns has been made vastly more robust, and now prevents things like spamming the healing while also mashing the attack buttons.  You have to actually be strategic and thoughtful with things, now!

Visual

* Pretty much ALL of the in-game graphics have been post-processed with a new Soft Focus effect that makes the entire game have a super attractive (to us, anyway) stylized color that also is much more cohesive.  Boy is this a big difference all throughout the game.

* Graphics for the twigs in the lava flats have been replaced with vastly nicer-looking burnt-bushes.

* The lava clouds in the lava flats area are only half as intense as they were before, aiding visibility and making it look nicer in general.

* The visuals for roads have been upgraded somewhat.

* The way that bushes at the edge of cliffs are done has now been completely changed -- they are no longer immobile, and are now glowy and evil looking (what I'll call "The Deep" look).  I'd always intended for it to be the case where the earth was pulled down into a supermassive chasm where the sky is visible, partly by the force of evil plants, and now they look it. :)

* There's a very cool new heal visual effect.

* Lots and lots of spell effects have been rendered out, although they haven't been coded in yet.  Coming soon! :)

* The new lighting model now has dimness in the center eyesight areas, like the simple eyesight model does.  I had thought it couldn't be done, but it turns out it sure could!  It's quite a big improvement, as players had suggested it would be. :)

* Also visuals for several new kinds of enemies that we haven't had time to actually add to the game yet (giant amoeba, etc), but which look cool.  Also coming soon! :)

* The player ghost and player bones states now have an animated "spirit fire" effect.

* Characters now glow with a color that is relevant to their spell as they cast spells.

* Finally got around to updating the remaining world map icons that were still painterly.

* There are some other new ground backgrounds, such as the pine needles in the evergreen forest areas.

* Espers are now ghostly white.

* Player characters, NPCs, player bags, and dropped items all now have a new ShouldRenderOverlay property set on them, which makes it so that their outline is always drawn on top of themselves (using the new HardOutline), which gets drawn after basically everything else in the game.  This makes it so that you can still see the outlines of these things from behind solid objects, grass, or whatever else.
** The MustBeVisible property has been taken off these objects, and the Sparkle ongoingcondition is now gone from the droppeditem object.
** I'm undecided on whether to always have this be on for player characters or not, as it can be a bit annoying/disconcerting in grass or shadows, but for dropped items this is definitely the way to go instead of the sparkle -- and at worst I would relegate this to a settings option, since some players have specifically asked for it.

Non-Visual

* Improved the AI for wandering enemies such that if they are stuck at a specific point for more than a quarter of a second, they'll choose somewhere  else to go.

* Several performance improvements have been made; it was already a really high-performance game, but this fixes some relative slowdowns with high-grass areas and with chunk-gen.

* Lots and lots of name files have been prepared by Erik, ready and waiting for new character sprites of different genders, ethnicities, and time periods.

* World files are now compressed to disk in a very CPU/RAM friendly way that shrinks each chunk down from 1.8mb to about 22kb, on average.

* Plenty more music and sound work, as usual!  In particular there's been a big batch of sound effects this time around.

More About Soft Focus

All along I've been trying of course to make a unified visual style for the game, and the chief way that I've been doing that has been with the painterly style on all the sprites.  That works very well, but that's detail work and only shows up in full-size screenshots or really uber-detailed video of the sort that youtube doesn't really do.  Or any other streaming service.

What that has left us with is something that doesn't really reduce well at all, and my main way of trying to combat that was with special effects.  Again, that was working pretty well, and certainly explosions and fireballs draw the eye.  But we can't have those in every last screenshot, and it doesn't really help with the overall perception that the art just looks kind of cheap.

This is ironic because, even though the art is actually commodity models rather than custom ones, it's the sort of models that are unsuitable for games because their polygon counts are too high -- they have above average detailing, higher than something like Crysis, even, in many cases.  The state of raytraced modeling in non-realtime formats is just lightyears beyond anything that can be done in realtime raster formats (aka games), and that's something I thought I was taking advantage of pretty well -- but again, it doesn't reduce well, and everything in the game is pretty small despite being a lot more HD-sized than most other games out there that are sprite based.

So I had been thinking about about two weeks ago, and I was looking at the latest raytraced art by one of our community members (eRe4s3r), and I was for the jillionth time thinking how annoying it was that since I'm rendering all these objects into sprites, I lose a lot of the advantages of raytraced art such as having cross-object dramatic lighting, ambient occlusion, and so forth.  A lot of those effects are what really make eRe4s3r's images "pop."

And that's when it hit me: in a macro sense, it's not so much the fancy effects, as it is what it does to the color value of the image, and how that color interacts with nearby objects.  What makes that image so darn attractive, even when it's tiny, is that the colors are really stylized and over-dramatic and saturated.  I'd originally been going with a down-saturation look  for AVWW, thinking of Silent Hill mostly, but that was a big mistake as it just makes things look bland.  Silent Hill is an awesome game, but it looks bland -- that's part of what makes it feel gritty and scary.  But that only works in true 3D, I think.  Bad role model.

Anyway, long story short, what I've wound up doing is basically doing a "soft focus" effect on all the sprites, which accomplishes two things.  First, within each sprite it adjusts the colors so that they are over-dramatic and heavily stylized, while still keeping the underlying shape and brush strokes.  In the case of some of them, it makes them overly dark shapes, but that sort of contrast and attention to overall form rather than detail actually serves the game well, I think.  That can't be every object, but it works well when it's about 10% of them.  Secondly, it also applies a bit of a Gaussian blur haze around each object, such that it almost seems to "bounce" its color to nearby objects -- mimicking ambient occlusion without actually using it (since we can't in any realtime game prior to DX11, and that's only for basically Crysis, anyway).  This helps to tie each object to its surroundings a bit better than before, which is something I'd really been struggling with for the buildings in particular.

All in all, this creates a style that minimizes better, in some cases much better, aside from looking much better full-size.  The colors are more attractive and vibrant, and the overall style of color hues has more in common with games like Bioshock and Crysis than they do with any 2D games I can think of.  I was also inspired some by the Death Rally remake on iPhone, the screenshots of which really make me salivate.  In some respects, this new style is a bit over the top and surreal, sort of like the Twilight sections of Zelda: Twilight Princess.

So this is a real departure in overall visual tone and look, but the staff has been really excited about it, which bodes well.  And personally it's the sort of thing that I'm just gaga over, I just can't get enough of colors like that!

More About Overworld Maps
Previously, an individual chunk only had two levels of detailing: it had a general "chunk script" that it would follow, which is a dynamic very-broad-recipe for chunks that players can create and which we also create; and it had sub-scripts for creating buildings and seeding stuff around them.

This was okay, but it tended to lead to chunks that felt big and empty.  Really, they also felt smaller than they were, because the shortest path between two points was always basically a line.  It wasn't a very creative use of the outdoor space (but hey, that hadn't originally been planned to be the end state for outdoors areas, anyway).

Now what we've added in is a third layer of detailing, with a fourth coming soon.  The third layer is the overworld maps, while the upcoming fourth will be the "points of interest seeding" that I talked briefly about above.  More on that in another week.  The overworld maps alone create a massive change to the feel of the overworld areas, making for blockages and dead-ends and paths you have to explore to find your way through.

For instance, it's possible to have an area on the screen that you can't get to without finding a long way around, which is new for this game (not that new in adventure games overall, of course).  Now it's also possible that there are only 1-4 exits from a given chunk to the overworld, so when you get lost in a windstorm you might be really lost; it's no longer a simple matter of walking in any direction and living until you escape.

Here are some examples of how a single map from the map editor can vary in even the broadest senses:
There are four examples each of the Slashes and Vines map types, and three of the Tiger Stripes map type.

Most of the dark areas on the map are obstacles like water, lava, rocks, chasms, or bushes -- that is randomized and you can't tell from just the minimap -- but some of the big areas that are completely blocked are actually sections that are completely surrounded by such obstacles, and which are thus inaccessible to the player.  These sections won't have any buildings or anything else useful in them, and so the player doesn't lose anything by not being able to get into them.

Another thing you'll notice is that along the top of some of these maps there is a "hairy" line -- Slashes 2-3, Tiger Stripes 1-3, and Vines 3-4.  Those are actually cliff edges to open sky, with the evil black plant tendrils being the hairy lines in question.  Those open sky areas were not defined in the map editor, but get seeded in randomly depending on the type of region the map is being used in (a lot of things vary by the region, such as even what sort of obstacles are employed, and a single map could be used in many regions).  All of these minimaps are from thawing ice age plains, which has a very high chance of open sky cliffs, which is why you see so many of these having them.

You'll also notice that some of these are very open, and others are very closed.  Slashes 3-4, Tiger Stripes 2, and Vines 1-4 all are the closed variants of themselves.  In these closed versions, there is a 50% chance of having only a single exit from the entire chunk, and a 50% chance of having 2-4 exits.  There is only ever one entrance to an outdoor chunk, period -- you always come in the same way. 
But whether that is the only way out, or whether there are a few other exits, is the question.  Of course, in the Open versions of the maps, there are quite a few ways out of the chunk.

All of that was just speaking to the very broadest level of description about the chunk -- the new overworld maps.  Then of course the pre-existing two layers, the chunk scripts and the sub-scripts, kick in.  That's where you see all those little details on the minimaps: the little rectangles with red dots are all buildings of some sort, and you can see how widely they vary in their position.  The little white dots are all monster spawners.  And the various lighter gray shapes are things like trees, vehicles, and other destructible obstacles.  If there were any roads in these sections (which there aren't), you'd also see those in light gray like that.

So.  As you can see, there's now a much larger amount of variance in how the surface regions get constructed.  All of these are just from three maps alone, all in a single chunk with just I believe one chunk script and maybe two sub-chunk scripts.  That's a huge amount of variance from relatively few inputs, because each type of input is so randomized in and of itself.  And as we -- and players! -- add more and more inputs -- more chunk scripts, more sub-scripts, more maps, and the upcoming "points of interest" scripts -- the amount of variance is just going to skyrocket even further.  This is a good example of the power of combining hand-crafting techniques with multi-layered procedural techniques!

More About Surface Region Sizes
In the past, most of our chunks were sized at 128x128 tiles.  Each tile is 64px square.  The various "hostile" chunks were sized at 256x256, however, to make it harder to quickly escape from them when you could just run in a straight line to get out from any side.

Now, of course, the chunks are twisty and sometimes labyrinthine, so it's always slower to escape from them, anyway.  So did we shrink the hostile chunks?

Of course not!  We instead increased the size of all the outdoor chunks to 256x256, making that our new standard.  The primary reason for this is space for buildings -- I was finding that in maps with any degree of twisty passes, there just wasn't enough room to have buildings in unpredictable locations.  You'd wind up with the buildings always clustering on the right, or whatever, which made the maps not seem very varied.

Bumping the map size up 4x, from 128 to 256 squared, solved that problem really nicely, as you can see from the example minimaps above (as well as the minimaps in the video).  This means that all of the non-hostile outdoor areas are now nominally four times larger in area, but really the feel of it is that they are 10x larger or something along those lines.

The reason is simple pathing: before, to get from point A to point B, it was always a line you'd walk in, except to go slightly off the line to go around trees or buildings.  Now it's sometimes a very complex and maze-like situation to get from point A to point B, which means that the distance you have to travel to get from point A to point B might be much further and more interesting.

None of that is exactly ground-breaking for adventure games, as they all use the same techniques in terms of breaking up the landscape.  All the way back to Zelda 1, you see that sort of pattern.  But it's new to this game this week, and it's really interesting to me to see how much that one simple change really transforms the entire feel of playing the game.

Speaking of Zelda 1, there are some interesting size comparisons to be made.  Zelda 1 had 8x8 pixel tiles on each screen, and each screen was 32x22 tiles in size.  So that's 704 tiles per screen.  AVWW has 64x64 pixel tiles, and a 1280x1024 screen can show 20x16 tiles at once.  So that's 320 tiles on the screen at once -- there's a lot more detailing on each tile, obviously, given that each of our tiles has sixty four times as many pixels as a Zelda 1 tile (8x8 = 64, 64x64 = 4096).

So in some senses it is a little more "zoomed in," but you're also getting a lot more detailing on each tile.  It's interesting to note that the beloved Zelda: Link to the Past made the same decision: it moved to a 16x16 tile size, four times larger than that of Zelda 1, and it could show 16x14 tiles on-screen at once (the SNES output resolution was 256x224).  That's equivalent to playing AVWW at 1024x896, which is still plenty zoomed out for both AVWW and Zelda 3.

Okay, enough about screen resolutions -- let's talk about map size, which is actually a lot more interesting.  So, Zelda 1 had 704 tiles per screen.  The entire Zelda 1 overworld was made up of 16x8 screens, so that's 90,112 tiles in the entire Zelda 1 overworld.  Since the AVWW surface chunks are now 256x256, that's a total of...65,536 tiles in a single surface region of AVWW.  Note that each tile on the world map of AVWW is a region.  So by the time you've traversed two of those regions, that's more surface area than the entire Zelda 1 overworld.

To those who had worried that the surface chunks seemed a bit on the small size (at 128x128, that would have been 16,384 tiles per chunk), that's definitely no longer the case!  Not only are the chunks now more twisty and interesting in their shapes, they are also now larger and have more stuff in them.  And we're only going to be packing in more and more stuff per chunk, too, which is a big part of what's coming up for us in the next few months.

Until Next Time!
Lots more coming down the pipe soon, as always.  Keith is hard at work on NPCs, settlements, and that sort of thing.  I'm doing more stuff with chunks and seeding, and then moving into underground areas and interiors again, as well as some more spells and art stuff.  Pablo is hard at work as always on music and sound.  And Erik is working on more maps, "wiring up" new objects that I do the art for, more randomized names for things, and so on.  Stay tuned!

Monday, April 18, 2011

Q&A: In What Ways Is A Valley Without Wind Randomized?

Question from leekster: I was just curios how much of the game is procedurally generated? Is it in the vein of Dwarf Fortress, where all of it is random? I understand monsters can't be random due to all the animations and textures. But are spells randomly generated? Thanks for your help.

Answer from Chris: Well, this is a really good question, but also a really complicated one to answer.  I could answer you with a lot of technical details, or I could try to answer the spirit of your question.  I suppose I'll try to do a bit of both.

Dwarf Fortress As Your Example
First, to clarify, though: Dwarf Fortress is not nearly "completely random" as you imply.  This isn't a criticism of that game, but I think that if I'm going to be able to answer you we have to define our terms a bit here.  I've only played a little bit of DF, but for the most part I find that it has lots of pieces, but and high randomization with how those pieces fit together, but the overall algorithms are anything but random.

For instance, in DF all the various ground types are predefined -- Sandy Clay, layers with Aquifers, and dozens of others.  So far as I know, all the enemy and dwarf types are also predefined -- but boy are there are a lot of them.  In terms of the world map regions, those are also defined by the designer, but plentiful.  They are "random," but not truly so -- you get clumpings of regions, you get islands, you get rivers, etc.  This is randomized algorithmic, not pure random.  You don't get things like a water tile next to a lava tile next to a grassy tile next to a snow tile; things are randomized only in the bounds where they make some kind of sense.

So in a lot of senses, DF is not very random at all -- I would argue that 80% of the game isn't random at all.  This is also true of AI War, which is also known for being pretty random, if not so plentiful in its pieces as DF.  But that other 20% that IS randomized is what makes the game feel "completely random."  That's a really important distinction.

AVWW Is Mostly Like That
Now, to answer the spirit of your question: from what I have seen of DF, I would say that AVWW will have a similar degree of randomization overall.  AVWW will also have a similar or greater degree of randomization to AI War.  The tricky thing about this sort of algorithmic randomization, though, is that it requires a ton of input in order to generate a lot of randomized output.  AI War has had about two and a half years to build up, and DF has had... I want to say seven years, but I'm not positive.  Maybe as little as three.

At any rate, earlier in their life cycles, both DF and AI War felt "less random," even though they were just as random, because they had less content.  If you have three things to choose from at random, that doesn't seem very random even if it is.  If you have three million things, it would seem very random to choose between such items even if it's not random at all, or only partly random.

AVWW, of course, won't ship with three of anything -- nor with three million.  My hope is to have dozens or hundreds of each type of thing in the game at 1.0, though, so that there's a high degree of "this feels random" that we can then continue to build on with free DLC and paid expansions as we have with AI War in the two years since it came out.  My expectation is that AVWW will feel considerably more random and content-ful at 1.0 than most games on the market, but that it will truly start becoming crazy post-release, assuming players are interested in that.

Specific Examples
So, that was all pretty general and vague, but hopefully it answers the spirit of your question, which I think is important to do.  Now to a few specific examples:

Monsters of course aren't random because that wouldn't have much meaning.  How do you create a random monster?  The closest thing I can think of is spore, and I think we can all agree that even after years of a large company pouring in resources to creating "random" creatures, the result was underwhelming.  This is a case where I think that human creativity trumps randomness, and if you have enough monsters that are interesting then you wind up with something that feels varied and interesting, which is the point.

That said, the way that monsters are seeded into the world is hugely random, although there are various "population patterns" that we use to make sure that things don't fall out of bounds -- this is akin to making sure there's no lava or tropics in the arctic zones of DF world maps.  Algorithmic randomness is a big pattern in all the games mentioned here.

Spells are pretty much the same sort of story.  They aren't random because I'm not sure what that would really mean.  In the closest example to "random" for spells, Magicka, most of those spell combinations that players "discover" were actually anticipated by the developers and programmed in.  Those art effects and the way the spells work has to come from somewhere.  Don't get me wrong, their approach was brilliant and fun, but it also wasn't very random in the case of most of what players encountered -- it only felt random.

Of course, they did have some genuine randomness built in to the areas that they didn't specifically code, and some of those devolved into some balance-breaking superspells that they had to deal with.  Not unexpected, and not even tragic, just the cost of doing business when you have any random component.

At any rate, spells in AVWW aren't planned to be random or combinatorial, although we do have a pretty interesting slots system that we'll be unveiling soon.  Basically letting you customize and combine various types of items and equipment to get some more unique, if not random, results.

More to the point, which spells you get at any given time will be pretty random.  You have to find the right pieces to make these spells, and as you level up you'll want to also craft higher-level spells.  So if you get a Fireball I gem, you won't just use that for the rest of the game because it's your favorite spell.  You'll eventually craft Fireball II and maybe even Fireball XIV if you play that long (that's like 140 hours in one world to get a level 14 spell, we estimate).  So your equipment loadout is going to be heavily random as well as changing on an ongoing basis as you explore around and craft new stuff.

Terrain is another good example of where algorithmic randomization comes into play.  When you look at the DF world map, for example, all the worlds are different in their details, but their very broad outline is always the same, right?  Cold arctic and antarctic at the north and south, a realistic temperature spectrum between them, and water in realistic bodies with one or more land masses in between them.  When you generate a new world in DF, it looks like a reasonable facsimile of a world, not like some cut-up messy soup of a world.

Through my work on AI War, what I've really found is that it's important to have multiple layers of randomization.  If you just have one layer, even a really good layer, it doesn't feel that random.  If you have ten layers each with some hand-crafted parts and some random parts, you get multiplicative complexity that feels very random -- and yet still also makes sense.  This is something you can also see evidence of in the DF maps -- you have regions and subregions and types of ground layers and hostiles and so on, all nested within the overall world creation algorithm.

Terrain generation in AVWW works in much the same way, in that there are some broad not-that-random-but-still-somewhat-random algorithms in play, and then nested within that are many layers of randomness.  So far we're only partly through actually getting those layers all up and running, but as each layer comes online it makes the game leap forward in terms of how varied it is.  Hopefully by our next video I'll be able to show off the next major outdoor layer, which I'm quite excited about finally getting to.

Characters are another good example of randomization.  Sure, we only have x number of sprites (right now 2, but hopefully about 60+ by the time we launch 1.0), but there's a ton more to a character than just their visual look.  In terms of names, there are literally a few million possible combinations of first and last names per sprite.  In terms of actual stats, we have a system of stats (physical attack, magic defense, etc) that get randomly rolled per character out of a pool of points.  This is pretty familiar to any western RPG, really, but we don't let you re-roll.  You choose from the characters you meet, which has a pretty interesting element to it on its own.

So that's a few examples of our philosophy of algorithmic randomization, anyway.

Randomization Vs Customization

I should also note that when it comes to "random" spells or weapons, perhaps the question was if they would have randomly-rolled stats.  That's something that equipment in games like Diablo and Borderlands has.  To me, that's a system that has really been done a lot elsewhere, and we're going a different way -- customization over randomization when it comes to equipment.

In AVWW, you never just find a spell or a sword lying around -- you find the components you need to craft such things lying around.  That's an important distinction, because each component has more than just a single use.  If you find a Shotgun of Scoped Awesomeness in Borderlands, but you hate shotguns, you have nothing you can do with that weapon but give it to an ally or to sell it.  Or use it despite the fact that you hate it.

When you're finding components instead of finished goods, there is still randomization in what you're finding, but it's less random and more directed-by-you in terms of what your final goods are.  If you hate gatling guns, you never have to built one.  You can build swords and shields and other medieval weapons instead -- and then jack them up with magic so that they rival the power of this modern weaponry you're forgoing.  Or you can jack up the gatling gun with a fire gem, if you want to go a completely different way.

What we are not doing is is having fire gems that have variable stats.  To me, that just really devalues what a fire gem even is, and ultimately makes all weapons and spells pretty similar except for their visual look.  Instead we have, for instance, longswords, broadswords, short swords, and rapiers, all of which have differing base stats, and of which you can craft different levels.  So a Level 10 Longsword would crush a Level 5 Rapier in a fight, of course, but if you prefer the stabbing action of rapiers to the slashing ability of some of the others, you can overall craft more Rapiers with varying custom modifiers and abilities as you play the game.  For a while maybe you have a rapier with a strength crest, and later it's a fire gem, and even later after you get to the point of having two slots maybe it's two things.

In Closing
This is a huge topic, and it's something I've been meaning to write about for this game for a while -- thanks to leekster for asking the question!  I didn't cover nearly everything here, but it should give you a pretty solid idea of the general approach we're going with.  It's a good mix of hand-crafted, random, and customizable aspects, which we think players will find unique and rewarding.  And suitably vast, in terms of creating a pseudo-infinite world, of course!

Thursday, April 14, 2011

AVWW Pre-Alpha #9 Video -- Bats, Espers, Burowers, New HUD, and Weather

It was just three days ago that I wrote the #9 preview for A Valley Without Wind, and mostly that's still the best source for the goods on what all is new this  time around.  However, the big thing we were missing last time was a video, because of a few technical difficulties with the first version of the video.

This video has been worth the wait, however, as our PR guy Erik is now doing them, and so the artistry in the video itself has jumped way upwards.  Without further ado:



What's New?
For the most part the video shows off exactly what I was telling you about in that #9 preview (linking again to it for those who skipped down), but there are a few things that have actually changed in the last three days.  So we've not only put up yet more new screenshots, but I have a few new things to add to our prior list:

Revamped HUD
Perhaps the most immediately noticeable new thing is the new visual look for the game's HUD and GUI in general.  Gone are the AI War-like dark buttons and such, and in are a new, higher-quality fantasy-looking style based on the Necromancer GUI for Unity.

It makes a huge difference in the feeling of polish for the game, from the loading screens to the main menu on down to the actual in-game HUD itself.  Note that the character select screen hasn't been fully updated yet, so it looks a bit off still.  I'm particularly fond of how much nicer the minimap looks, along with the ability bar slots at the bottom of the screen.

Lots More Sound Work
As always, Pablo is hard at work on the sound and music for the game, but the last week or so he's been working on sound effects in particular.  Mostly we don't include those in videos of this sort, but towards the end of the video you can here one of the wind sound effects, which is pretty cool.

New Ground Graphics
One thing that is shown in some parts of the video, but not others, is the new ground graphics that are now in use.  I had only managed to update some of them before Erik was taking the video, but you can see the difference in the outdoor grasslands areas, in the small town areas, and in the lava area.

We previously had maybe 5 ground layers, but now we have a whopping 29 of them.  There are five different kinds of lava alone, five different kinds of full snow, two different kinds of thawing snow, new pine needles and rocky grounds, and so on.

Between this and the HUD, the difference in the latest versions is pretty dramatic when you're actually playing.  You'll be seeing more of these in future videos of course, but this week's has a first taste.  The big change is that these grounds are higher quality and more interesting, which really brings the scenes together better.

Revamped Damage And Melee Models
Now when players or monsters take damage from enemies, they flash red for a brief second or so, and are invincible during this brief window.  This prevents a lot of things, such as enemies swarming players and insta-killing them, or players overkilling enemies with area damage that was "cooking" the enemies over time rather than just hitting them with one damaging blast.

In the video the only real evidence of this is the flashing red on occasion as the bats hit the characters or the character hits the enemies, but in actual gameplay this feels much better for close combat.  In general Keith actually redid the entire melee model, as the other one felt a bit clunky and that was part of the reason I haven't wanted to show it yet.  Now swords are actually a worthwhile thing and a viable way to take out espers or whatever else.  I still have work to do on the visual effect for the sword before we show it, but gameplay-wise it's now ready to go, which is a big step.

New Weapon: Gatling Gun
For our first gun, I wanted to pick a particularly challenging case to inflict on Keith, so the gatling gun was it.  This required a ton of new gameplay subsystems that we'll be able to use for various other weapons in the future, so it was a nice test case (despite some things that are unique to the gatling gun, of course).

The gatling gun has a spinup time while you hold down its fire button, then starts spraying bullets in a line, going faster and faster the longer you hold it down, until it overheats and has to go through a lengthy cooldown.  Or you can let go before it overheats, and the cooldown is correspondingly less.

The gatling gun also makes it so that you can't turn, but you can still move around -- so you wind up spraying bullets in the direction you were facing when you started using it, which can be phenomenally useful against, say, swarms of bats.  Even better than the energy lance.  You can see the ability icon for this next to the sword icon throughout the video, but I still have some visual work to do on this before we show the gun proper.

Until Next Time!
There were actually other internal things we also did in the last three days like the addition of tilesets for outdoor areas, and some first work on some very cool crafting stuff, but I'll wait to share those things with you when they're a bit further along.  Suffice it to say, we're very pleased with how things are coming along!

Monday, April 11, 2011

AVWW #9 Preview: Characters, Monsters, and Weather (Video Coming Later)

We're transitioning the video creation duties from myself to Erik, and in the process of that we're having a few technical difficulties that are requiring some updates to his machine and so forth.  So that's delayed the video for our progress report #9, but I wanted to go ahead and do a written update (and we have new screenshots) in the meantime.

Ideally we'll have the video ready sometime later this week, but no promises as yet.  So what's new?  Let's hit some of the cool new technical stuff -- skip down if you're not into that sort of thing.

Sprite Dictionaries
Previously, the game used individual images in sequence for animations, instead of sprite dictionaries (with texture offsets into a single image, in other words).  This is consistent with AI War and Tidalis, and it has the advantage of being easy to update and easy to code to (and with SlimDX's wrapper of ISprite3DX, it was the only way to do sprites).

However, it has two disadvantages: first, being slower to load off disk, and second being more wasteful of VRAM and RAM, and thus minorly hurting performance if you have a lot of animations on different frames all onscreen at the same time.  Now we're using sprite dictionaries, which I'm creating using a handy GDI+ helper program that I've been working on to let me manipulate AVWW-specific PNGs in various formats.

Proper Character Animation Offsets
This is another Big Deal thing that I did with the GDI+ helper program I'm talking about.  The problem is a bit tough to explain, but bear with me.  I'm rendering characters such as Darrell in Poser, and using three different cameras to do so; one for front, one for back, and one for the side (which gets mirrored in-game).

Each camera is at an arbitrary distance from the character, but showing the whole character, and the characters are rendered very large, at 400+ pixels instead of 128px like they are shown in-game.  Then I have to shrink each frame down to 128px in another program, and then I've got my animation frames.  In the past, I had been doing a simple Trim operation in a Photoshop script, and then scaling them down to 128px by height.

Problem?  That makes every frame of the animation exactly centered, and exactly 128px high from the bottom of the character's feet to the top of their head.  But your feet rise and fall as you run, and your head bobs up and down.  For that matter, your weight shifts from left to right, and thus the overall sprite is not perfectly centered in each frame (if any of them).

That's what should have been happening, and what I was exporting from Poser, but my Photoshop script was normalizing it all out so that the animations looked subtly wrong in-game.  Using my GDI+ program, I've now got an automated way of analyzing an entire batch of frames from one camera for one character and using the resulting data to fit the character in 128px square roughly centered and with the proper head bobbing, feet rising, and weight shifting.  The difference is dramatic.  I look forward to showing you that in the video when we get that out.

More Character Animation Frames, And Animated Shadows
Previously we only had 12 frames per side on each character, which was still a total of 39 frames per character (including the three standing poses).  And we only had one static shadow image.  Why?  Because it took long enough to export 39 frames from Poser, and because I was worried about RAM usage and disk loading times in AI War, when all those images were separate.

By adding the capability to have sprite dictionaries, this also let me feel comfortable with upping it from 12 to 30 frames per side per character (so 93 frames in all per character), as well as adding in animated and directional shadows (so another 93 frames for the shadows, too).

The result is that not only do the characters now look correct (see above), they also look wonderfully fluid in their movement, as do their shadows.  At a full 60fps or higher, it really looks particularly nice.  I also figured out that I can just render a "movie" in Poser to a series of PNGs, which saves me from (d'oh) exporting each frame one by one to the Queue Manager.  Poser is new to me, but I'm getting a much better handle on it lately now that I'm really sitting down with it more.

In-Game Shadow Skewing
Know how the shadows in the game come out of the back of things and skew off to the upper left?  Previously, that was just a flat prerendered image.  That had two major disadvantages: first of all, it takes up an absolutely enormous amount of image space, and thus uses way too much RAM.  Secondly, because of the way I was handling that via yet another automated Photoshop script, it didn't always look as good as it could (big and small objects tended to fade differently over distance, for example).

Now I've re-rendered all the shadow images in the game using the same Photoshop script of mine, but not bent to the side.  The AVWW engine now has the capability to skew sprites, which is new to our engine, and it uses that for the shadows to get an effect that is very similar to what we had before, but way more friendly to RAM, nicer looking, and compatible with even older cards that don't support textures larger than 1024 in size (no guarantees on performance on a card that old, but it will at least work).

The other cool thing I did with these new shadow images was that I shrunk them all by 60% in their base images, so that they fit inside the same size image as their original source -- so if Darrell is 128px square, his shadow will fit inside that now, too.  Previously, his shadow was in a 512px square, which is why there was no way I was going to try animating that -- too much RAM!  The game scales the shadows back up so that they look normal, and there's no quality loss at all because of the fact that... it's a shadow!  It's supposed to look diffuse and fuzzy at the edges.  The fuzzier the better, actually, given the style of shadows we're showing here.

New Character: Dawn
So we finally have a new character in addition to Darrell and the Neutral Skelebot!  She's the first woman in the game, but there will be tons more character sprites for players to choose from, and to encounter as NPCs.

My private goal from a while back had been 60 such sprites, but I was iffy if I could hit that because Darrell took me about 6 hours to create (when I was still learning so much about Poser).  Now, with all the various process improvements I've made in the last two weeks, and the automation tools I've added via my GDI+ helper program, I estimate that each character will only take about 30 minutes from start to finish.  So 60 character sprites is looking quite feasible, and maybe I can even exceed that; that would be nice!

Re-Rendered Characters
Because of the need to have full 30 frames on all the other characters and monsters, all of the existing ones have been re-rendered.  I also improved their visual look quite a bit when it comes to the skelebots in particular.  Now they have one arm and leg larger than the other, for instance, so that you can actually track them visually while they are moving.

Before it looked like their animation was half the length it was, because having their left or right legs forward looked far too much the same!  Now they look a bit more stylized, as well as just much higher quality animated in general; you'll like the video.

Weather!
The game now has a lot of different kinds of weather.  In non-windstorm times, we have: sunny (well, we always had that), light snow (in the snow areas, mainly), light rain (the junkyards are a great place to find that, but also other places have a small chance of having it), and blowing sand (in the desert, but not always).

During windstorms (every four tiles as you move, see the counter in the upper right of the world map), you get the following kinds of weather: snowstorm (in any of the snow areas), rainstorm (in most sunny or light rain areas), sandstorm (always the desert), and firestorm (always the lava flats).


Windstorms are such a huge part of the game, but now is the first time we've had an actual visual component to them.  Plus just having calmer weather at other random times is a favorite thing of mine to do, anyway.  We obviously don't have any weather in space in AI War, but that was something we did a lot of in Tidalis.


Main Menu Visual Improvements
Until now, we've only had a basic main menu that was just a rip from AI War with slightly different graphics.  That was always to be temporary, but it's surprising how much more polished the game suddenly feels by having a proper main menu (including story scroll).  That scrolling story from the main menu is now included in the main AVWW page, by the way.

The main menu shows as a background a randomly-created chunk of world, which is pretty cool to see the variety right even in the main menu every time you load up the game.

Related to this, we also now have the ability to create and load multiple worlds via the interface, which is quite nice.  There's no limit on the number of worlds you can create, but it will show 10 per page.

New Objects, New Hands On Deck
We've also got a ton of new objects in the game, although most of them aren't being seeded in yet.  I think 9 miscellaneous objects are in, then we have 9 flower sprites of various sorts, and we have something like 33 new vehicles, including some futuristic ones from the ice age time period.  All broken, of course.

Erik, our PR guy, is also now helping out with some of the actual game development work, and so that's helping me out in a major way to be able to do more art faster, and then having him "wire them up" to have proper collision boxes and other metadata through a handy in-game tool we created for that purpose.  So that's been a big help for our creation process, although we're just getting started with that.

Six New Enemies!
We are finally getting into adding more enemies, and we added a ton of them: bat, fire bat, ice bat, sniper skelebot, esper, and desert burrower.

Bat, Fire Bat, and Ice Bat
These all have the same basic movement characteristics: they fly, they swoop and dodge, and tend to flock about you in swarms.  Fighting them is a completely different experience from fighting the skelebots.

The regular bats are bad enough, but the fire bats set you on fire for about five seconds (which does damage over time -- and stacks from each bat that hits you), and the ice bats freeze you for about five seconds (which slows you down slightly -- and again stacks from each bat that hits you, which can all but immobilize you, though you can still fight).

An Aside: Region Level Gating
The bats also brings up the fact that we have level gating for various "population patterns" of enemies.  Each chunk that is generated is assigned a population pattern which includes one or more enemy types in various concentrations and in various numbers relative to the size of the chunk.  Some of these are demonstrably harder to deal with, no matter what your level is versus the other enemies.

So, the game introduces things to you gradually -- everything, really.  The harder population patterns, the more complex crafting materials, and so on, aren't available in the lower-level regions.  Every few levels you go up, more and more stuff is appearing around you.  Of course, you can strike out into higher-level regions while you are still low-level, that's just pretty hard.

Skelebot Sniper
The regular skelebot is fast and a melee fighter, as anyone following this game knows (tired of skelebots much?  Not more than me), but the sniper variant is slower and doesn't chase you at all.  Instead of you kiting it, it kites you, intentionally keeping its distance and firing fireballs at you.

Sure, it's just a recolor, but the behavior is completely different and running into yellow and red skelebots at once is pretty interesting.  In general, my goal with this game is to have a ton of variety by having a lot of base concepts (bats, skelebots, etc) as well as a good number of variants of each thing.  People who are familiar with AI War and how crazy huge it is will know just what I mean.

Esper
The esper is a magical being that hardly moves at all, and which fires quite strong lightning attacks at you.  Your own magic attacks are extremely weak against it, so you'll need to resort to melee weapons, firearms, or other physical types of attacks to take these out.

In motion, these look particularly cool.  Both these and the fire bats also act as light sources, which makes battles with them in the dark forest particularly exciting-looking!

Desert Burrower
These were just added today, so we don't have any screenshots of them yet, but they are nearly-invincible enemies that live only in the desert and which roam around at high speeds underground.  They don't chase you at all, but if you come too close to them they will strike out at you for substantial damage.  The desert really is a dangerous place!

Magic is ineffective against these as well but you can strike at them with melee attacks and kill them if you dare to get close enough.

New Name Dictionaries!
We now have new sets of names for Darrell, Dawn, and the Neutral Skelebot.  There are literally a few million possible combinations of first and last names each.

And that's only with three characters; by the time we have 60-some sprites, we'll have north of 50 million possible unique character names, I think -- that's enough that you'll likely never have two characters named the same thing for as long as you play!

Lots More Coming Up!
We're in progress on melee attacks, on a new and awesome-looking HUD graphics set (based on the Necromancer GUI skin for Unity), and we've got some very cool things up our sleeves for ground-level regions and underground regions.  After that we'll be hitting a lot more crafting materials, weapons, etc, and then I'll finally be circling back around to more interiors.

It's exciting times -- things really are flying now.  Keith has been sick and busy with his other job, which has slowed him down, and all the work with redoing all the shadows and all the characters and enemies in the game really slowed me down on the new content, but even so this has been a huge number of leaps forward in the last two weeks.  I also finally sat down and learned how to do rigging in Poser, and the bat animation (only part of which is shown above) is the result.  I'm quite excited by the possibilities that this simple new skill opens up!

Anyway, stay tuned for our #9 video hopefully later this week or else definitely next week if we run late.  Enjoy!

Wednesday, March 30, 2011

First Public Version of A Valley Without Wind To Be Beta, Not Alpha

It pains me to say that we're delaying the first public version, but Keith and I spent a good while talking about it today, and we agree it's for the best.  We've decided to scrap the idea of a public alpha, and instead are going to start with a public beta. 

In practical terms, what does that mean?  It means that instead of having a version for preorder/demo in 3-4 weeks, our timetable is shifted to "we don't know."  It might be May or June, or it might be even further along.  We don't have a crystal ball, but things are proceeding well so far, and we'll know when we see it.  In the meantime we'll keep you as informed as possible about both our progress and plans.

The Obvious Question: Is The Project Behind Schedule?
Not in so many words, no.  It's simply lopsided.  We have an awesome engine at this point, but not a lot of actual game so far.  We've been focusing on the technical aspects, and the construction of this infinite world itself, and multiplayer, and the basic systems for gameplay such as crafting and item use and combat.  These were the bits we were most unsure about, and the bits that underlie everything else.

In many respects, we're a lot further along than I'd expected to be at this point.  It's also high quality work: the worldbuilding code that is there is practically final, and we just need a lot more layers on top to really make a truly varied world; the parts of combat implemented so far are also really solid, and work in multiplayer, and most importantly are fun.

But that's not an entire game yet.  To put it bluntly, what we have at the moment is this fairly repetitive world that is nevertheless infinite, and which has very repetitive gameplay due to simple lack of content.  Skelebots chase you, and you fire spells at them, and that's about it.  This tiny scrap of gameplay is fun, but most people would wear it out after 20 minutes or so

Why Didn't We Start With The Gameplay?
A few people have asked why we didn't start with the gameplay first, as they've heard game designers should.  The answer is that we did -- in terms of what we designed.  In terms of what actually gets implemented first, that differs from project to project, even in AAA games.  In order for us to prove out interesting gameplay for this specific game, we had to prove we were capable of making an interesting, dynamic world to house it.  So that's what we've done.

We also had to prove out that we -- I -- could do the art in a way that looked good, and that was reasonable in the amount of time it would take.  I've done the art for some space games so far -- Light of the Spire and AI War 5.0, mostly -- but doing all the art for a game of this sort was a new challenge that took a lot of figuring out.  Until we had that sorted, we couldn't be sure we could really make this game, given our very tight budget and staff constraints.  And I think that's been successfully demonstrated at this point, as well.

We also had to implement a whole new networking model -- this one fell entirely to Keith, to my great fortune -- and we weren't sure we could do that in any reasonable amount of time.  Or what sort of refactoring it would take if we waited until later.  So we hit that up early, too, and it's working quite well if not fully optimized (aka, no smoothing or prediction).

When starting out with a brand-new project, especially a large one, you want to start with the bits that are worrying you.  The bits you aren't sure you can pull off.  If you can reassure yourself that those bits are feasible, then you can proceed with confidence on the entire rest of the project.  If you leave those uncertain bits until the last, you might be in for a nasty surprise, and the whole project might fall apart.  As of a few days ago, we've now hit all the big points of uncertainty -- lighting was the last of the brand-new things that we weren't sure about.


All Projects Start Small, Then Accelerate
The description of the gameplay two sections back might sound lame, but at one point AI War was just a game with fighters, light starships, and engineers.  I guarantee you every other game started out the same way.  At some point Chrono Trigger must have been just some empty-ish fields and a couple of repetitive  battles with one or two playable characters.  Forget all that story stuff, time travel, variety, and interesting locales. 

I remember screenshots from what turned into Ocarina of Time when it was for the Nintendo "Ultra 64," and all it involved was Link fighting a single Stalfos.  They were soooo excited about the revolutionary new "Z targeting" system they'd invented, though they didn't call it that yet. 

And they were right!  Boy was that revolutionary.  They made some amazing engine strides, and were able to do something that no game had done before.  The entire game rest of the game was designed and built around what that one mechanic -- everything from camera angles to boss fights.

But it wasn't a game yet, or at least not a very fun one.  This is more or less where AVWW is at these days.  We have a working prototype in hand, it's all sorts of unprecedented, and we're super excited about it.  But this is the game-lifecycle stage of videos and screenshots for a reason, when it comes to larger companies.

Why Were We Promising A Public Alpha, Then?
This was my error.  See, we've been doing AI War expansions and engine upgrades for the last 9 months.  The last full game we did was Tidalis, and puzzle games are necessarily smaller in scope than most other kinds of games.  The last time I was this early in to a project the size of AVWW was about two years ago, with AI War's alpha versions.  Consistently, what I had at that stage was an overgrown prototype.  I should have remembered this!

But we've been doing all these expansions lately, and that was fresher in my mind.  When you do an expansion, a funny thing happens: you can do one day of work, make a new ship or something, and then put that out as a public beta on preorder/demo.  This is no problem, because the fans already have this huge game to play with, and they are happy to get that 1 extra ship added in and see what it does.  Then every day as we do more work, we release more betas quickly, and everyone stays happy.  Before you know it, a few months have passed, you're doing balance testing and polish, and you release.  Success!

I think that this led me down the wrong path, paired with thinking about how Minecraft spent so long in alpha (and I think I read it went into alpha after only one week of development, if I'm not mistaken).  Minecraft is another one of those special cases: it has an enormous creative component, so players could have fun in the sandbox of the game even when all you were doing is digging up dirt and rearranging it into houses or whatever other patterns.  Minecraft could start out extremely primitive in its first versions because of its very nature, but you can't build anything out of skelebot corpses; there has to be more of a game here right from the start.  It's not better or worse, it's just a different kind of game.

Why Not Release A Public Alpha For Those Who Really Want It?
We were criticized for releasing our first footage and screens of AVWW too early, in too raw a state, and I'm still on the fence about whether that criticism was entirely correct.  Some of our fans were really salivating for anything we could show them, and in the end it turned out we got some really useful feedback that helped us to improve our graphics in a way I might not have thought to on my own.

Regardless, I'm increasingly coming to feel that it would be a colossal, perhaps unrecoverable mistake to release any playable build of the game "too early," whatever that subjectively means.  The obvious reason is that the press, and people with a passing interest in the game, might download it and not like it in an early, unpolished state.  But even when it comes to the fans who are most excited about the game, there's this problem: an alpha could never live up to their expectations. 

The press would actually probably be more forgiving, because they at least are used to seeing early builds of game software -- they know how the hotdog is made, so to speak.  But when it comes to the hardcore fans, they want what we've been promising -- but it isn't done!  They want settlements and to see a big interesting world that you can explore around in, and they want NPCs that they care about, and intriguing bits of story, and goals that actually matter.  They want to be able to affect the world in ways that are lasting.

So... should we hand them a game with a few enemies, basic sketches of interiors and exteriors, no real overarching goals, and no memory-of-deeds system?  That's insanity.  Those fans that have been around us a long time, and have seen us develop games before, know the process and would probably give us the benefit of the doubt that we'd make a good game.  In their view, we've done it before.  But the excitement would be gone.  It wouldn't have done them or us any service.

So Is The Project On Schedule Or Not?
Oh, yes, it's very much on schedule.  Our goal is 1.0 in October, and that seems imminently hittable.  The engine is vastly further along than I thought it would be at this time, and we're finally getting into the vertical development phase of the game in several areas.  We have all the basics of the explore/craft/combat trio down, and those are fun and simple.  We even have the very basics of NPCs.

What we need before we start showing this around in a playable format, though:

1. A lot more content of all sorts.  We've already been planning that for the next 3-4 weeks, and those plans haven't changed.

2. For the game to set dynamic goals that the player actually cares about, in terms of them being able to help out other NPCs, or find the lairs of bad guys and kill them, or whatever.  We don't presently have this at all, and there's no way we cold do this in 3-4 weeks on top of #1.

3. For the game to remember past events in a meaningful way, so that the whole benefit of the perma-death system becomes clear.  This in turn feeds back into #2, and there's a cycle of complexity here that we need to sort through.  The engine is ready and waiting for this, as is most of the design, but we have to actually put this in place.

4. Ways that the players can strategically affect their world.  As of today we have the basics of the wind shelter system, which is a great stride forward, but that isn't enough (and it isn't even fully finished yet).  What we really need are settlements, as well as the more complex interactions with NPCs that are related to #2 and #3.  And that also requires more crafting and other forms of content from #1, to really make it so that the player has enough choices for there to be any strategy to it.  See how this all interrelates?

5. More ways for the game to set up obstacles for you, that you can then overcome.  Even simple things like locked doors provide a surprising amount of  interest, because those represent something you can't do until you solve whatever puzzle is associated with the door (find the key, or the lever, or whatever).  That's a superficial example, but a lot of this also comes back to having notable arch-foes and the hopes of characters that you can work toward solving... again, speaking to #2  and somewhat #4.

When all of those things are in place, what we will have is a "broadly feature complete" version of the game.  In other words, all the major points of horizontal development will be done.  We'll still have loads of work to do in terms of adding yet more content and fun stuff to do, plus plenty of polish, and I'm sure other subsystems and points of interest will come up if there's time.  But when we hit those milestones, that will be a game that is varied and interesting for at least a few hours, if not far more.

That's when we'll start needing player feedback and content.  Right now the code changes enough that we don't really want custom content that will all just have to be changed, anyway.  That stuff needs to stabilize before we invite in a ton of people.  If I was a player giving feedback on this current version of the game, my feedback would be summarized by the above blog post.  Those are the largest "problems" with the game, and they all are simply factors of it not being done yet, like with the Stalfos battle in the Zelda prototype.

Players can't give us meaningful feedback until we actually have things a bit further along, I'm realizing.  Otherwise the incompleteness of the current builds masks everything and adds way too much uncertainty.  That's a new thought for me.

Just Sum It Up, Please: How Is The Project Going?
It's actually going really, really well.  The engine works and is in excellent form, and we've got the beginnings of content development going on.  What's there is cool and fun, but it's not yet nearly enough for anyone to really have a good time with it yet.

It's going to be a while yet before we hit that critical mass.  There's always a tipping point when a game goes from "promising prototype" to "this is an non-final build of a really fun game, and it's already fun."  We'd be stupid to release something that wasn't in the second category; I don't know how the press would react, but I know our biggest fans would be really let down.

What Comes Next?
It's quick for me to do textual posts, and to some extent screenshots or at least sprite samples, and I'm going to try to do more progress reports along those lines.  Videos are vastly slower, and are something I don't think I'm going to try doing any more regularly than biweekly.  Erik, our PR guy, may start doing some videos before too long, to take some of that burden off me.

In terms of when we will hit public beta, the answer is that we don't know.  It's really up in the air.  I would be really surprised if it is in May, honestly, but you never know.  I also would be really surprised if it is in August or after.  My best guess is maybe sometime in June, but that's too far out to really have any degree of accuracy.  We'll know we're ready for beta when we see it; it will have to meet all the criteria on my list above, and then I'll be happy.  Right now we're just chipping away everything that doesn't look like an elephant.

I can't wait for folks to be able to see this game, but we do have to be sensible about these things.  If it makes anyone feel any better, I've been on the anxious-player side of things my whole life.  We're telling you now because we didn't want to string you along with "oh, it will be next month" every month.  As a player, I always found that supremely annoying.  I never quite understood the dynamics of what the developer was going through until lately.  Live and learn! 

A Valley Without Wind: What's The Deal With Perma-Death?

When it comes to the perma-death mechanic, the one thing I want to make most clear is that this has no bearing on the difficulty of the game, despite what some folks might expect.  In most games with perma-death, that means that the game is very hard.  How difficult or easy this game is depends more on how far you push out into the unknown, how many risks and such you take, etc.

No Do-Overs
Rather, the perma-death here is basically just taking away that convention of "oops, you messed up, time for a do-over!"  There are no do-overs in this game, except in the sense that there is in real life.  In real life if you lose your job, it's not like you can never get another job -- you can.  And you might even be able to get your old job back, under certain circumstances.  What you can't do in real life is say "oh, actually, I went back in time and now I never lost my job in the first place!"  So in real life you have the ability to try to correct past mistakes in various ways, but you can't erase them from existence.

That's very true also in AVWW, in terms of the general design of the game.  There is no way to save your game -- things just get persisted to disk as you play, and as you exit, etc.  So that's important because you can't just reload your last save if something happens that you don't like.  As with Minecraft, you can back up ALL your world files if you want to be able to save-scum, but it's really a lot of files and not something we make at all convenient.  That's counter to the idea of the game.

What Does Death Really Mean Here?
Going along with the above, death is the biggest mistake of all, of course.  You did something that wind up getting "you" killed, and now "you" are dead.  End of story for that character.  But you-the-player of course continue on, and so does the world around your character.

You aren't even particular punished for losing that character: their inventory is right where they died, so you can go get it if you want.  No rush, even.  It will sit there without disappearing for as long as the game world goes on.  In general, loot drops and other dropped items in this world never disappear unless someone picks them up.  Because of the fragmentary way we save the world, this is easily possible while still keeping memory requirements quite low.

That's what I mean by persistence: even that little scrap of wood that came out of a tree that you can use for crafting will sit there in the world forever, until somebody does something with it.  No fading-out of drops after a few seconds here.

Anyway, back to the death thing.  So you do lose your inventory, but it's really not lost, because you hopefully know where you died.  In terms of experience points you've gained, and the level of your character, however, none of that is lost.  All experience and levels are actually larger than your character, anyway -- in multiplayer, all players share experience and levels between them, it's a global thing not a per-character thing.  All the neutral-or-allied-to-you NPCs also share all this (monsters, obviously, do not).

So when you die, you choose a new character, and that's that.  They come back with some basic equipment appropriate to their level, as well as the same level as the character that died.  If your character was using some good equipment, you can go get it at your leisure.  If you have a stash of equally-good equipment closer by, you can just take that instead.  Equipment gets obsolete before too long anyway (since it has levels as well), so you're always building newer and better spells, weapons, traps, etc.  Losing some equipment in the middle of some bad guy's lair isn't a crisis by any stretch, if that's what happened to you.

This Is A Really Forgiving Game, But Death Is Everywhere
There is no way to lose in this game.  As in, there is no way that "the world ends and you can't play anymore."  You can lose -- and boy, will you -- when it comes to smaller and larger objectives you might find.  Attacking some bad guy's keep might lead to a real pile of graves in your graveyard, and a real depopulation of your NPCs as you take each one over, try to kill the bad guy, and die (probably you should get yourself stronger before going after that specific bad guy, apparently).

Most players will die as much as they level up, if not more.  It's a really tragic sort of scenario here, for a lot of the characters.  But it really depends completely on how you play, which brings us to...

The Difficulty Is Self-Tuning
The world of this game is normally a really dangerous place, but if you stick close to home, and stick to regions that are at or lower than your level, it's actually not that dangerous.  But the rewards are smaller there, and what's the fun in that!  Most players that are looking for challenge will go out... looking for challenge.   And they will find it!

But for those players that are cautious, or less skilled, or just want to have a more relaxed time, you can do that, too.  You can just hang out in Kokiri Village the whole time in Zelda if you want, and you hardly get attacked.  But that gets boring pretty quick, because there is not much to do there.

In AVWW, you can opt to level up without engaging in combat (based on exploring instead), and you can just stick to the relatively safe areas, which have all sorts of interesting nooks and crannies, if you like.  And as you level up, more of the world becomes "relatively safe" for you.  So to extend that Zelda example, it's like if you had a very large Kokiri Village that had some low-level monsters, and which got bigger the more you explored around.  You could play the whole game that way if you want, and it's a slower, more peaceful, less stressful way to play.  It's perfectly valid!

Then again, I think most hardcore players are just absolutely happy when they get out of Kokiri Village the first time.  I know I was itching to get out.  If "Kokiri Village" is large and ever-expanding in this game, that's absolutely dwarfed by the dangerous parts of the world.  And that's where all the really interesting rewards are, too.

Most players will, I think, strike some sort of balance between the safer regions and the more dangerous ones.  The specific balance will depend on the player and their preferences -- even how they are feeling on a particular day.  Sometimes I'm spoiling for a fight, other times I just want to explore around and find some useful smaller goodies, as well as do a bit of crafting or something.  You don't have to play the same way each time you sit down to the game.


The World Lives On
I've mentioned before that the goal here is that you can only play with one world for as long as you're in the game, if that's what you want to do.  Some players want to have multiple worlds, and that's perfectly fine and supported.

But there should never be a point where the world says "okay, that's it, you're done and you need to start a new world now."  There also should never be a point where the player says "okay, I want to play with feature X, but I need to start a new world to do that."  You can do anything in one world that you can do in another, no matter what the history of the respective worlds is.

The cool thing about having a world that is long-lived is that you build up a history there.  Not some random facts about the backstory of that world; that's not that interesting.  Instead, you build up a history of what you did in that world since you got there.  Players of AI War know pretty much what I'm talking about.  Know how some planets there take on a significance to you alone, because of one (or more) epic battles that were fought there?

In AI War, of course, all of that is in the player's mind.  The game doesn't really keep track of the history of each planet, because that's really just not the focus of that game as a military strategy title.  With AVWW, however, it's all about the world and the characters in it, and what those characters do.

If you have some character who was really accomplishing a lot and then died, the other characters will react to that.  We're thinking about adding funerals into the game, for several good reasons I won't go into here (you don't have to attend with your new character if you don't want to).

Similarly, if you've been going around murdering lots of good NPCs with your character, and that character is really hated, then there might be a celebration that the evil guy -- you -- is dead, rather than a funeral.  And your new character has their own past, and isn't really associated with those evil actions you took while in control of your prior character.  The slate is wiped clean.

In that sense, you really are sort of like a puppet master.  You're one character at a time only, and the only way to change characters is for your current character to die.  But while you are "in character" for one individual, you can do whatever you like.  Do bad deeds, do good ones, and the game will remember.  The narrative of the world gets built up through what happens in this sort of fashion.

Many Of These Features Are For Beta
Just one note of warning: a lot of the features having to do with the hopes of NPCs, the deeds of player characters, and basically the narrative of the world in general, are all what we're targeting for beta.  In early alpha, our focus is completely on the exploration and combat and crafting and all that sort of thing, which is a large enough topic by itself.

Perma-death is already there, and works as described except that there is no memory of what that character did (and no graves quite yet).  But this game is being built in layers, and the first layer is the physicality of the world and how you interact with it.  The second layer is the narratives that get told in that world.

Just so there's no confusion when it comes time for alpha!

Tuesday, March 29, 2011

A Valley Without Wind Pre-Alpha #8 -- New Lighting Test



This video is just a simple lighting test showing off our new way of handling light in AVWW. The older method, using the z buffer, is still available for lower-end graphics cards and computers, but this new model looks way better, and on most computers won't use that much more CPU/GPU!

What We Were Doing: The Z Buffer
The problem with the Z Buffer method is that it winds up with very pixelated edges.  That buffer doesn't support anything except binary write / don't write data, and that's not super conductive to having high quality lighting.  The plus side is that it's super compatible with older graphics cards, and it doesn't use much at all in the way of GPU power.

The #7 video was using the z buffer, but was also using a trick for the "eyesight" part of the view to make it look like a gradient when the z buffer doesn't really support that.  The trouble there is that you can't do that with anything that overlaps in the z buffer; so I could do that for eyesight, but not for lights.

What We Tried Before The Z Buffer
Why not just use the normal 3D lighting model that most 3D games use?  I tried it, but the problem is that this is a 2D game being rendered using 3D quads.  That just really didn't work out, because pixel lighting is incredibly expensive on the GPU, and not supported by every card, while vertex lighting is incredibly coarse and looks really bad.

To make matters worse, the way that we draw things in Unity 3D is by using their Graphics.DrawMeshNow method.  Supposedly that supports lighting, just not certain kinds of lighting, but my experience was that even vertex lighting was fraught with errors.  Based on the materials in use, I'd get random aspects of the lighting shutting on and off in various parts of the scene.

I tried using Graphics.DrawMesh instead, but that in turn doesn't support things that I need to do with uv animations and such for textures.  As I discovered with Tidalis and AI War, Graphics.DrawMeshNow is basically the only possible solution that has any substantial speed for the number of sprites that we need to draw, while also supporting all the functionality we need in terms of fancy texture mappings.

So that meant that a traditional lighting model was basically out.

The New Method
The new method is actually conceptually simpler than any of the others, and doesn't really do anything new technology-wise.  I thought of doing this from way back, but never thought it would look very good or perform very well.  After the #7 video, and some prompting from long-time Arcen community member eRe4s3r, I decided to at least give it a shot.

What I'm actually doing for perfect darkness is rendering an array of big black circles with fading-to-transparent radial gradient edges to them.  These circles are about 256 pixels in outer diameter, but on the pure-black internal diameter they are about 64 pixels.  Each one of these is rendered in a grid that is screen-aligned and 64 pixels per grid tile.

Talk about an inefficient way to draw blackness!  But the cool thing happens when you start "carving out" blackness where there is a light source.  Every frame, each light source writes into that big screen-aligned array if it is providing some light to it (in a framerate-independent manner, of course).  Also every frame, at about half that rate, each tile loses light.

The longer the light is in one location, the closer towards perfectly-invisible that black circle on all the tiles near it get, until they disappear and it seems perfectly bright.  Since the images drawn in each tile are so much larger than they need to be, their gradient edges "hang over" into the nearby tiles.  I also have each image pulsing by about 10% on a 4x speed sine wave, which makes the edge of the darkness seem to pulse in a living, threatening manner.

The other effect of all this is that when you turn move a light source, it takes a minute to fade.  About half the time it took to create the light source in the first place.  This means that things like the fireball, which flicker and sputter in a seizure-inducing fashion if there was no slowdown, instead look graceful and almost liquid.  This is darkness with substance, which is a pretty neat stylistic effect, and in keeping with the visual style and themes of the game.

How Does This Integrate Into The Game?
This new effect adds a lot of extra draw calls into the game, and so on some very old GPUs it might stutter some.  These would be the same computers that would need to turn shadows off in the game, and might even need to turn foliage down.  To make sure those sort of machines can still play the game, we now have a settings option where the lighting model can be chosen.

The z buffer method is functionally equivalent to this new one, it just looks worse, but it's more efficient.  For people with astronomically large screen resolutions, they may also prefer that, as the cost of this lighting model gets linearly higher with the number of pixels in the screen resolution.

On our test machines, we haven't found this new approach to be very heavy at all, though, so we suspect most people will leave this turned on by default, as they will shadows, foliage, and so on.  If you can comfortably run AI War, you can comfortably run this, too.  But in terms of netbooks and other smaller computers that can run Tidalis but not AI War, let's say, we also wanted to have options for them with AVWW.  So far it seems we do!