! Downloadable demo available at the end of the post !
I am working on a simple OpenGL viewer for Ace Of Spades .vxl maps (in C language).
I made it to learn OpenGL and to see if Minecraft lighting would suit AoS.
Comparison shots between Ace of Spades and the OpenGL viewer :
Video of mesa.vxl in the map viewer:
The light is propagated just like in Minecraft.
There is also lighting interpolation across block faces.
Below a screenshot without color information (to have a better look on the shades) next to a full render :
The tool is a command line program with the following switches :
Code: Select all
If it's not working straight away, you could try the lowest settings as indicated below :
___| | ___| |
| | | __ \ _ \ | |
| | | | | __/ | | |
\____| \__,_| _.__/ \___| \____| _____| v0.4a
Usage : ./cubegl [OPTIONS] <mapfile>
options :
-f : enable full screen
-w [value] : window width
-h [value] : window height
-z [value] : window depth (bits per pixel)
-v : verbose output
-d : debug
-p : display debug graphs (plots)
-b : discard block's color information (white blocks)
-a [0,1] : advanced OpenGL enabled or not (VBO)
-c [0,1] : draw clouds or not
-t [0,1] : draw textures on blocks or not
-m [0-15] : minimum lighting value (0 for dark, 15 for light, default = 2)
for 0, dark areas will be pitch black
for 15, there will be no dark areas
-s RRGGBB : color of the sky in hex values (e.g. FF0000 for red)
sample values :
9BD2F1 : blue sky for day (default value)
001F36 : dark blue for night (you may want to lower gamma to have a better effect)
E3A857 : for a sunset color (you may want to lower gamma to have a better effect)
-q [0,2,4,6,8,16] : antialias quality
-g [value] : gamma value (default 1.0)
-r [value] : render distance (default 24)
example :
./cubegl -w 1024 -h 768 -z 16 -p -v -a 0 -b -c 1 -t 0 -m 2 -f -s 001F36 -g 0.5 ./mesa.vxl
Code: Select all
On GNU/Linux, if you have a missing library error, try launching the program like this to use the included libs :
cubegl -q 0 -t 0 -c 0 -w 800 -h 600 -z 16 -a 0 map.vxl
Code: Select all
Controls are WASD / ZQSD to move, shift to go down, space to go up. Esc to exit.LD_LIBRARY_PATH=./libs ./cubegl map.vxl
Links to version 0.4a download :
GNU/Linux 32 bits (2 MB)
GNU/Linux 64 bits (2 MB)
Windows (2 MB)