• Register

Old school fun meets new school flair - 8bit graphics with real time shadows, particles, bump mapping and more. Gameplay has permadeath but with progression (skills, crafted items, professions, and proficiencies), heavy crafting influence, and more.

Post news Report RSS New features: health bars, rogue/mage/hunter tiles, resting, and tons of bug fix

Paid down some technical debt last night but also got to implement some fun new features and graphics.

Posted by on

I paid a bit of technical debt last night, plowing through a set of bug fixes that I'd previously been avoiding. 7YRL is getting close to the end of Phase 0.3, which as mentioned in an earlier post means that more of what I need to do is the stuff I put off at at the start of the phase; on the plus side, it also means I'm getting close to the start of the next Phase and a slew of new fun stuff to code there (crafting, professions, more class skills, vaults, and more).

In the process of paying down technical debt. I also had a bit of fun with a few new feature additions:

Health bars

Mobs now display health underneath them when under 100%:

health

Rest action added

Strategy in a number of roguelikes often involves waiting for a mob to come to you so that you get the first hit - 7YRL now supports Resting; it's visible in the secondary CAB action here:

rest

Hunter, Rogue, and Mage Tile animation sets added

So far all of the screenshots I've taken have shown the warrior; that's because I hadn't added any other animation sets yet. It takes me about an hour to adapt an existing animation tileset (e.g. from the Warrior) for another mob's visual for a variety of reasons:

1) I have to create the color tiles for all animations; each Mob currently has 32 animation frames for walking, idling, etc - and that will grow over time)

2) I have to create normal maps for each of those 32 tiles so that mobs are lit correctly. It's a subtle but impactful aspect of the shadowing system

3) I have to create occlusion maps for each of those 32 tiles so that mobs can be projected into the shadows correctly. This is necessary since I'm using an orthographic projection (you can see the front of the walls but not the other sides), but also so that I can have a more realistic casting of shadows onto mobs. Not that anyone will notice it, but the shadows correctly cast "up" mobs like this:

Shadow casting

Above the player you can see a warrior that's partially shadowed - the shadow casts up from the base of the mob as you'd expect; but that doesn't come for free...

4) And last but not least, it takes an hour because my artistic skills are limited to technical proficiency with Photoshop :P. Thank God for Oryx, Ails, and others...

Here's what the current Spritesheets look like for mobs; there are similar ones for items, walls, stairwells, etc:

Color:

color

Normals:

normal

Occlusion:

occl

side note: the occlusion map is more complex than it looks; each channel is used in the GL shaders for a variety of purposes:

  • red: 1.0 = don't cast dynamic shadows on this texel (avoids self-shadowing on mobs at the cost of mobs don't shadow other mobs)
  • green: 1.0 = is a front-facing texel (used for 'upwards' light projection onto walls/mobs). 0.5 = is a top of a wall (used for lighting tile walls, which is totally different than other lighting)
  • blue: height from base. Used for orthographic projection of shadows "up" the mob/tile. This saves me a good bit of code in the shader since it becomes a lookup.

So in the yellow blobs above, the blue component is different on each line.

For comparison, here are the color, normal, and occlusion maps for the floor/wall/stair tiles:

tilesCOlor

tilesNormal

tlesOccl

Player Death

Players can now die; currently it just blows away the current gameslot and takes the user back to the choose gameslot state, but eventually it'll give stats etc, and take the user to the mainmenu (since only the dungeon/player should be blown away, not the full gameslot which also stores progression data like skills learned).

Next up

The remainder of my coding time today will go to making an updated video and packaging up a new demo. Tomorrow it's back to work so updates will likely slow from their recent frenetic (and fun!) pace.

Post comment Comments
O-san
O-san - - 18 comments

Looks great =) love the pixel artwork.

Reply Good karma Bad karma+2 votes
jeffsim Author
jeffsim - - 9 comments

Hey, thanks! Take a look at Oryx's stuff (oryxdesignlab.com) for more. I picked up a license for his 8bit sheets and have been using those as the starting point for the mobs. I'm hoping the shadows and lighting give it all a unique look-and-feel...

Reply Good karma+2 votes
GrindCrushLLC
GrindCrushLLC - - 81 comments

Ya, I like the shadowy dungeon look with 2D sprites. Very cool.

Reply Good karma Bad karma+2 votes
jeffsim Author
jeffsim - - 9 comments

Cool, thanks for the good word!

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: