date: 2016-09-26
title: Maze thing, part 2

Maze thing, part 2 - 2016-09-26 - Entry 19 - TOGoS's Project Log

See if you can find the red ball and bounce it around.

Nothing groundbreaking to report, but I've done some work to make maze physics less frustrating and added ladders and a door that you can open and close by clicking buttons on the page.

The door is actually an entity just like the player, but has a higher climbingSkill, so can climb the door frame, which is less climbable than ladders. There could be fences and vines and other things that require varying degrees of skill to climb.

I've also done some work on visibility calculations. There is now a cost to turning corners, so you won't be able to see as far along a twisty hallway as along a straight one. Partially opaque things like ladders and vines reduce visibility without blocking it entirely. The occlusion fog margin rendering was buggy, and I fixed that.

You now have a bit of control while in the air, so climbing onto ledges isn't as frustrating.

I've tested that loading and saving works, though the UI provides no way to do it. This means an editor shouldn't be too far off. If you want to, type (saveData) => console.log(saveData) ) into your browser console to dump out a save game object, and maze1Demo.loadGame( saveData ) to load it again. Right now the referenced data is stored only in script variables so you can't share save games and everything is lost when you close the tab or when the browser unloads it.

Next steps: