Layers, Ogres have Layers


This week most of the changes have been focused on things in the 'nuts and bolts' rather than in any new features or content for players. I'm about to start on the feature update for the next release - then on to content and hopefully a new major push in the next week. Even so, here's some of the things that happened...

Layering of Sprites


The players and NPCs in Tales are customised by changing hair, clothing, hats etc. Up to now it's all been done with a lot of images. For each hat there were 16 different versions to cope with the various different animation frames and directions. As the game grows I need to reduce my overhead both in runtime memory used by images but also in the time it takes me to produce new content. With this in mind I've moved over to a more data driven approach. 

{
"version": 2,
"SE": {
"default": {
"tile": 0,
"xoffset": 0,
"yoffset": 0
},
"1": {
"tile": 0,
"xoffset": 0,
"yoffset": -1
}, ...

I now have a single image for each item in each of the four directions. This is then manipulated using a JSON file that describes how the body part moves in each animation frame. Instead of having a whole bunch of images I simply position the image over the sprite in the right location for each frame. This gives me a great deal of flexibility (since I can still add additional frames for items if needed) but lowers the overhead quite considerably. 

Remove Bias

One of the things I've trying to be aware of in my games recently is how much we naturally (and unnaturally) add racial, cultural, gender and other bias into games. Simple things like including an option to play my platformer prototype as someone in a wheel chair really hit home for some people. For instance, in Tales I intentionally left out the selection of "gender", why should you be forced to choose?


I also noticed that the majority of characters joining the game had the caucasian skin choice and brown hair. Did my game only appeal to be white people?! 

Thinking about it I realised that when you create a character in the game the defaults selected are my own skin and hair colour - so people were coming in and just accepting the defaults. Now when you create your character the defaults are randomised so we'll hopefully see a wider range of characters. That is unless of course my game simply does only appeal to a certain demographic and they were really configuring themselves that way :)

First Server Bug

For the first time this week the server crashed. It was a coding error, it's been fixed, but still - it crashed! The server was down for less than 5 seconds and came straight back up cleanly. I was pretty happy with that. 


It also means that people are exercising the game in different ways than I expect which is an excellent lesson is coding defensively for me!

Balancing Stats

Finally, one of the big things with my games is a large number of items and monsters. The big complexity here is making sure that everything stays balanced and consistent. I've taken the same approach for a while now and I've just started adding it to Tales. 


When my game comes up in development mode (only I get that one) it runs a validation system. This calculates statistics on items and monsters defined in the game. Simple things like:

  • How much gold and loot do you get per damage a monster can do?
  • How much damage does a weapon with X skill requirements do?
  • How many hit points does a monster that does Y damage do?

These are calculated across everything is defined in the game and a weight average applied. This gives me metrics for the "average damage done by a monster with X hit points" etc. The validation routines then go back through the data looking for outliers, things that would be way off the trend line and flags them as needing attention (it also explains whats wrong). 

I'm quite draconian with it, the game won't start if items are off balance. At all. Fix it or don't carry on development Kev! This tends to keep me on the straight and narrow and hopefully means the game will feel well balanced.


Thanks for reading! Thats it for this week, if theres any topics that you'd like me cover please let me know in the comments.

Leave a comment

Log in with itch.io to leave a comment.