mspraggs / potentia

Southampton Game Jam 2015
0 stars 0 forks source link

Background Blocks #27

Closed DivFord closed 8 years ago

DivFord commented 9 years ago

So, I'm trying to work out a way to improve water….

mockup

We have this weird thing at the moment that we get gaps between water and other tiles. I don't really want to remove the gaps, since they look good when not bordering water. Could we add two more layers of tiles? So we would draw backdrop tiles (the rocks and sand in the photo above), then the PC, then transparent water tiles (everywhere we have water blocks, and in spaces horizontally adjacent to those), then the normal tiles.

Something like this:

mockup2

It doesn't need to happen right away, I just want to know if you think it's viable before I start making the new tiles.

Fyll commented 9 years ago

Sounds doable. If I put a "back" bool in BlockData, it could say whether there should be a stone tile behind the current tile.

DivFord commented 9 years ago

Bearing in mind that we need a layer in between for the water.

Fyll commented 9 years ago

It'd be: Loop through all objects, drawing everything that isn't stone (and drawing an extra stone behind the current tile if backing = true), then loop through all objects drawing the stones.

Getting the water to also be behind the neighbouring tiles will be quite tricky, as it would want to match the tile (e.g. If the water tile freezes, ideally, so would the neighbour behind the stone).

DivFord commented 9 years ago

It can't just draw everything that isn't stone, because we're going to get the same gap problem with earth.

I think we need to to flag everything that's water, ice, or horizontally adjacent to one of those. Then we can do three passes: One to draw water background tiles on all the flagged places, another to draw water or ice on all the flagged places, then a their to draw all other tiles in their proper place.

(I may have confused things slightly by using the stone tile as the back layer in my illustration - that's going to be a water background tile instead)

Fyll commented 9 years ago

Wait, there's going to be a special water background? I thought it looked quite nice with stone.

DivFord commented 9 years ago

At the very least, I should drop the ground level on it slightly. It's not entirely clear that you can't walk on that stone as it is.

DivFord commented 8 years ago

These are called midground blocks now :P Closing.