1. Dungeons & Kingdoms
  2. News

Dungeons & Kingdoms News

New Public Beta Build v0.594 - NPC Pathing Fixes

[p]This is the first round of fixes to specifically address NPC pathing issues.[/p]
  • [p]Major changes to NPC pathing - this is a work in progress and the first phase of major fixes and changes to cleanup NPC pathing. NPCs should get stuck much less often now. Focus is on the builder map pathing, combat will be cleaned up after. For any that still get stuck, the best recovery suggestion is to have them follow you to the point they teleport to you, then stop following.[/p]
  • [p]Disable ability to push NPCs around[/p]
  • [p]7 new floor build pieces of stone and wood[/p]
  • [p]add new tools and resources to SPAWN STUFF prefab for DEV UI[/p]
[p][/p][h3]How to Access the public_beta build on Steam[/h3][p][/p][p]See the official instructions from Steam https://partner.steamgames.com/doc/store/application/branches[/p][p][/p][p]Summary[/p]
  • [p]Find the game in your library[/p]
  • [p]Right click and select Properties[/p]
  • [p]Select Betas from the list on the left (under Installed Files)[/p]
  • [p]Select public_beta from the dropdown for Beta Participation[/p]
  • [p]Steam will now download the public_beta version of the game[/p]
[p][/p][p]The public_beta will be kept up to date as new builds come out so you don't have to switch back to the default full game version. Just note that builds under public_beta may contain other bugs and issues not found in the full game.

The public_beta branch is used to test and preview upcoming changes so we can get bug reports and feedback before updating the full game version.[/p]

Early Access Recap - Month 1, New Builds, Winter Sale

[p][/p]
Early Access Recap - Month 1
[p]It's been a busy first month in Early Access. Here's a recap on what's been completed.[/p][p][/p][h2]Roadmap Goal Reached[/h2][p]100+ Build Pieces - DONE![/p][p][/p][p][/p][h2]New Content[/h2][p][/p][h3]106 new build pieces for sandbox game mode[/h3]
  • [p]Walls, roofs, and roof ends of wood, thatch, and stone for village buildings[/p]
  • [p]Palisades and towers[/p]
  • [p]Interior and exterior stairs[/p]
  • [p]Dedicated storage for stone resources[/p]
[p][/p][h3]New resources and items[/h3]
  • [p]Wild Einkorn (a grain product) that can be harvested for straw[/p]
  • [p]Straw bunches to craft thatch bundles for construction[/p]
  • [p]A variety of Rock formations that can be broken down into boulders and small stones, or carve out caves and tunnels for shelter[/p]
  • [p]Boulders can be harvested into flat stone and stone blocks to be used in construction[/p]
  • [p]Rockbreaker - a new tool for smashing rocks and foes[/p]
  • [p]Straw Bed - simple bed made from straw you can sleep on which improves injury recovery and increases comfort[/p]
[p][/p][p][/p][p][/p][p][/p][p][/p][p][/p][h3]New jobs and products[/h3]
  • [p]Harvester - Wild Einkorn/straw[/p]
  • [p]Handcrafter - Thatch Bundles[/p]
  • [p]Stoneworker - Boulders, Flat Stone, Stone Blocks, Small Stones[/p]
[p][/p][p][/p][h2]Other Notable Changes[/h2]
  • [p]Moved the savegame data location including a data migration tool to preserve old save data[/p]
  • [p]Reworked the Store page to better reflect the current game experience[/p]
  • [p]Several improvements to the tree felling and bucking systems[/p]
  • [p]Increase base speed for player actions and crafting[/p]
[p][/p][h2]Developer Blog Post - Behind the Scenes[/h2][p]For those interested in some of what goes on from my perspective, check out this Dev Blog Post going over some of the steps I take when setting up new rock formations for harvesting.[/p][p][/p][p][/p][h2]Bug Fixes and Quality of Life Improvements[/h2][p]Multiple hotfixes released, dozens of bugs fixed, QoL improvements, and some minor optimizations across multiple different systems and features. Bug fixes will remain an ongoing priority, please keep the feedback coming![/p][p][/p][h2]What's Next?[/h2][p]Trade and immigration, along with a heavy dose of bug fixes focused on villager pathing and jobs.[/p][p][/p][h3]Trade[/h3][p]This is about trading with the ship merchant, Tirk Grumman. This gets Tirk and his crew finally leaving the beach and going about their normal trade routes.[/p][p]Aboard his ship you can negotiate trade deals and place orders for various goods, as well as the type of new villagers you would like to attract or hire.. for a fee of course.[/p][p]This also adds trade between characters so you can finally speak with your villagers and access their inventory, as well as loot corpses.[/p][p][/p][h3]Immigration[/h3][p]New villagers will start to arrive by ship to grow your population. This gives you an opportunity to gain specialized skilled workers to open up new industries and production, or even new heroes to expand your adventure party options![/p][p][/p][h3]Bug Fixes and Polish[/h3][p]I'll be catching up on a backlog of bugs over the next month or so as well as adding some polish to several game mechanics.[/p][p][/p]
Steam Winter Sale
[p]Dungeons & Kingdoms is 15% off during the Steam Winter Sale. Get the game for a discount and join the community to help shape the game moving forward. We want your feedback![/p][p][/p]
New Builds
[p]Full game build 0.592
Demo build 0.593[/p][h3]
Highlights[/h3]
  • [p]Add new resources for breakable rock formations, several new rocks near beach[/p]
  • [p]Add new simple tool - Rockbreaker (1053)[/p]
  • [p]Add new resource Harvestable Boulder (5018), Flat Stone (5009), Stone Block (5008)[/p]
  • [p]Add new job Stoneworker for simple stone harvesting[/p]
  • [p]Add 30 stone build pieces[/p]
[p][/p][h3]Other Changes[/h3]
  • [p]Reduce character radius for navmesh for better pathing accuracy[/p]
  • [p]Add additional resources to Gatherer job to be able have more filter control[/p]
  • [p]Improve rigidbody limiters to help with flyaway objects on collision[/p]
  • [p]Add rough stone block (5008) as harvestable alternate resource from boulder (5018)[/p]
  • [p]Add player actions for harvesting flat stone (5009) and stone blocks (5008) from boulders (5018)[/p]
  • [p]Fix boulder (5018) having static child model causing placement issues[/p]
  • [p]Reduce model size/scale for flat shaped stone (5009) so it fits better inside new harvestable rock volumes[/p]
  • [p]Remove carry properties from harvestable reed and einkorn items (5016, 5017) as these are only for harvesting from wild resources, not picking up as products[/p]
  • [p]Include resources layer as walkable ground[/p]
  • [p]Add solid background image to equipped player hotbar slots to improve visibility[/p]
  • [p]Fix and update some item and weapon icons and descriptions[/p]
  • [p]Change handcrafting job order to have chisel first, add Rockbreaker to list[/p]
  • [p]Fix issues with the cursor showing and/or causing player control to not work properly[/p]
  • [p]Add new conditions to DEV UI player reset function to cover more scenarios[/p]
  • [p]Configure small stone (5004) to always be excluded from navmesh cuts/updates[/p]
  • [p]Autogenerate MoveTo workspot targets for all game units, helps with finding the best position for workers to harvest, handles reservations etc[/p]
  • [p]Add gameunit setting to improve worker rotating to targets[/p]
  • [p]Increase default NPC auto-recovery distance from 3 to 4[/p]
[p][/p]
[p][/p]

New Public Beta Build v0.590 - Stone Builder Content

[p]Remaining stone content now added for public beta testing:[/p]
  • [p]Stone boulder, flat stone, stone block crafting[/p]
  • [p]30 new stone based build pieces[/p]
  • [p]player stone actions now working correctly[/p]

New Public Beta Build 0.589 - New Rock Harvesting

[p]The next build is in the public_beta branch. This adds new harvestable resources for stone for the upcoming stone build pieces in sandbox mode.[/p][p][/p][h3]Highlights[/h3]
  • [p] Add new simple tool - Rockbreaker[/p]
  • [p] Add new resources for breakable rock formations, several new rocks near beach[/p]
  • [p] Add new resource Harvestable Boulder (5018)[/p]
  • [p] Add new job Stoneworker for simple stone harvesting[/p]
[p][/p][h3]Other Changes[/h3]
  • [p] Reduce model size/scale for flat shaped stone (5009) so it fits better inside new harvestable rock volumes[/p]
  • [p] Remove carry properties from harvestable reed and einkorn items (5016, 5017) as these are only for harvesting from wild resources, not picking up as products[/p]
  • [p] Include resources layer as walkable ground[/p]
  • [p] Add solid background image to equipped player hotbar slots to improve visibility[/p]
  • [p] Fix and update some item and weapon icons and descriptions[/p]
  • [p] Change handcrafting job order to have chisel first, add Rockbreaker to list after stone axe[/p]
  • [p] Fix issues with the cursor showing and/or causing player control to not work properly[/p]
  • [p] Add new conditions to DEV UI player reset function to cover more scenarios[/p]
  • [p] Configure small stone (5004) to always be excluded from navmesh cuts/updates[/p]
  • [p] Autogenerate MoveTo workspot targets for all game units, helps with finding the best position for workers to harvest, handles reservations etc[/p]
  • [p] Add gameunit setting to improve worker rotating to targets[/p]
  • [p] Increase default NPC auto-recovery distance from 3 to 4[/p]
[p][/p][h3]Known Issues[/h3]
  • [p]Pathing issues on some new rock formations for workers[/p]
  • [p]Player cannot harvest flat shaped stone (missing player action)[/p]
[p][/p]

Developer's Blog - Behind the scenes with Rock Formations

[p]This post is for anyone interested in what goes on from a developer's perspective.[/p][p][/p][p]In this post I'm going through some of the steps involved taking a single rock model and processing it into a fragmented and harvestable resource the player can smash or cut to generate a variety of smaller resources. I wanted to share some of the behind-the-scenes work that goes into game mechanics like this.[/p][p][/p][p]There are multiple ways this could be done, but my main goal was to create my own editor tools and processes to be able to easily repeat this on several different rock models, as well as be able to re-run the process if I need to make adjustments (different fragment shapes/sizes, different resource spawn points etc). My preference is to stay within the Unity editor when possible.[/p][p][/p][p]What I start with - any one of a variety of rock shapes and sizes. These are single mesh models. The only difference the model makes is how long it takes the automated processes to run, otherwise all steps are the same.[/p][p][/p][p][/p][p]What I end up with - a rock formation players can smash into smaller resources, which can then be broken up into even smaller resources.[/p][p][/p][p][/p][p][/p][h3]Fragment the model into shards[/h3][p]I'm using Rayfire for the fragmentation and connectivity features. While Rayfire has built-in fragmentation patterns for square and random shapes, I needed more control than what it offers so I use a custom point cloud with my own custom settings. The point cloud is generated from a starting point that covers a number of rows and columns with variable randomized spacing.[/p][p][/p][p]Square fragments are for mining stone blocks from a quarry. That is for advanced stonemason jobs where they have the knowledge and tools to cut square blocks from stone.[/p][p][/p][p][/p][p][/p][p]The starter unskilled job is Stonebreaker. For that I need randomized shapes as the tools and skills don't allow for precision stone cutting, only rock smashing into smaller pieces.[/p][p]Both fragment patterns also allow the player to cut rooms or tunnels out of rock formations creating cozy caves and protected areas.[/p][p][/p][p][/p][p][/p][h3]Fragment Each Shard Into Smaller Pieces[/h3][p]Each rock shard created by the previous point cloud also needs to be fragmented so I can control things like the visual effect of showing cracks when a shard is hit, and creating a nice explosion effect when a shard is demolished revealing new resources inside.[/p][p]I wrote routines to iterate over each shard, add my own custom components and automate fragmenting them with Rayfire into standard voronoi patterns.[/p][p][/p][p][/p][h3]Saving Generated Mesh[/h3][p]Smaller rock formations end up with 10-20 shards, larger formations end up with over 400.[/p][p]Each of those shards are then fragmented into 20-40 pieces each. That's thousands of new mesh files, but they only exist inside the scene view in the editor.[/p][p]I wrote custom routines that export the mesh data into asset files on disk. There are tools to do it manually for each rock shard, but I don't want to sit there clicking buttons and finding folders for thousands of shards. Now, it's one button press.[/p][p][/p][p][/p][h3]Generating Resource Spawn Points[/h3][p]Each rock shard will reveal a variety of potential new resources when it is demolished. These new resources spawn at specific points within the demolished shard.[/p][p]I setup my first rock formation by manually placing where the spawns should go. Seeing how time consuming and tedious that was, I then wrote new routines to fully automate the processes.[/p][p]Now, all I need to do is add the prefabs for the resources I want to spawn into a list and click a single button... and wait :)[/p][p]Larger rock formations with 100's of shards can take 5-10 hours to processes. I could optimize this further but it will probably always be an overnight job.[/p][p][/p][p]The automated process...[/p][p]A point cloud is generated that covers the entire shard based on its bounding box and my custom settings for things like spawn point spacing/density.[/p][p][/p][p][/p][p]Each potential spawn point is then tested by raycasting on all axis towards a small generated collider at each cloud point position. If all raycasts don't hit the collider, it is tracked as a valid potential spawn point for prefabs.[/p][p][/p][p][/p][p]Each type of spawn prefab is then instantiated and positioned at each valid potential spawn position. I use what I call boxcasting to confirm the spawn is entirely inside the mesh shard. Raycast origin points are generated for each axis (x, y, z) offset on both positive and negative. This creates a 6 sided cube of raycast origin points that all target the instantiated spawn object. If any raycasts hit the prefab object then it fails at that position. This works for both convex and non-convex shards.[/p][p]Each spawn prefab that fits inside is then tracked and checked for bounds intersection with other tracked prefabs. Overlaps are discarded.[/p][p][/p][p]This shows what boxcasting looks like. There is a small stone prefab partially inside the shard. Raycasts are made from each point shown, but only failed raycasts show a red line. I would normally end the test on the first failed raycast but I let it run to demonstrate the full box.[/p][p][/p][p][/p][p]This shows each valid point cloud position being tested for each spawn prefab type.[/p][p][/p][p][/p][h3]The Result[/h3][p]I end up with a highly configurable and easily repeatable process to create or tweak rock formations to allow for player destruction that can spawn new resources for harvesting.[/p][p]This effort also leads up to other game mechanics coming during early access such as building destruction and allowing for the player to clear collapsed tunnels and break through walls on adventures, if they have the right tools and skills of course.[/p][p][/p][previewyoutube][/previewyoutube][p][/p][h3]Feedback[/h3][p]I'm not sure how many of these developer-focused blogs I'll make. Let me know in the comments if these types of posts interest you.[/p][p][/p]