Musings, ramblings, rantings about technology, games, puzzles, and whatever else catches my attention.
Sunday, September 15, 2013
Visibility Calculations
280 lines of hexagon math, 148 lines of test harness to verify the code as I was going, and now I have a visibility routine. The thing with this month's mazes is that visibility is always going to be very constrained; I could have accomplished the same effects in a lot less time, in a lot less code by doing a simple raycast in 6 directions.
I'm halfway through refactoring the tile code - my intention is to keep track of what the player has seen in the tiles, and use that to create a "fog of war" effect; stuff you currently see is bright, stuff you saw previously is darker. Stuff you've never seen is, let's say... black.
I've been wrestling with what colors to use for the various tiles. Anything that's at all colorful has been, to my mind, debugging assets. The stuff I was thinking I'd use was the greyscale (anything between black and white, inclusive) hexes. But the difficulty there was that a currently visible wall is going to be some color of grey, and a previously visible path tile will be some other color of grey, and a previously visible wall, that's yet another color of grey, and it's all too much. So, new assets for the tiles, I guess.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment