Terrain





One of the questions in any Unity game is how do you go about making a terrain. There is a terrain engine built-in, however it is notoriously "one-size-fits-all"... if you are making a standard walk-em-up in a forrest, that built-in terrain engine is perfect.

Bad Pixels is a little different, we are using custom shaders all over the place and a custom solution was needed to show the blocky grid.

Building the terrain engine for Bad Pixels has some unique things going on to help it look like it came from the days of old. Here are some of the major features:



Lighting & Vertex Smoothing
In Unity, any dynamically created mesh gets vertex smoothing applied automatically. In this case, the mesh generation needed to be broken up so that lighting can fall in shaded chunks instead of gradients. Speaking of gradients...



Height Colouring

Usually, when colouring a terrain mesh, the standard approach is to colour using a texture. Since Bad Pixels doesn't use textures, I needed to colour heights by vertex color. However, vertex colors get blended into one another when you do this, so I needed to change the mesh generator to color by face.




Rivers and Roads -> maps

How to reliably add rivers and roads? (and railroads) Luckily this a standard game development feature, a render texture can be used to control the height of the terrain. Bad Pixels updates this in realtime...




Deformable Terrain!

This is the major feature of Bad Pixels terrain. Ever wish when you chuck some TNT in a game, that it actually changed the game's terrain? Gone are impact marks on an otherwise unscathed bit of static geometry. In Bad Pixels, blowing stuff up is a key part of the game. Terrain changes stay too, so if you happen to revisit this particular level, the damage you, or others caused, remains.



Object Placement

Placing every single bush, rock and snake by hand might be a bit laborious so within the terrain engine, certain objects appear at certain heights. For example, rocks appear more on higher ground, bushes appear more where water is in the soil, and snakes appear in your boots.

Get Bad Pixels

Pre-order Now$15.00 USD or more

Comments

Log in with itch.io to leave a comment.

(+1)

Terrain deformation really reminds me of Red Faction. Good thing you decided to add this feature! Can't wait to play this now.

(+1)

Wow, was not anticipating real-time deformation. Excellent work!

Wow, when I saw the first demo I was amazed! From flat terrain with the occasional rock, to hilly terrain with real-time deformities!

Damn, I'm real excited for this game now

Huh, I definitely would never have expected terrain demolition in something like this! It looks great already, will add a lot to gunfights.

Doing great work so far, looking forward to the next devlog. 

Thanks! Deformation is a lot of fun and a bit chaotic

(-3)

yes he's right you are very good but can you make one free

(+2)(-1)

this looks amazing! what a unique style, cant wait to see more! great job

Thanks!