Characters and objects in the game are made out of blocks (lots of blocks!), and we don't want to create them by editing a text file or by setting them directly in the code. So the first thing I've been working on is an editor.
The goal of the editor is to provide an easy to use interface (so everyone can use it!) to create simple voxel characters or objects. It allows you to carve and add blocks, as well as paint them with different colours.
The character can then be save into a custom .vox file format, where all the voxels are stored sequentially (this could benefit from some data compression in the future). Of course, characters can also be loaded into the editor.
The following picture shows the editor with some kind of a Viking character in it (the character design hasn't been fully decided yet). The editor is in "build mode", i.e. blocks can be added with the mouse, the black outline shows where the block will be added on mouse click.
Our first character in the editor. |
This character was made in a 16x16x16 grid, because it seemed to be a "fair" amount of blocks for a character, but nothing is stopping us from using more or less blocks, except that bigger meshes require a better computer to run at a good framerate!
The tool bar on the left side of the screen provides several functionalities:
- load
- save
- rotate the view
- zoom in/out the view
- remove block
- add block
- paint block
- exit
Of course, the editor is still an ongoing work, several things will have to be improved, such as:
- the icons: I don't like them! I made them out of a few pixels to keep the "blocky style" of the game, but they just look old like that. Maybe they would be better in colour, or they could be made in 3D blocks themselves!
- settings: to change grid size, the background, enable/disable the outline...
- more tools! To build chunks of blocks, to copy/paste part of the model, automatic symmetry...