7DRL Day 2


Day 2 was quite intimidating. Having the core player mechanic up and running, I needed to turn my attention to building out the environment you play in, which meant being able to generate interesting maps.

For Station Salvage, you are on a space station, so every room needs to be enclosed. I wanted the rooms to be separated by auto-open/closing airlock type doors, so you can only see in the room you are currently inside.

I was planning for there to be some room-global effects as well, so I needed to add a system for defining certain rooms, and modifying the tiles within all at once. This took most of the morning.

After that, the lighting/Field-Of-View (FOV) algorithm was next. I took two passes at this:

1) You can see everything in the room you're in, but nothing outside it. - Calculating this is relatively fast


2) You can only see as long as your vision isn't blocked by an "obscuring" object, like a wall or door - This is a more intensive calculation, but it allows for a more organic effect.


The organic approach (2) is more glitchy in places, but I think it suits the atmosphere sufficiently. I'm grateful to Lazy-Devs Academy's video on Fog-Of-War, which provided a solution to some odd artifacting I was getting.

I was hoping to get more done today, but this will do.

Next up, we need an objective, and a way to lose.

Get Station Salvage

Comments

Log in with itch.io to leave a comment.

Awesome progress! Can't wait to see the next update!