Archive for May, 2014


I’ve got updated demos for Windows and Mac which include all of the features outlined in the last couple of posts.  These are still very much ‘alpha’ quality, and no doubt replete with bugs and imbalancse – but honestly it’s starting to feel more like a real game which is pretty cool :).

Here’s the short list of top new additions since the last demo:

  • Sound effects
  • Ranged Skills
  • Tile Animations
  • Doors
  • Skills (inscribing, learning, activating) and persistence-through-death
  • Bug fixes and performance improvements
  • Refactored layout engine and event/action subsystem
  • New Skills:
  •     Minor Heal: Heals self for a small amount
  •     Heal: Heals self for 50 HP
  •     Renew: Heals for a small amount over time
  •     Renew (passive): Grants 1HP every turn
  •     Heal Trap: Places a trap that when an enemy mob steps on it, sprays healing globes
  •     Poison Dart: Shoots a poison dart at an enemy
  •     Poison Cloud: Casts a poison cloud around the caster
  •     Flame Path: Leaves a trail of destruction behind you
  •     Immobilize Group: Immobilizes mobs in an area for 5 turns
  •     Flame Blast: Blasts an area which burns enemies for 10 turns
  •     Fleet Foot: Dodge all attacks for 6 turns
  •     Stoneskin: Reduces damage taken by 75% for 10 turns
  •     Stonefist: Increases damage dealt 2.5x for 10 turns
  •     Immobilize: Immobilizes a foe for 10 turns

Links will go up to the new demos over on the right side of the screen once they’re approved by indiedb.

Advertisements

That darned mortgage keeps chipping away at my 7yrl time, but I still managed to eke a few hours here and there over the last couple of months.  The Skill and event/action rewrite mentioned in my last post was a big part of it, but there were also a bunch of other changes.

Tile Animations

I’ve added a simple Xml-based definition for animations which can be played when a player uses a skill (or other event, e.g. dies). It allows creation of short-term particle effects and tile animations to be combined.

Here’s the xml definition for the ‘immobilizeVisual’ which is played when the player uses the Poison Cloud skill – it spins up two particle generators and animates a poison pit tile fading in and out:

tileanim

The net effect is this:

poison

Hard to see in a picture, but it’s animated :).  This’ll allow me to create more interesting effects as I get more into fleshing out the details.

Ranged Skills

Before skills would also trigger around the player’s location; now a Skill can be defined as being centered at either a player-selected Cell or a player-selected Mob.  Here for example is the Poison Dart skill, for which the player must select a target mob:

mob

Sound Effects

I’ve added sound effects for a wide variety of actions as well as a full set of different attack/miss/move/etc sounds for each the mobs, each of the different weapon attacks (e.g. sword vs mace) and for each of the Skills.  Most sounds also have a collection of effects which are randomly chosen from for variety.  I’ve also added Ambient sounds, although those aren’t fully generalized yet.  I’ve had to disable the sounds on iOS for now though, as the latency of AVAudioPlayer is unacceptable and I’ll need to move to OpenAL (oy).

Doors

I’ve added Doors.  Yeah, sounds simple enough, but man was there a lot of under-the-covers work necessary for Doors.  Open/Close actions, specifying which mobs can open/close doors and which can’t,  accounting for them in exploration, etc.  The one thing I just couldn’t get to work (given how my shadowing system works) is obscuring vision through closed doors.  You can see a door in the above image in its closed state.

Layout engine rewrite

I was finding myself adding more and more iOS-specific hacks to make layouts work correctly.  This was getting ridiculous so I stepped back and ripped out pretty much all of the layout code for everything.  This was a metric ton of work (especially ensuring that it worked correctly across all of Windows, Mac, iPhone, and iPad), but it now contains far fewer hacks, and does about 1/2 as many relayouts as it had to do before, so there are some perf benefits there as well.

Tons of little changes

And as always I’ve made a slew of smaller improvements, including:

  • Mob buffs appear in tooltips
  • Secondary item actions.  On iOS, you can press on the secondary cab slot and slide up to get quick access to other actions.  This is most useful when you’ve picked up an item you don’t want; rather than opening your inventory, just slide up and select drop.
  • Skill cooldowns; after using a skill you have to wait a set number of turns before using it again.  I’ve also added a 20-turn cooldown when activating a new skill.
  • Named vaults: I want vaults (prefab rooms) to be special events; so now when you enter one, it stops exploration and displays a modeless vault entrance popup to let you know.
  • Performance improvements throughout.  Especially on iOS.

 

One of the aspects that I most like in ‘true’ roguelikes is the permanence of death; it makes every move that much more important.  Unfortunately, one of the things I hate most in roguelikes is the moment right after death.  I’ve found myself gravitating towards games that find a balance between the two; when your character dies, they die – but you maintain some semblence of progression.  Rogue Legacy is the game that most immediately comes to mind, but there are plenty of others

Persistence beyond death in 7yrl

In that vein, I want 7YRL to be replete with persistence-beyond-death themes.  I’ve rationalized them through a series of “Tomes” that will be passed down from character to character (generic backstory pending).  Here are some of the ways that knowledge will get passed down to benefit subsequent characters:

  • Proficiencies – the more you use a weapon/armor/item, the better you get at using them.  Higher bonuses, improved effects, maybe even unlocking new powers.
  • Crafting items – When a player starts a new gameslot (e..g from nothing), the Dungeon is populated with only a bare minimum of weapon, armor, and item types.  The player can increase the variety of objects by crafting them using Plans and Ingredients that they find and decipher.  Once deciphered, the item can now appear in all subsequent games as drops.
  • Professions – there will be 7 professions in the game which each have 10 levels that you can gain. Each level within each profession will provide a substantial, game-changing benefit (e.g. +100% gold drop; ability to add powers to items; double bag space in inventory; unlock alchemy & ability to craft potions; etc).  Players will gain profession levels by crafting items; deciphering a plan will gain a profession point; gain enough profession points and you’ll gain a level and the corresponding benefit.
  • Skills – As the player plays, they can discover “Skill Recipes” – these recipes can be inscribed into the player’s Skill Tome, and give the ability to learn powerful new abilities (offensive, defensive, and utility).  These inscribed skills carry over from character to character – however, in order to learn the skill so that they can use it, each character has to find a set of Runes (specific to the skill) and use them to learn the skill.  I have 120 skills mapped out and ready to implement; while every class can learn any skill, each class has 30 skills that are “theirs” and can be learned using the required runes – the other 90 skills (which belong to other classes) are harder for the player to learn and so require additional runes.  This will make for some interesting mixing and matching…
  • Augmenting items – Players can also use Runes to augment items.  I haven’t fully decided how best to do this yet, but the gist is that you can turn a common item (e.g. dagger) into a magic item (e.g. holy dagger) and these augmented items can then appear as random drops in subsequent games.  This provides another min/max opportunity for the player; given a handful of Runes, you can learn a Skill that helps just that character, or augment a weapon that helps that character and all subsequent characters.  Items can be augmented up to four times, from common to uncommon, to rare, to epic, and finally to legendary.
  • Mob mastery – Killing a monster of specific type gives you an awareness of its weaknesses – e.g. a rat is susceptible to blunt damage (hammer = +25% damage) but is agile so takes less damage from large, sharp damage (sword = -25%).   This knowledge is written in your Mob Tome so later characters gain it.  The current character also get flat % bonuses the more you kill a specific type of mob (e.g. kill 10 rats, get +10% damage against them) – that flat bonus probably won’t carry across characters.

Ultimately, the persistence of the above will make the earlier levels easier and get the player into later (less experienced) levels quicker, reducing the redundancy of those earlier levels.

Event/Action infrastructure rewritten

As I started implemented more complex Skills, I realized that the existing event/action infrastructure didn’t provide enough granularity for targets, especially when I started getting into chaining events; e.g.

a player uses a skill (action)

which adds a celleffect (action)

which when entered (event) by an enemy of the player,

adds a buff (action) to the mob that entered the cell

which poisons the mob

But what if I wanted the buff to heal the player? ala:

a player uses a skill (action)

which adds a celleffect (action)

which when entered (event) by an enemy of the player,

adds a buff (action) to the mob that entered the cell

which heals the player

… or cast it when a friend of the player enters the cell?

a player uses a skill (action)

which adds a celleffect (action)

which when entered (event) by a friend of the player,

adds a buff (action) to the mob that entered the cell

which heals the player

 … etc.  This can chain farther along; at any point, the event or action can target one of a variety of different targets in the event chain.  I implemented this by specifying the Trigger/Target in the Skill definition. e.g. the following:

skill

it’s complex, but it says:

[this line is implicit since it’s coming from skillDefn] – when a player uses a skill

Apply a CellEffect to a Cell that the player selects which adds an adornment and

when an enemy of the mob that used the skill (ie the player) enters the cell

apply a celleffect centered around that enemy mob which adds an adornment to random cells and

when those cells are entered by friends of the mob that used the skill (the player)

heal the mob that entered

Put in English: this is the “healTrap” skill; it places a trap that when a mob steps on it, sprays healing globes all around which the player can pick up.

Almost any part of that can be changed, allowing me to quickly and easily create new skills.  Item powers (e.g. healing potion, renew potion, magic weapon) work exactly the same way.

This required a complete rewrite of the Event/Action system; it’s much better now, but was a ton of effort to do.  Glad it’s done!

Skills implemented

Once the Event/Action code was rewritten, I implemented the infrastructure that allows for skills to be inscribed (persisting between characters), learned (enabling it for the current character) and activated (allowing the player to chose between learned skills).  Skills are categorized as Offensive, Defensive,  Utility, and Passive – a character can have only one of each type active at a time.

Here’s what the (obviously interim) UI for the skill pane looks like:

skill2

Here, the player has inscribed 5 skills (these skills remain inscribed for all subsequent players), has one active skill, and has 3 of the 4 runes necessary to Learn the inscribed ‘Fleet Foot’ skill.  Once the player finds that last rune, they can Learn and Activate the skill, and it can appear in the R/G/B slots at the bottom of the screen.

Here’s the list of skills that I’ve implemented so far – while these were mostly just test-bed skills, I suspect most will make it into the final product:

  • Minor Heal: Heals self for a small amount
  • Heal: Heals self for 50 HP
  • Renew: Heals for a small amount over time
  • Renew (passive): Grants 1HP every turn
  • Heal Trap: Places a trap that when an enemy mob steps on it, sprays healing globes
  • Poison Dart: Shoots a poison dart at an enemy
  • Poison Cloud: Casts a poison cloud around the caster
  • Flame Path: Leaves a trail of destruction behind you
  • Immobilize Group: Immobilizes mobs in an area for 5 turns
  • Flame Blast: Blasts an area which burns enemies for 10 turns
  • Fleet Foot: Dodge all attacks for 6 turns
  • Stoneskin: Reduces damage taken by 75% for 10 turns
  • Stonefist: Increases damage dealt 2.5x for 10 turns
  • Immobilize: Immobilizes a foe for 10 turns

Here’s what a player sees when they discover a Skill Recipe:

skill3

All in all, I’m quite happy with how flexible the skill infrastructure worked out to be, and am looking forward to using it to create a wide variety of different skill types once the infrastructure work is all complete.