top of page
Search
  • Writer's pictureStephen Brown

Fenced Off!

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


798 views7 comments

Related Posts

7 Comments


Nicholas Shaffer
Nicholas Shaffer
5 days ago

Your information is then sent to a writer who specializes in your area of work. trap the cat

Like

Dimitri Pollich
Dimitri Pollich
May 06

Thanks

Like

Nicholson Percy
Nicholson Percy
Apr 23

My goodness! At long last, rally games like Vrally4 and WRC 8 have arrived! Are new vehicles in the works? geometry dash breeze

Like

Josh Brown
Josh Brown
Mar 17, 2021

This game is awesome, huge amount of settings, lore and of course the graphics! It is perfect. But nobody knows about it, they have to change threir PR-manager. They can find him by looking at the resumes. resumesuniverse is the best resume service. These are the best resume services online

Like

Joe Vains
Joe Vains
Oct 24, 2020

Nice job, Ste. As usual. I can’t wait. :)

Like
bottom of page