Oct. 1st, 2020

Work Post

Oct. 1st, 2020 01:36 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
1:51pm - Had a long sleep today, finally up and working, and I just got some basic tilemap initialization working. So that's cool.

Also I spent some time thinking about the game when I wasn't working on it, and realized that I'll have to figure out how to determine light levels for different cells. I've got that handy dandy FoV calculator from RogueSharp that I copied over, but it isn't exactly perfect. It only gives you a field of view, not light levels for that view, and if you add on additional fields of view from light sources, it might let you see around corners. Not good.

Light needs to be tracked for position and level but also for source, so I'm not sure if I should have a light_level parameter on each tile, or treat light as an effect entity created by light sources. Heck maybe I should do both, and have light source effect entities modify the light levels of cells. I'm just not sure.

It's kind of important not just for determining what entities can see, but also for determining who will move in. I already decided that you'd need dark areas for bats and mushrooms to live in to act as the first things that live in your dungeon.

Classic 'dungeon builder' Dwarf Fortress doesn't even track individual lights, only the sun. You've either got a skylight or you're in total darkness. For that matter I can't think of a game like mine that does track lighting, except for maybe the inspiration; Viva Pinata had lights that would attract moths. But I don't think it tracked light levels. Maybe this isn't the best idea? If nobody else is doing it I mean, maybe there's something that will make it harder than I think.

I could skip tracking light per cell if I track light sources and their absense instead. Then I would be able to determine if you had dark areas for bats and mushrooms.

2:08pm - I just asked about it on the Roguelike Dev section of the Roguelike Discord. Maybe that'll help.

2:15pm - I've struck up a conversation with a dev there who has done light levels both ways I described, from the sounds of it. So I guess it's all possible.

2:25pm - The fellow I was talking with suggested doing a FoV calc for each light source to determine which tiles are lit, instead of tracking light on every tile, which is a lot of tiles.

Okay so let's see... Maybe I could set it up as a dictionary? Use the cell as the key and the value is the light level of the cell. That should work really well! Then I only need to update it when the light sources change.

Anyways I've got my basic ability to visualize Maps as a TileMap using an Autotile for the walls. What's my next step...

2:51pm - I think I need some time to think about this and distance from what I was doing before, so I'm going to take a break and I'll continue later on.

Profile

relee: Picture of Relee Starbreeze, Wizard (Default)
Relee Squirrel

July 2023

S M T W T F S
      1
23456 78
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 4th, 2025 06:45 am
Powered by Dreamwidth Studios