Monday, March 17, 2014

Week 2, Game 2: 3D Maze!

This week was pretty hectic with I3D among other things.  I managed to slip together a simple (and quite ugly) prototype of a 3D maze.  The idea is this: in a 2D maze, the player can move left, right, up, down, and the movement is constricted by a set of boundaries.  An example maze generated is shown below:



While this is great, I wanted to experiment with a 3D maze.  So I thought it would be cool if the maze is generated the same way, except the player has the option of going down or up.  How this would be displayed on the board is that the current layer the player is at will be displayed (looking like above), and cells will be marked (with textures or colors) whether there is a pathway to the layer below or above.  An example is the bottom, where red means there is a pathway down, blue is a pathway up, and green is a corridor leading both up and down.


So how to navigate this?  Well, I thought it would be nice for the player to rotate the maze cube, then the layer that is facing UP will be the layer the player sees.  So above, if the player is on a red square, then when rotated, the down pathway will now be on the top layer as a pathway leading left (or right depending on rotation direction).  Then the player can move.  Well, this was fine, but it makes the game so complicated!  I'll have to experiment with a different maze generation algorithm in the future which minimizes down/up pathways, but the problem is that the player sees a slice of the maze cube at an arbitrary rotation, so down/up/left/right/ etc. are all relative to the slice.  Anyways, I finished a simple prototype using C++ and SDL again.  I didn't have time to put any textures in it as I would have liked, but I think this prototype could have potential.  Perhaps I will go back in a post-mortem update and make it look better.

The video below shows an example run.  Red is down, blue is up, and cyan is both ways.  The player can rotate the cube, and the slice that needs to be shown is show.  I think making the player a 3D object such as a sphere could add a little bit to the UI.  Currently, there is a lot of room for improvement in the UI, and if this is extended to a project the UI would probably be the hardest thing to get right.  This is an example of "it looks great in my head" but when it comes down to it, a lot of experimentation and player testing would be needed to get just the right view, colors, textures, shading, etc. to make it feel "intuitive" to the player.





No comments:

Post a Comment