Cue in more diagrams!

Recently I have discovered that GitHub markdown seamlessly supports Sequence Diagrams and it is awesome!

What are these words you may ask? I thought I’d make a short post about that.

First and foremost GitHub is a place where Knights Province code lives. You may have already seen public Knights Province resources there. There is an Issues list that holds the bugs and improvement ideas for the game (link). There’s also dynamic scripting Wiki (link).

Markdown is a set of special terse text format rules that allow for a number of formatting styles and features. Starting from simple ones that make text look bold (with asterisks), or italic (with underscores). Most of the modern Web platforms support it to a different extent. Unfortunately it is not standardized, but usually the basics work the same. More sophisticated expressions allow to generate tables or style whole sections of text as a programming language with syntax highlight:

Sequence Diagrams are a nice way of presenting sequences of events happening over time in a graphical form between several entities. Here is a short example of how a phone conversation may look like in this notation:

I won’t bore you here with details about Sequence Diagrams rules, just the basics. Actors are listed on top and repeated on bottom. Diagrams are read from top to bottom. Arrows denote control flow. Thick sections on actor verticals mean some processing is going on.

And there is a fourth piece to this puzzle – Mermaid. It is a certain diagram generation library that was seamlessly incorporated into the GitHub markdown processing. It supports a number of diagram styles, but we are interested in the Sequence Diagrams, since this is what Knights Province needs at the moment. If the text will have certain magic words in it spelled in the right order, they will transform into a picture:

Sweet thing about it is that the “code” for the diagram is in simple text form and is very short. Those 8 lines fully describe the diagram.

Lately I have been working on bringing Knights Province Multiplayer up to shape. In the past few months a lot has been improved and changed for a better gameplay and UI experience in the networking and multiplayer code. For example the players roster has changed, but that’s a different story, maybe for another post.

Networking code is quite different from the rest of the game though. It is riddled with asynchronous (non-immediate) events and their handling between separate entities located hundreds of milliseconds apart – players, host and servers. Those data exchanges and states form up quite a complex and intricate shape. Now, Sequence Diagrams are ideal for showing those interconnections and events relations. Having the things laid out on paper (yes, I even printed some of them) is a huge help in figuring out weak spots and places for improvements.

So, here is a sample diagram visualizing how a new client may enter a multiplayer room, get his role (become a Host or a Joiner) and get to setting up the upcoming game:

Simple as that! 🙂

Posted in Sidenotes | Leave a comment

Working on new terrain highlights for the Map Editor

Posted in Uncategorized | Leave a comment

Wagon wheels animation turning out rather nice

Posted in Screenshots, Sidenotes | 1 Comment

Knights Province Alpha 13 starts its wip journey!

It is time for Alpha 13 to enter its so-called “wip” stage. I gave some consideration regarding the number 13 perceived as unlucky, but then again, I’m not superstitious, so 13 is perfectly good! Now it can be playtested parallel to the ongoing development. As always you will find that some new features are already in the build, some are being developed and some are just planned or not even heard of. It’s a great time to affect the game’s development course.

There is a bunch of big things planned for A13. Let’s talk some more about each (trust me, best one is listed last)

Animated map objects

Game needs to be more interactive – cue in animated stateful map objects! With the new support for animated map objects it is possible for objects to have a state and animations within and between states. For example now there is a dungeon door or a chest that can be open or closed (controlled via script as well!). Or a single table map object with several different things laying on it. Important to note, that these states are not purely visual. An opened door can be walked through, while the closed one is impassable. As with other things – this can be controlled from dynamic script.

Addon map objects (eventually mods)

KP was always planned to allow for mods. Addon map objects are a first attempt at that. Just imagine what possibilities it opens for mapmaking! Mods will be explained in greater detail in upcoming posts. For now there’s just a short sum up. Mods can affect specs (object properties) and/or assets (3D models and textures). Mods can be global (affecting the whole game and all the missions you play, unless they specifically forbid so) and local (acting only on the current campaign and/or mission). Mods will be loaded in layers and will be able to affect each other. For example one could have a global mod that adds 10 new types of trees and each mission will get them, but some specific mission could contain some specific quest objects it needs. If everything goes well, other basic game domains (like terrains, decals, etc.) will allow for mods soon too.

Skeletons!

Reason for them is two-fold. Firstly and foremostly, skeletons were planned to be a part of unit death animation and corpses decay visualization. Units would gradually decay revealing a skeleton which would disappear after a time too (think of how Warcraft 1 and 2 did it). This feature came out to be quite a lot more complicated to properly rig and animate than it seemed at first though, so it is currently postponed. However, skeletons themselves looked really nice and easy to integrate with the existing animation and rigging systems, so .. given the playful game art style and mood, now the skeletons are part of the game. Currently only available to be placed in MapEd and via dynamic scripts. However in the future it is quite possible that they will have a dwelling / spawning structure, similar to wolves and bears. Maybe a crypt? Feeling strong Warcraft 1 dungeon missions vibes now.

Heroic unit attributes

Units can be tweaked quite a lot more from the dynamic script now. Following attributes can now be changed: Max HP and HP regen, sight radius, flag color, banner display for group leaders, morale. This will allow mapmakers to create (and edit!) hero units in a manner similar to how Warcraft 2 had them. For example a quest hero unit could gain more and more HP over the course of the mission and have his flag color turn bluer or redder depending on the progress. Or simple yet effective sight radius reduction in the cave sections. It is not a full RPG yet, but still a good step into the right direction.

Weather effects

Now mapmakers can change lighting conditions. This means sun and sky color, sun position in the skies. Among other things this also allows for ambient lit missions taking part in dungeons and caves. As with other aspects, lighting can be changed from dynamic script. Other weather effects like clouds and precipitation are planned, but not scheduled yet. Fully dynamic lighting like torches and other light emitters are not available yet (and probably wont be for quite some time). 

Anti-cheating

Highscores became engaging enough to the point where the game had its first major cheating event. This is a great milestone! Now, combined with the new mods feature, anti-cheat measures had to be improved. Now highscores will register more of the game’s properties and a replay file, making any major attempts to cheat fruitless. This will warrant reset of the Highscores in the Knights Tavern in the near future.

.. and finally Multiplayer!

I’m excited to announce that Alpha 13 is planned to have multiplayer enabled! It will take some time to stabilize the features presented above, but after that is done, the MP button will be activated and we’ll see how much time and effort it will take to make it properly work.

With everything described above, I’m happy to direct everyone interested to the Discord server where Alpha 13 wip builds are going to be published in the #new-versions channel:

Discord server #new-versions channel

And as always, the game needs your playtesting, feedback and bugreports, word of mouth and Patreon support!

Posted in News | 3 Comments

Greek localization underway

Decided to take a small detour from major Alpha 13 features (separate post on that matter is coming later). New localization is being added into the game (credits to Absinthe for translations):

Game font used on buttons and big captions did not have Greek letters. Had to draw them from scratch (largely borrowing from similar looking Latin and Cyrillic letters). Here’s how the le letters look so far:

If you have comments or constructive suggestions on the writing (or maybe you want to help to bring another localization to the game) – please contact me on Discord 🙂

Posted in Artwork, Live progress | Leave a comment

Final Alpha 12 patch is out

Knights Province Alpha 12 (installer)

Knights Province Alpha 12 (7z package)

Full list of changes, fixes and improvements:

Alpha 12 r14147

  • Fixed training continuation on canceling train order
  • Fixed occasional restart of music on leaving results screen
  • Fixed keeping groups banner behind group commander with respect to Viewport
  • Fixed crash on negative libx indexes in campaign texts

Alpha 12 r14142

  • Added warning about Skirmish AI ignoring group orders in MapEd
  • Set Skirmish AI to attack closest enemy every 15sec in Tactic missions
  • Fixed terrain sidewalls shading with fog of war
  • Fixed error on having selected a warrior approaching rally point and joining another group
  • Fixed error on joining a warrior to another group that was not previously selected (e.g. after loading a savegame)

Alpha 12 r14137

  • Another game restart fix

Alpha 12 r14136

  • Fixed cattlefarm building area to match the model
  • Fixed occasional error on game end
  • Fixed change of human hand on game restart from save
  • Fixed brewer idle position in Cidermaker’s
  • Fixed discrepancy between “login” and “log in” in KT auth labels
  • Reenabled sky rendering when custom camera is used

Alpha 12 r14124

  • Fixed occasional error on game end

Alpha 12 r14118

  • Fixed occasional error on showing hint for the iron weapon production

Alpha 12 r14115

  • Fixed skirmish applier in MapEd to skip the neutral hand
  • Increased default food reserve added to camps in MapEd
  • Added more starting food to some skirmish maps to fix AI starvation
  • Sped up savegame compression to avoid autosaves clashing when done in rapid succession
  • Fixed occasional crash on splitting groups

Alpha 12 r14102

  • Fixed area effect matching for terrain brushed in MapEd
  • Fixed application of mountains in MapEd with a lasso that didnt include any non-mountain areas
  • Fixed error on loading savegames
  • Fixed error on saving a game loaded from another savegame

Alpha 12 r14097

  • Fixed missing text lines for Hotkeys
  • Fixed detection of Skirmish tactic missions as Story upon loading
  • Fixed warriors to fight back as a group when a member is attacked by a wild animal
  • Fixed wild animals being hesitant to fight back when attacked
  • Added more sounds and stub animations for wild animals
  • Improved rendering performance of selection lasso preview in MapEd
  • Fixed warriors to retain facing direction in a group
  • Allowed to jump in undo/redo history in MapEd by double-clicking in the list
  • Improved group selection retention on split/join orders
  • Added hotkey to split one unit from the group
  • Fixed setting of mission author and description in MapEd from scratch
  • Fixed newly built houses not complying with ware distribution limits if the limit was set to 0 at that time
  • Tweaked warriors stats to be slightly more balanced
  • Fixed error on trying to restart the mission from results screen
  • Changed ware cost estimation to include space requirements factor
  • Fixed AI ware demand underestimation for grain
  • Fixed sheep sometimes getting stuck on breeders death (due to malformed mission setup)
Posted in Downloads | 1 Comment

Alpha 12 second patch is online

List of changes and fixes:

  • Complete new campaign by Kinghts Dzapan – “The True King of D” (12 missions)
  • New tactics map “Azincourt” by Dolbi
  • Fixed woodcutters equipment when he’s going to set up and collect coalpile
  • Fixed coalpile setup time
  • Fixed sheep feeding time
  • Disabled goals editing for skirmish missions in MapEd
  • Fixed workers appearing idle in their homes when killed outside
  • Fixed the reset of save filename in Menu>Save on saves list update (due to slow scan)
  • Removed “Disable music” checkbox
  • Split SFX into 5 distinct categories each with its own volume control
  • Reduced production time for iron armor to match other warfare
  • Added animations for breeder walking with sheepling and grain in hands
  • Added sheep spawning animation
  • Added exact ware count into the hint when the count is more than 1000
  • Improved several house and fences descriptions and hints
  • Added explanatory hint to distribution of wares form
  • Fixed rendering of dark and black areas looking too greyish
  • Removed peasants from game results statistics (as they are not indicative of players progress)
  • Fixed game lagging on warriors trying to attack a house from unreachable tiles around it
  • Fixed and refactored AI army train limits for Story AIs
  • Disabled placement of coalpiles on some decals
  • Fixed lags on editing water surfaces in MapEd if the map had more than a couple of waterfalls
  • Fixed duck sounds playing at full volume regardless of position in game world
  • Added Weak AI that will not attack enemies
  • Fixed AI not incorrectly estimating iron and gold availability in barren mountains
  • Fixed render of trees on the East and South map edges
  • Fixed render of overlays on terrain along the East and South map edges
  • Added option to edit mission author and description right from the MapEd
  • Fixed flow of water on to newly lowered terrain in MapEd

Knights Province Alpha 12 (installer)
Knights Province Alpha 12 (7z package)

Posted in Downloads | 4 Comments

New food mechanics

In the old system, units would eat everything they can in the order it is available in the Tavern till they get to 90% satiety. This had several drawbacks:

  • It would look odd to see units consume both Ale and Cider, or Fish and Sausage.
  • Sometimes units would overeat and waste the food (e.g. unit ate to 80% and then another 60% sausage, resulting in 40% going to waste)
  • Attempts at food management micro distracted from the game

Starting from r13944 new rules are in effect: each visiting unit will want to eat three dishes – meat, bread, drink. Meat can be sausages or fish, bread is always bread, drinks can be cider or ale. Exact choice is made randomly upon availability. New satiety values are:

  • Meat – 35% 
  • Bread – 25% 
  • Drink – 15% 

For each 2 dishes combo unit gets an additional 10% satiety. Result is that in the full Tavern a newly arrived hungry unit (satiety <10%) will eat 35%+10%+25%+10%+15% = 95% which will restore them to full satiety.

Thus, more kinds of food could be added without making them look superfluous (as long as they go into one of the three categories) and the combo bonus will incentivize player to maintain variety of foods in the Tavern 

In early campaign missions not all foods are available, so units will not eat up to their fullest, but this is not a huge problem, they will just return to eat sooner. In later missions (or in missions without waterbodies) one is expected to produce meat sausages to keep the units well fed.

Further work includes reworking UI to be representative of the new mechanics (sort and group foods). Slight tweaking of food values may also be needed.

Posted in Live progress | 1 Comment

Alpha 12 patch is online

List of changes and fixes:

  • Fixed inconsistency when decals could be erroneously selected under fog of war and got immediately deselected
  • Disabled mines placement on top of decals (e.g. wall elements)
  • Made fences unpickable when under the fog of war
  • Fixed crash on AI trying to plan stonecutters for a distant stone deposit
  • Fixed the game trying to reach KT when pleayer is not logged in
  • Moved Tailors to the Materials build tab
  • Fixed smoke from houses changing between opacity levels abruptly
  • Greatly reduced savegame size by compressing the data
  • Fixed selection bounds of early grain
  • Fixed bad offsets for some map objects in avatars
  • Removed utility grain and orchard map objects from MapEd palettes
  • Fixed rare crash on AI warrior entering tower and exiting it mid-way
  • Fixed calculation of wares value (used in game Results chart)
  • Fixed update of map info in single-player map list on map type change in MapEd
  • Fixed rare crash on unit completing entering a just demolished house
  • Increased skirmish AI default defense positions guard radius
  • Changed units food consumption mechanic to be 3 dishes (meat, bread, drink)
  • Changed food nutrition values to 0.35, 0.25, 0.15 correspondingly and added 0.1 combo bonus
  • MapEd will try reassign DefaultHuman location whenever possible
  • Story missions without human locations will show up as non-playable more correctly
  • MapEd will warn about missing DefaultHuman setting
  • Fixed clipping of grain fields near screen edges
  • Fixed unfinished houses affecting warriors morale

Knights Province Alpha 12 (installer)
Knights Province Alpha 12 (7z package)

Posted in Downloads, News | Leave a comment

Knights Province Alpha 12 release (and 10 year anniversary!)

October is a special month in Knights Province history – the game was conceived almost exactly 10 years ago back in October of 2013.

It has been three years since the last big release of Alpha 11. There was a lot of work done to make the game look and play better than ever. Here are the major improvements and features:

  • 4-way buildings placement – buildings can be placed facing each of 4 main directions. This makes town planning more interesting and strategic.
  • New water rendering engine with waterfalls and water levels for better looks.
  • PBR and Screen-space reflections, normal maps and parallax maps – these are new rendering techniques that allow for a nicer picture, especially for metallic surfaces (like armored units warfare and water bodies), buildings roofs and roads.
  • Lots of new house models, textures and improved unit animations
  • Brand new in-house work animations – covered in detail in previous post. They make the towns look more lively.
  • Sheepyards, Sheep, Wool, Gambesons – new production chain with new buildings and wares, that is more historically accurate and more challenging and interesting to manage.
  • Reworking HUD UI/UX – new and better GUI items and a whole new reworked minimap supporting the free in-game camera.
  • Reworked object picking UI/UX for more accurate control over the town and combat.
  • Improved terrain render, roads and building footprints – terrain got better lighting and nice decals for house and roads.
  • Launcher will help to keep the game up to date.
  • Improved AI city building and army training.
  • New campaign “The True King of D” by Kinghts Dzapan (first 9 missions) featuring lots of new dynamic script features (such as popup dialogs, trading, etc.).
  • New text localizations (Brazilian Portuguese, French, German, Spanish, Polish, Turkish).

There are many more smaller changes and improvements, they all can be seen in the lengthy game changelog (available on game start and from Options menu).

There are still several areas where the game needs more research and development which will be addressed in following Alpha 13, before it can go into the Beta stage:

  • Horses and farm animals breeding, should it be handled in the same way as sheep?
  • Walls
  • Siege machines
  • Trade (market, wagons)
  • Multiplayer
  • Assets and content (building models, unit models, animations, etc.)

The game is free to play yet, but if you like it please consider supporting its creation on Patreon.

Steam page where you can add the game to your wishlist.

Main community hub for discussion, support and ideas is on Discord.

Feedback and word of mouth would also be greatly appreciated.

Download links:

Knights Province Alpha 12 (installer)
Knights Province Alpha 12 (7z package)

Posted in Downloads, News | 7 Comments