Wednesday, June 29, 2016

Progress Update


I think an update is long overdue, just in case anybody has been following the progress of my block game.  I haven't really added any amazing new features but what I have been doing is adding lots of small features and subtle improvements.  I'm gradually working towards getting a new version worth uploading, and hope to have that done in a couple weeks if not sooner.

The most significant feature that I've added since my last post is the block palette.  This allows you to build much more efficiently, and you're not limited to build with just the blocks that are in the scene.  You can see an example of the palette on the left side of these images.  This palette is completely customizable, you can add and remove blocks from it at any time.  You're also not limited to just the 10 blocks contained in the palette.  There are actually 10 palettes which you can switch to by pressing the numbers on the keypad, or by pressing B you can simply cycle through them (in case your keyboard doesn't have a numeric keypad).  This allows you quick access to up to 100 block shapes.  The colors are independent of shape, so you can place a block in any color without taking up multiple slots in the palette. (The color is cycled by pressing R)

To add blocks to the palette, you can go to the inventory space by pressing Tab (a feature I've talked about before).  You just pick up a block, then move the mouse scroll wheel in either direction and if the block is not already in the palette, it will be added. 

I've worked on this inventory space quite a bit as well.  In a prior post I described the use of clear plastic bins that would auto-fill with blocks, but I've changed my mind about this.  While it's neat, ultimately I felt it was going to be rather resource intense, and not really necessary.  Maybe I'll revisit it at some point.  For now I've decided just to provide the blocks organized into the packing arrangements as I've shown earlier, which you may have seen in the previous downloadable version.

A look at the inventory space (nothing too special)
The mechanics of adding and removing blocks from the palette and spawning a block from the palette are really simple and intuitive.  You can scroll up and down through the palette with the mouse scroll wheel, and doing so spawns a block of the highlighted shape, already grabbed and ready to place.  One minor cool feature is that the highlighted block slowly spins, so it's easy to discern the details of the shape (making it distinguishable from other similar looking blocks).


I've also worked on the save and load functionality quite extensively.  The game features autosave now, so that when you start the game you'll be exactly where you left off last time you played.  You can also still make a manual save as well.  Besides the block positions and the player position, many other settings are being saved now, including all the block palettes you've made, the music volume and whether it's switched on or off, and the floor and sky textures that you prefer (so you don't have to switch them back each time). 

Some other improvements have been made to block placement/positioning, and how the blocks spawn when you get them from the palette so that they won't disrupt your structures (they look for a clear place to spawn, and if there's no space available you'll get a sound to indicate you need to re-position yourself to enable the block to spawn). 

I added an angle snap feature which really simplifies the building process.  You toggle it with the caps lock key.  In angle snap mode, the block you're holding will maintain it's rotation relative to the world, no matter how you turn, and is locked at 90 degree angles.  You can change the angle in all 3 axes (again by 90 degree increments), and you'll see the block smoothly transition/spin to the new angle orientation.  There are some minor bugs to work out, so I consider this a beta feature at the moment, but it works well as it is.  I also intend to implement grid snapping which should further speed up the process of trying to align blocks perfectly with one another.

That's pretty much it.  I've set the lego blocks aside for the time being, as the work still needed to get that up to snuff is considerable.  I'd rather work on getting a fully functional and polished version of the game with stackable blocks, more complex stuff can come later on.  My main focus for now will be on adding more stone blocks, getting the wood blocks working as well as the stone blocks, and getting more instruction booklets into the game.