Today was a productive day for small fixups:
- Lots of renaming and refactoring in code
- Fixed falling tree sound played behind fog of war
- Added dev button to save running game into a mission (map + dat files)
- Made fog of war updates every other tick (reduced CPU load, visually unnoticeable)
- Matched naming of Options/Settings menus in main menu and in game (Options win)
- Unit thoughts are visible irregardless of zoom level now
- Added 2-nd flag to School house for better looks
- Fixed x2 slowdown building speed broken a day before (my bad)
- Temp sound for small buttons click (same as big but softer)
Now the game is at revision 4260
Knights Province needs a lot of animations. They are essential to making the games’ world feel alive. Here’s how they work and how they just got better.
Animations start with a skeleton rig. Rig is a description of how character skeleton bones are located and which of the characters parts they affect. Typical character rig in Knights Province consists of ~20 bones. 20 is a good compromise between animation visual quality (more is better), animation cost (less is cheaper) and game’s performance (less is faster). Typical rig looks like this:
Smoothed house and unit animations. Where they were sampled at 30fps and nearest frame was picked to render, now the render shows interpolation result between two frames (article will follow later).
Did a lot of work on refactoring old code, simplifying and cleaning out. Moved code bits around for better and more logical layout.
AI parts responsible for choosing a house to build got structured better.
Added soft shadows around game panels. Also made panels to come to front and overlap other panels when clicked:
This weekend was devoted to getting back to the game
What has been done towards Alpha 7:
- Allowed to select enemy and neutral houses and units and see their generic info
- Added entrance element to house plans fences
- Added neutral player in MapEd, animals could be placed only for that player now
- Had to revert terrain smoothing, it worked wrong on fences. Proper solution is planned
- Fixed 1 second minimap update delay on mission start
- Worked on moving all data files into a package
- Minor updates for some maps
- Fixing GUI errors and crashes in MapEd
- Fixing houses/units names (changing pigs to cows, skins to cowhides, etc.)
- Improving statistics menu layout
- Optimized flags rendering
- Added flags to almost all houses and house placeholders
- Tinted bottom edge of fake houses for better lighting feel
- Tweaked warriors HP display
- Fixed idle warriors animation loop and also made all warriors to idle not in sync
All in all that resulted in 73 commits, and now the game is at r4093.
I’m going through some busy times which put Knights Province development on a lower priority for now. Haven’t touched the game in 5 weeks and looks like won’t be touching for another few. On one side it’s a bad thing, because I’m loosing momentum and development schedule slips (Alpha 7 gets delayed). On the other hand there’s a good side – I will have a fresh look on the game when I get back to it.
Stay tuned for updates!
Did 4000th commit into Knights Province repository yesterday – another milestone! 🙂
Took me some 2,5 years.
This week I was working on new fighting mechanics for Knights Province. I want fights to be a little less random. Hence units will have a lot of hitpoints and proper damage range.
Should these numbers show to a player? We’ll see about that later )
This weekend I spent at one of my favorite activities, which I turn to very rarely – painting textures. Here is wallside texture – at ~70% done.
I’m painting in Photoshop at x4 scale and then resize the image to actual size. Second window is helping me see overall image lighting and details (how they will look in actual size).
This is how texture looks mapped onto a wallside decal model:
And this is in-game shot:
You can notice how grass texture pixels appear here and there on the wall. This is deliberate, to make the wall to blend in with the surroundings. On dirt or wand there will be dirt or sand pixels respectively. I’m still uncertain about stretched pixels on wall teeth – terrain textures are mapped planar. Will see about that later (maybe I could simply disallow terrain textures on decals if the stretching is more than e.g. 300%).
For today’s improvement I have added textures reuse.
All terrain decals are different models. For example road decals are 6 different models (having 0 – 4 connections to neighbors in different configurations). Each decal now has UV texture of the road. Which lead to one common texture being loaded 6 different times.
Now with textures reuse – all road decals reference one single texture.
P.S. I’m not quite happy with the road texture, it is likely to be changed before Alpha 7.