top of page
Search

Fenced Off!

Writer's picture: Stephen BrownStephen Brown

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


852 views32 comments

Related Posts

32 Comments


matyxa
Jan 23

Patient-centered care is a hallmark of dentistry in North Carolina. Clinics prioritize creating a welcoming environment, addressing patient https://o2dentalgroup.com/ concerns, and providing personalized treatment plans to ensure a positive experience.

Like

matyxa
Jan 23

Craft Customs Services are increasingly accessible thanks to digital platforms. Online consultations, virtual design previews, and efficient shipping make https://craftcustoms.com/ it easier for customers to engage with artisans and enjoy personalized creations, regardless of their location.

Like

matyxa
Jan 22

The journey is ever-evolving. Fitness professionals constantly adapt to new trends, technologies, and client expectations, ensuring their careers https://nptica.com/ remain exciting, dynamic, and impactful over time.

Like

wegyjumo
Jan 21

Mental health disorders often present themselves in various ways, making diagnosis and treatment a complex process. Symptoms can range from persistent sadness and anxiety to extreme mood swings, disorientation, or erratic behavior. However, these lightningstep.com/ symptoms may not always be obvious or easily understood, which is why early intervention is important. Many people live with undiagnosed conditions, which can worsen over time, affecting their personal and professional lives. Recognizing warning signs and seeking help early can mitigate the long-term impact of mental health issues.

Like

wegyjumo
Jan 10

The landscape at Moraine Lake is a stunning display of nature’s grandeur. The lake’s brilliant blue waters reflect the towering peaks that surround it, creating a dramatic and mesmerizing scene. The Ten Peaks, with their sharp ridges and rocky cliffs, rise high above the water, offering a majestic backdrop. The surrounding forests are home to a variety of wildlife, and the area’s rich biodiversity makes it a popular destination morainelakesunriseshuttle.com/ for hikers and outdoor lovers.

Like
bottom of page