MetaVoxel: The Technology

We are building MetaVoxel in C++ with SDL/OpenGL, all of which are free, cross platform technologies. Since October, we’ve accumulated over 18,000 lines of code (and counting!), and built some pretty neat tools to aid us in developing this game. Our primary tool is the Voxel editor, which lets us cycle between prefab elements and place them in the world. From there, we can push and pop into metas (a silly term we’re using to describe a mini-world element) and edit them too.

For example, here’s a map I threw together last night:

voxel-editor

 

Mind you, there’s lots of visual elements enabled here, so it probably just looks cluttered, but Stett and I are finding that we can work pretty quickly to crank things out. In the lower left, you can see a stream of console output. We decided to rely heavily on console commands to relieve the burden of crafting a fancy user interface. It’s easy to drop in a new command if we need more control. We also have a limited UI library we’ve written for other parts of the engine that really benefit from it (see below).

We’ve distinguished “entities” from static parts of the map. Those are highlighted in green in the editor. Pretty much any game object that can move (with some rare exceptions) and interact with the player is considered an entity.

Building the static map is fun and all, but this is a game about puzzles! To craft the object interactions, we’ve built a link system within our entity logic. Essentially, it’s a distributed event system that allows entities to communicate with each other when certain important things happen. For instance, when the player picks up a key and presents it to a lock, the engine needs a way to tell the lock, “hey! you’re being unlocked.” That way, the lock can do stuff like play its unlock animation. Furthermore, the events can be linked to fire conditionally when something else happens. I tested this by linking a bunch of locks together so they would unlock in sequence.

Originally, we just used console commands to link entities together. Not only was this tedious, but it didn’t really give us enough information. It was hard to see which entities were linked together, and you couldn’t really tell which entity was linked to whom. So one weekend, I worked way too much and built a link editor to make this easier:

link-editor

 

graph

 

The frame on the left shows the “meta-tree” while the right side shows the current workspace for linking. You can link entities from arbitrary metas using this shared workspace.

We thought it would be really cool to build an animation system for characters. Rather than just cycle through frames of a sprite, our system lets you keyframe 3D positions of a character, along with the rotation/scale in 2D. Crafting those animation files by hand would be a pain (and waste of time), so we built a simple animation editor:

anim-editor

 

Yeah, it’s not very pretty. The weird gray background is Stett’s fault, he needed a middle gray to check for contrast issues in sprites. Utility trumps beauty I suppose. Also, a simple issue with our lighting system renders Jacob too dark; we haven’t fixed it quite yet. At any rate, it does what we need! We’ll release a video soon to show off the animations. I think they’re pretty cool. The death animations will be the best.

Naturally, there’s still lots to do. We’re really trying to double down and focus on developing fun puzzles. The extra stuff is nice, but the game needs to be fun right? Yeah, we think so too.

Thanks for reading! Here’s some more screenshots for kicks:

neat tower2

 

Advertisements

MetaVoxel

Since my last post, I started working on a new game project with a friend, Steven Barnett. It’s called MetaVoxel, and it’s a puzzle game involving a deeply recursive world.  What does that mean? Well, that’s a very good question. While initially tossing around ideas for the game, we decided it would be cool if the player could shrink to fit into a part of the world. In doing so, they would discover a deeper world within. The player can move in and out of these worlds to solve puzzles and discover new sub-worlds. Sure, it doesn’t make much sense, but who cares? We think it’s a cool idea. Here’s a concept painting by the illustrious and talented Steven:

At any rate, we’ve been hard at work on our new project, and we’re making a ton of progress. We’ve built a game editor for creating levels and crafting puzzles. We’re excited to show more, so in short order we’ll have a development blog online to show off our progress!