Fenced Off!
- Stephen Brown
- Oct 23, 2020
- 2 min read
Whilst creating these 3 new countries, I decided I wanted to add more variation to them from the original tracks in the game. After doing a bit of research, I found that Australia was a track which needed some cattle grids and lots of fences to make it look a bit more authentic.
As you already know, the entire game is procedurally generated at runtime to keep the data size super small. The current algorithm used for placing fences didn't really have any logic to it, it simply placed a line of fences along the side of the road. However this is not very realistic as fences are meant to "fence off" areas and contain things. So fences need to go in different directions in order to fence off certain areas and make it look better. Add to this the fact that we wanted cattle grids on the road, meant that I needed to come up with an entire new solution for placing fences on the tracks.
The first thing to do was to place the cattle grids on the track, this was done using the exact code that the bridges use, after all it is a type of "mini" bridge! Next was to place little markers on the cattle grid asset to let the algorithm know where a fence may join up (this can be done for any asset in the game to create fences that link to them!).
Once we have this data, we parse the track and work out areas that can be fenced off, in fact this is great because it divides the track up so we can place certain things within a fenced area to create a more diverse track! After doing this we arrive at the situation below where you can see potential areas to be fenced. There is no need to do too much away from the track because you never see it, this game is after all smoke and mirrors!

Once you have a fence list, you may want to only place a few of them, so the algorithm then decides a priority for the fences, the ones that are linked to in game assets are always placed, others are randomly sorted and placed based on a random percentage. The game then uses the normal placement code for all assets to place fences at these locations, and you end up with the following result. Notice how the cattle grid now has fences laterally across the track dividing it up, and then other fences join that and run along the side.

In game it looks like this, and to make it all a bit more fun, I've made them all completely "smashupable"!


I hope you enjoy it when it is released! (Stay tuned for announcement!)
Ste
A portrait session that truly captures love and connection is priceless, and that’s exactly what we got. The photographer made us feel at ease, ensuring that the https://www.hawaiiadventureportraits.com images felt natural and authentic. The entire experience was enjoyable, and we are so happy with the results. These memories will last a lifetime.
Investing in pontoon accessories makes every trip smoother. A sturdy swim ladder, high-quality cup holders, and extra storage options improve convenience. https://protatch.com A powerful sound system enhances entertainment, while a durable bimini top offers much-needed shade. Even small upgrades, like waterproof speakers, can transform the overall experience. A well-equipped pontoon creates the perfect setting for unforgettable memories.
A constantly running toilet can be annoying and costly, but a universal toilet repair kit can solve the problem easily. The kit includes everything needed for https://top10newproducts.com/collections/flange-repair-kit a DIY fix, including a new flapper, fill valve, and flush components. It's a practical solution for keeping your toilet in great condition without expensive repairs.
The programs at this rehabilitation center in are exceptional. They’re designed to meet the unique needs of each client, offering a tailored approach to recovery. The couples sober living lexington ky staff is not only skilled but also deeply compassionate, creating an environment where healing and growth feel achievable. It’s an invaluable resource for anyone ready to overcome addiction.
Shopping online for Christmas presents is such a time-saver. I https://limoges.net/ was able to find exactly what I needed, and the convenience made the holidays less hectic.