1. Below the Stone
  2. News
  3. Armor and Animations Are Underway

Armor and Animations Are Underway

We still have a lot to go from this point on, but we now have a chance to see (with our eyes) our game's complete image.



For a long time, Below The Stone went without many things.
Most notably:
  • Sounds
  • Armor
  • Animations


There are probably other things I'm missing, but these are important to this post ;)

Animations for our game have been a thing that we've been trying to implement for a long time, but our game engine seems to make it really difficult to do things in the particular way that we need them to be done. We use Unity Engine, to be clear.

WARNING: RANT ALERT

Unity assumes that we use its sprite rendering system a certain way, and they make it difficult to use it a slightly different way. On top of that, they also make it not easy to make your own "Sprite Rendering Component" so you can fully customize it the way you prefer. Think about the block-breaking particles you get when breaking blocks in Minecraft (because I do, a lot). All it is, is the block's texture with random UV coordinates inside the texture. So it renders these extremely unique individual particles that fly off. If you wanted to do something like that in Unity, you could do it, but don't expect it to be straight forward. Because Unity basically forces you to use their Sprite objects for everything, and they don't give you any tools to custom control the sprite rendering process.

Anyway, I could rant about this forever. Rant Over.

The way animations work is not super different, but the key idea is that anything the player can wear (this includes other characters) has to have its own texture animation. And the idea is that we layer the textures over each other to customize the player with whatever we want (including armor).



The way we handle this layering is with multiple Sprite Renderers. A long time ago, I had the idea of making my own Sprite Renderer that could make multiple sprites, but I discovered that wasn't as possible as I first imagined, due to not being able to make my own Sprite Renderer. I put off animations for many months so I could stew over it while adding other core features that needed to be done. Since then, I have decided on just having multiple sprite renderers, and controlling them using other scripts. This allows me to be able to change the sprite animation from the main dwarf body, and all the other sprite renderers will switch to using the same frame, so everything is always lined up.

If I can, I do want to possibly switch to using a more elegant system, but this will do for now.

The other thing that has been giving me a hard time is animations. Unity has its own way of handling animations, and it's a pretty good system, but not right for us. Unity's animation system is best for rigging, but it can also do sprite animations. The problem is that it natively animates Sprites, and with the way it's designed. I would have to make animation clip files FOR EACH piece of clothing, which is super redundant and time-consuming. My new sprite "synchronizing" code would actually allow me to not have to worry about this though, but there are still some nuanced issues.

Without going into immense detail, I will say this. Consider what I would need to do if we had different dwarf main body textures, maybe one has a darker skin tone. I would still need to make animation clips for each body texture. And all dwarf body textures, and the clothing, all have the same animation, so all I really need to "animate" is some data telling me the animation sequence for the dwarf, and I should be able to apply any body, helmet, shirt, pants, etc to it. and have it animate properly. So in reality, I shouldn't be animating spites, but instead, I should be animating some data that is used to pick the right sprites from some other data structure. This is the ideal system, and it is what I will be aiming for in the future.

For now, I will use some very basic code to dictate which animation to run, so I have full control over that matter.



Either way, the game is finally starting to look really nice, and it has been long overdue for some of these features. For the near future, we plan on continuing to work on animations, armor, and combat. So we can maybe get the kobold animated as well. Add more sounds, improve old sounds, add some more ambiance to the game. And prepare the caves so that there is be some degree of progression. Then we will start to add a very rudimentary "dwarven kingdom" that will be used to complete the gameplay cycle. And you will be able to take and complete jobs that will reward you when you return to the kingdom.



Thank you all for following our development, and have a good rest of your day!