I’m sitting at the local bakery, sipping tea and eating cherry pie for breakfast at 1:30pm on a Saturday. I figure I should get out of the house for at least a few minutes before going back in there and getting stuck in this lighting again. And the bakery is a 3 minute walk away, so it works.
I went to bed at 4am last night after getting quite a bit done with the lighting since my last post, but the hardest part is to come today. Since my post yesterday the following happened:
No more fog of war effect.
The light emitting entity now actually emits light instead of building a trail of light.
No more jagged/sharp edges on lighting tiles.
As suspected, this was mostly an art style thing. This became obvious when I replaced my placeholder tiles for…different placeholder tiles. We will need to keep this in mind when doing the proper art for this. The terrain and environment have to be drawn in a way that minimizes the appearance of edges around the light transitions.
The light fades over time.
The light gets weaker based on a timer, until eventually it fades completely.
There was also some messing around with general art style type stuff and experimenting with washing the game out with a hue, and ongoing code cleanup (which there is much of), and setting up my Trello task list, and fixing up some of the current bugs, and other project management type stuff. I’ve also set up a new Git repository with my master and development branches now all ready to go.
What needs to happen today is calculating the exact distance between the light and other entities on the map. I’m thinking I’ll actually use the
.distanceTo method to find the exact distance between each entity and the light emitting entity, then use the light emitting entity’s visibility attribute (which dictates the span of the light in tiles or fractions thereof) to refer to where the edges of the light are. This could get tricky, but I think it might just work.