News:

Welcome to the new Sinister Design forums!

Main Menu

Developer's Log

Started by CraigStern, February 11, 2013, 07:19:44 PM

Previous topic - Next topic

CraigStern

I'm continuing to make steady progress on procedural level generation. (See the latest below.)

Also, a small fix: manipulating doors, buttons and switches no longer prevents a character from acting again afterwards in exploration mode. :)

CraigStern

I'm reasonably happy with the way the game now randomly selects, places, and connects rooms! The next two steps:

  • adding support for having objects contain randomized items (so we can have chests with unpredictable contents)
  • making the game place enemies throughout the randomly generated level

CraigStern

Boom! You can now have the game randomly select an item to place in a character / object's inventory by using -R- instead of the item name in the character / object's inventory. Like so:

Quote<Unit>0,99,Chest,17,20,None,-R-</Unit>

That is an actual line I'm now using to make one of the treasure chests in the multiplayer Tavern map spawn with a random item. Random item selection is weighted just like the item selection for random item drops, so if you decide to use this, make sure you pay attention to the commonality attribute in ItemClasses.xml! ;)

CraigStern

Fixed: Siripent not spawning with a mace, Lakshmi Bana getting two crossbows, and characters / objects spawning on water not producing splashing particle effects.

CraigStern

#199
I've further extended the functionality for randomized items in character / object inventories: you can now specify a commonality range instead of having the game pick blindly from the entire weighted item list. To have it pick randomly from within a commonality range, use this format:

R[X-Y]

In place of X, use the lowest commonality value to allow; and in place of Y, use the highest commonality value to allow. So, for instance, this will only allow items with a commonality value between 0 and 4 (i.e. really rare items):

<Unit>0,99,Chest,2,20,None,R[0-4]</Unit>

In any event, the game will still pick from the weighted item list; it will simply discard choices which fall outside the allowed range.

CraigStern

Dungeons now spawn enemies! Spawn locations are chosen at random from a selection of possible spots designated within each room. The enemies themselves are picked from a list of potential enemies that can spawn within the particular dungeon. ;)

CraigStern

I've updated the installers online.

There is still a fair bit of work left to do, though. Currently, dungeon generation parameters (dungeon size, number of enemies, and list of enemy types) are all hard-coded; tomorrow, I will work on making them editable in XML as part of the GENERATE_RANDOM_LEVEL String.

Also, I am aware of some bugs in the dungeon generation algorithm. (In particular, it has a bad habit of sometimes placing floor tiles over segments that should be wall.) I'll be working on that going forward as well.

CraigStern

We have new stuff on the art front! I've just received mock-ups of the first of the individualized attack buttons from Julia Buge, and I think they look pretty swell.

The Photokineticist's casting animation has been completed, and might I say that it looks pretty grand! His cape flaps up and down in a most satisfying manner. We have newcomer Lan Giniewski to thank for this one; he's going to be helping Tyvon Thomas out with completing the game's mammoth load of character animations going forward.

Lorne Whiting has gotten me an initial draft of the expanded Grass tileset, and it's looking quite nice! Very soon, we'll have outdoor elevation tiles, chasm tiles, and angled shore tiles to play with.

We've also got a couple of new character portraits that I forgot to mention: the female spriggat and the male villager. You can see those below.

CraigStern

I just sent out a mammoth email to Julia with all 105 of the attack icons we need for the game, complete with descriptions and references. It took a few hours just to come up with everything and write it all out. This is the kind of thing it would be useful to have an art director to handle. Oh well! Back to coding, now.

CraigStern

All right! You can now change the properties of a dungeon to be generated within the nextLevel string itself. Use the following format when telling the game to randomly generate a level:

GENERATE_RANDOM_LEVEL[Mines,DeviousSchemes2,1,28,10-16,Bandit/Swordsman:Bandit/Bowman:Bandit/Healer]

We'll go through this step by step. First, name the level GENERATE_RANDOM_LEVEL, then add a couple of square brackets after it.

Within the square brackets, we're going to have six parameters delimited by commas: next scene, music track, number of floors, number of tiles along one full side of a floor, numerical range of enemies the level can spawn, and the types of enemies that can spawn.

So in this example, the parameters are:

Mines,DeviousSchemes2,1,28,10-16,Bandit/Swordsman:Bandit/Bowman:Bandit/Healer

Meaning that the game will generate a dungeon that loads Mines after completion; that it will play the music track DeviousSchemes2; that it will be a single floored dungeon; that each floor will be 28 by 28 tiles in size; that each floor will have between 10 and 16 enemies; and that the enemies will be some combination of Bandit Swordsmen, Bandit Bowmen, and/or Bandit Healers. Notice that each type of enemy is listed in slash notation, and that the types are each delimited by a colon. It's important that you get this right, or enemies will not spawn on the level correctly!

Note: as of right now, the game supports only single-level dungeons.

CraigStern

Update! I've fixed a couple of bugs relating to falling characters:

(1) when a flying character hovering over the side of a cliff pulls another character off said cliff, the game will no longer freeze when the characters collide; instead, the flying character will take crushing damage from the falling character (the amount depending on how far the falling character has fallen at the moment of collision), and the falling character will continue to fall.

(2) when one character falls and lands on a space occupied by another character, the second character will take crushing damage and the falling character will be pushed onto the first available adjacent space.

Also, I've gone through all of the new grass tiles and added their tileset data.

Tomorrow, I playtest to ensure that we're not missing any tiles; if we aren't, I will update the build online.

CraigStern

Fixed a thing that was annoying me: during movement mode, mousing over a space containing an item sack now causes the item sack's info to pop up even though it's covered by a movement tile. ;)

CraigStern

Another UI improvement: next character and rally buttons no longer appear on the actions menu unless you have more than 1 character under your command.

CraigStern

Bug fix: you can no longer throw characters through walls or closed doors!

Feature addition: throwing a character or object into another character or object will now cause Crush damage to the character or object it was thrown into. The base amount of damage dealt varies depending on the maximum hit points of the thing thrown (calculated as 1/3 the max HP of an object, or 1/4 the max HP of a character).

The base damage from having something thrown into you can never be less than 5. That's just base damage, though: Crush resistance can reduce it below 5.

Here's a video showing this in action. :)

CraigStern

Oh, also: we have the female villager portrait now. :D