Multiplatform low-resolution 3d engine. For losers, by losers.
Right now, this is simply a collection of little classes.
Positionholds x, y, and z locations.
Voxelis a Position and a color.
Gridis a collection of Voxels
Then there's how to display these:
Camerakeeps track of where we're looking.
Projectionconverts a Position to a pixel location, given a Camera and a pixel size. There's
UIkeeps track of the Grid, the Camera, and the Projection, and actually renders the result.
You can run SwingWannabe, a java-AWT and Swing implementation that I'm using as my testbed. It has a number of sample Grids, including a heightmap and displays the resulting Grid. I went ahead and implemented 8 different render modes (shown here with the Cabinet projection).
wannabe rendering the upper-left 50x50 pixels or so. Render modes: circles, rounded-squares, squares, and "3d" squares.
And there's non-filled versions of the same shapes:
As you can see from the samples, this isn't really meant to be a photorealistic engine. It's geared more for pixel-art and retro-style visuals, but allows for some nifty things.
Grids should be considered the smallest practical unit of animation. Voxels inside a grid shouldn't move relative to one another. Some grids can support adding and removing voxels, but a voxel should only be in a single Grid.
My expectation is that the camera will always be looking down the z-axis. The position of the camera may change, but not the direction.
I don't have a better answer here than what I've said. This is a way to learn some little bits about 3d graphics while working in a simple space. And potentially it can be a good platform from which to develop some small games.
I chose the MIT license at this time. Please contribute back fixes you come across!