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
Bad Pixels
8-bit shoot-out in the old west
Status | In development |
Author | dadako |
Genre | Action |
Tags | 3D, 8-Bit, boomer-shooter, Commodore 64, FPS, Low-poly, Pixel Art, Retro |
Languages | English |
Accessibility | Subtitles |
More posts
- Lighting part 2 - shadowsApr 15, 2024
- Lighting & the cutting room floorFeb 06, 2024
- Wanted, dead or dead.Dec 16, 2023
- one sprite = one hundred cowboys?Nov 17, 2023
- Tumbleweeds, roll out!Oct 11, 2023
- Daily loopJun 23, 2023
Comments
Log in with itch.io to leave a comment.
Terrain deformation really reminds me of Red Faction. Good thing you decided to add this feature! Can't wait to play this now.
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
yes he's right you are very good but can you make one free
this looks amazing! what a unique style, cant wait to see more! great job
Thanks!