Vox Mine 3D

2023-06-12に共有


Mine your way to fame and fortune in a continuously generated 3D voxel world. But keep an eye on your energy level and make sure you can find your way back through the deep and twisted caves.

Build block fortresses with a variety of materials.

Use the Far-View 3D Map and GPS to stay safe.

Instructions:
s,f: turn left and right
e,d: move forward and backwards
lshift or z: jump (hold to jump higher if upgraded)

The mouse is required for mining and building.
Click on shop computer to enter store menu. Ore and gems will auto-sell.

With laser selected, click and hold on a block to mine it. Circular progress bar will indicate how long is left. Precious ores will take longer to mine.

With a placeable block selected, click on the side of an existing block to place a new block.

Energy will deplete when moving, jumping or mining. The battery can be recharged by standing on the glowing yellow charge squares near the shop. When your energy goes to zero, you will lose most of your money and be teleported back to the starting point.

Recommendations:

Notes:
This game uses a modified ray-casting engine based on tutorials from (https://lodev.org/cgtutor/raycasting.html). This was extended to work with voxels, reading in a local 3-dimensional map array.

The map is generated dynamically as the player moves around. However, it is set up such that the same block will always exist at the same x,y,z coordinates. In addition, there is a user map that is used to store the locations of blocks that the user added or removed. These are essentially stored in a sparse matrix.

There is currently no way to save your constructions. It might be possible to save some aspects of the world with the persistent cart data, but I don't know that 256 bytes will be sufficient. Clipboard import and export might be a better way to allow folks to share creations.

The code is a dog's breakfast. Token count wasn't really a problem for me on this one, but it was a struggle to keep frame rate acceptable with the world rendering code. I'd love to be able to increase the view depth without dropping to 15 FPS.

-electricgryphon