Griffin Dean
  • Portfolio
    • Apex >
      • Bangalore
      • Bloodhound
      • Caustic
      • Gibraltar
      • Lifeline
      • Loba
      • Rampart
      • Revenant
      • Wattson
      • Wraith
    • Titanfall 2 >
      • TF2 Multiplayer
      • TF2 Campaign - The Fold Weapon
      • Frontier Defense 2.0
      • Live Fire
    • DoD_Husky
    • Natural Trails Mod
    • Outlaw Mod
    • Brutal Story
    • The Lift
    • Shadow Tag
    • Ping
    • Ludi Gladiatorii
    • Trireme
    • Lymph
  • About
  • Resume
  • Articles
  • Design Journal
​​Note: As of 2024, I don't actively maintain this mod. However, due to community requests, ​I made my Mod GitHub repo public. The community has continued to maintain the mod to keep it functional for future versions of Vintage Story. There are now several similarly named mod pages where other individuals have continued development based on my original mod. Their mod pages and contributions are entirely their own. I'm happy to see people continuing to enjoy the mod in whatever form it takes.

Acknowledgements: Vintage Story is developed by Anego studios. It is not my intent to claim credit for their work. Any screenshots only serve to show my mod work in the larger context of the game. Tyron and the Anego team have made an amazing game, and they deserve full credit for their hard work.

​Community Feedback

I don't think I could ever go back to playing without this mod. It adds a certain something, and being able to customize it to my exact preferences is fantastic! -CKitt
My favorite mod <3 -Svarrmir
This mod is so freaking good! -OBEDIA
​Really love this mod! Are you interested in a German translation? -Tels
I love dynamic trails in games and it is rare to see. What an awesome addition :) - Bushranger


​Key Details

Genre: Procedural Trail Mod for First-Person Survival Crafting Game
Role: Sole Developer (Design & Programming)
Development Cycle: 1 Week Prototype, 6 months of Iteration (Hobby Project)
Initial Release: January, 2024
Final Version: June, 2024

​Mod Page: Here
​
Trail Mod GitHub: Here


​Work Overview

Design
  • Designed a system that dynamically creates evolving trails along the routes players walk frequently.
  • Designed a trowel tool players can use to mark blocks they don't want trampled.
Coding
  • Programed dynamic trail generation system.
    • Allows blocks to "evolve" based on number of times block is stepped on.
    • Supports block devolution to pervious block types based on trail devolution time.
    • Written generically so block evolution progressions can be quickly iterated.
    • Properly saved, loaded, and updated when voxel chunks are loaded into memory.
    • Functions in networked multiplayer.
  • Implemented dynamic snow trails in winter environments.
  • Implemented trowel that players can use to protect their gardens from tramping.
    • Helps prevent trolling in public multiplayer sessions.
  • Used community feedback to implement granular configuration settings so players could tune the system to their specific needs.
Assets
  • Textured custom trail blocks using Photoshop.


​Making Natural Trails Mod For Vintage Story

Natural Trails is a mod for the survival crafting game Vintage Story. It was written in C#, building off of the base game's APIs.

Vintage Story's developers and community clearly love nature. It's one of the most detailed game simulations of the natural world I've come across. In that spirit, Natural Trails is a love letter to the joy of hiking and exploring nature.

The premise of the mod is simple. Players and NPCs create organic paths and roads overtime by walking the same routes. The more heavily trafficked a route, the more developed it becomes. Routes evolve from trampled deer tracks all the way up to packed dirt highways. Trails that are abandoned eventually deteriorate and return to nature. The mod also added some small immersion features like characters compacting snow as they walk through it.

The implementation itself is fairly straight forward. Since Vintage Story is a voxel game, the world is made entirely of 1 by 1 meter blocks. I wrote a server-side system that hooks into the voxel collision detection. Whenever the system detects a player or NPC collision with the top face of a dirt voxel, it updates two custom variables. The first variable tracks the total number of times the voxel had been "trampled." The second tracks the last time the voxel has been trampled.

Whenever a voxel is trampled, it compares its type and trample count to a set of evolution rules. This is defined as X voxel type becomes Y voxel type at N trample count. So for example, a grass block becomes a worn grass block after 3 tramples. This allowed me to quickly define and iterate a progression of voxel evolutions. Since any voxel change on the server is propagated to the client, I didn't need to send additional data to clients.

Now let's talk trail deterioration. The trample count and trample time are saved and loaded with the voxel chunks on the server. To save overhead, I only evaluate trails for deterioration when their chunk is loaded into memory. Chunks are loaded and unload at a certain distance from the player, so all of this occurs hundreds of blocks away from any player position where it can't be seen.

A voxel's trample count deteriorates over time at a fixed rate. The more time since it was last trampled, the more it deteriorates. When a chunk is loaded, I calculate the deterioration for each trail voxel using the difference between the current world time and the stored last trample time. Since the block evolution rules are linear, I can run them in reverse of devolve the block back towards it's original state.

​As I began to test and iterate, I quickly learned that certain aspects of human behavior work in the mod's favor. People tend to follow the middle of established paths. Wider paths naturally wear in the middle and dither along the edges out toward the natural landscape. The result is a path that blends into the landscape. It's not the result of any technical magic, it's just the way people follow paths.

To further incentivize players traveling along established paths, I give players a speed boost while walking on established trails. As a trail becomes more developed its speed boost increases.

I worked closely with the community to iterate the mod. I exposed system variables to allow players to customize the mod to their needs. When addressing feedback, the biggest pain point came from players who frequently worked on extensive farm, garden, and landscaping projects. They loved the organic trails but found it difficult to avoid trampling their gardens.

Initially, I implemented a fix where crouch walking would disable trail creation. But this was hard for players to remember and didn't solve the issue. I then introduced a craftable garden trowel that allowed players to mark regions of the world as gardens. This essentially excluded marked voxels from the trail system until the player explicitly removed the protection. I also made this protection player owned, so that players in larger multiplayer servers couldn't remove each other's garden protection to grief each other. 

I think the results speak for themselves. The mod convincingly creates dynamic trails that closely resemble real world hiking paths and roads. The image below is the world map of one of my private multiplayer servers. You can clearly see the trails created by player traffic as they moved between different resources, hunting, grounds, and construction projects.

Picture
The world map in one of my multiplayer servers. All the paths were created dynamically by the Natural Trails Mod as players repeatedly traveled those routes.
Proudly powered by Weebly