Menu part 2: Son of the Menu

I keep an axis-aligned rotation matrix (for lack of a better term) that I rotate by ninety degrees whenever the player crosses to another side. It's used in figuring out which direction in world space the player wants to go when a directional key is pressed. That matrix is being updated when going from in-game to the pause menu, but not when resuming play. The result is that after resuming play movement works fine so long as the player remains on the same side, but crossing to an adjacent side often causes "movement lock," because the matrix used in the movement calculation no longer matches the current orientation.

I've thought about this all day; I was going to store the matrix upon entering the menu, and restore it upon resuming the game, but I've come to the decision that I don't think I need one in the menu system at all, so there's no reason to overwrite it in the first place.

I've also noticed that depending on the cube's orientation upon entering the pause menu, what was up before pausing the game may not be up upon resuming it. I don't mind this personally, but it can also lead to movement lock. So I'll either need to store an orientation matrix anyway, so that up stays up; or rebuild a new axis-aligned matrix from the camera's current orientation. I'm not sure which I'd rather do. Another consideration is that players may the orientation to stay the same from pre-pause to post-pause.

But all this menu-related thought has led to thinking about the menu itself. I already have one more sub-menu than I have cube sides. For the moment I've replaced the multiplayer menu with the exit confirmation menu, since I don't see multiplayer happening any time soon. But the system should be more flexible than that, and the current menu code is fugly, thrown together and hard-coded so that I had something usable from within the program.

I had been playing around with lua binding before my last coding hiatus, and I think that after squashing these menu-related movement bugs, I need to implement a scripted menu-system. It seems like quite a hefty task to me, but really no bigger than some of the other learn-so-I-can-implement-in-the-game tasks I've done, or have yet to do in order to finish this thing properly.