Sparse Voxel Octree demo for Falcon030 w/14MB + FPU

Approximating 'Minecraft' engine on an ancient Atari system.

(Minecraft & everything related to it is copyright Mojang)

Runs on:
- Falcon030 @ 16MHz w/14MB STRam + FPU
- Hatari 2.6.x configured for same

Performs best on RGB/Composite/TV display @ 50/60Hz. 
Also works on VGA but is slower!

Does *not* run (yet) on accelerated hardware. Other versions will follow.

It's possible to build things and save your work but scope is limited.

Basic controls;

Movement: 
  WSAD keys to move + mouse look
  SHIFT to sneak
  SPACE to hop

Actions: 
 LEFT mousebutton to dig/break blocks
 RIGHT mousebutton to place blocks
 C key to pick the block under the cursor/crosshair (if close enough)
 R key to replace the block under the cursor (if close enough)

(In 'fly' mode, SPACE to ascend, SHIFT to descend)

The block palette on the right hand side of the display can be scrolled
with the arrow keys (providing the command prompt is closed). The
block in the centre is the currently active block. 'Picking' a new block
with the crosshair using the 'C' key will update the block palette.


A built-in command language is provided to assist with building more
efficiently than placing single blocks. Something like the well known
'worldedit' plugin (but simplified). 

Instructions for editing commands will follow but some basic commands
are listed below to get started:


COMMAND PROMPT: TOGGLE ON/OFF WITH THE 'ESC' KEY!

World inputs (movement, actions) are paused while the command prompt
remains open.

Up/down arrow will scroll through command history.
Shift + up/down will scroll back through command buffer.


Change viewing mode:

> mode walk
> mode fly

Some preset worlds:

> world reset
> world preset platform/cube

Load & save worlds:

> world load "name"
> world save "name"


Generate a flat rectangular world 32 blocks across and 4 deep:

> world gen flat 32,4

Generate a natural, randomly seeded world 16x16 blocks across and 8 deep:

> world gen 16,8 seed 3367

Generate world with water at height=1:

> world gen 16,8 water 1 seed 3367

Get info on viewpoint:

> view info

Change view distance (default is 13):

> view zfar 10

Save/load view:

> view save "name"
> view load "name"

Change the skybox:

> sky load "sday"


The program will look for the script 'auto.svs' which loads a default world.
You can rename this file so it won't be found and the program will instead
generate a default grassblock with the viewer in 'fly' mode as a starting point.


BUGS / ISSUES:

Yes there are some... 

- avoid using 'world gen' over and over as there is a memory leak somewhere
  in that stuff and it will crash.
- the keyboard input handling is scancode based and only understands one
  keyboard layout (QWERTY). this will get fixed later.
- if the renderer is fed too many polygons, there can be glitches (!!)
  although it probably won't crash. use 'view zfar 10' to reduce view distance 
  if this becomes a problem with your build.

More might follow...

d.m.l
