mbkarle / mind-the-fog

Roguelike JavaScript game--mind the fog!
2 stars 1 forks source link

Fog2oh #79

Closed akarle closed 7 years ago

akarle commented 7 years ago

In an effort to work on #74 , I did the following (commit by commit):

  1. Fixed a couple bugs related to fog (#75)
  2. Refactored code to allow for multiple fog radiuses
  3. Created a basic framework which causes the fog to close in after a given interval
  4. Added fog to safe rooms
  5. Added darkness as a property to all rooms (based on tier). Basically, once a room is cleared, the visibility is equal to the darkness of that room (plus a torch modifier if you choose to use one)
  6. I added this new variable game_duration, which determines how fast the fog will actually close in. Note that fog won't close in if the floor is cleared, so this is really game_duration_in_fight_rooms, but thats a little long.

I tested this pretty extensively in my own branch, but @mbkarle to check it out use the - key to remove monsters for the whole game and then on a single floor you can use = to clear the floor and see the base darkness kick in!

Oh and if you want to see the effects yourself faster, just change game_duration to be something around, say, 30000.

If you find any issues, please open a new issue and reference #74 so we can keep it all in one place! Cheers, Alex