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


804 views6 comments

Related Posts

6 comentarios


Dimitri Pollich
Dimitri Pollich
06 may

Thanks

Me gusta

Nicholson Percy
Nicholson Percy
23 abr

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

Me gusta

Josh Brown
Josh Brown
17 mar 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

Me gusta

Joe Vains
Joe Vains
24 oct 2020

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

Me gusta

juanyoc67
juanyoc67
23 oct 2020

Grandioso esperando el lanzamiento estoy

Me gusta
bottom of page