
How Does Voxel Quest Work Now? - gavanwoolery
http://www.voxelquest.com/news/how-does-voxel-quest-work-now-august-2015-update
======
sebular
Your work is incredible. Every time you post an update it's fascinating and
humbling.

That being said, it's hard to be excited about the game, because there doesn't
seem to be one. I'm looking forward to when you release the engine in a
documented usable form so that people who are passionate about games--not game
engines--will have a chance to use this amazing tech.

On the other hand, it seems like there's nothing you can't do, maybe you're
also a genius game designer. Though I'd still like to see what other people
can do with it.

~~~
gavanwoolery
Thanks - I agree with you on the game part, which is why I am buckling down on
creating a simple game to ship within the next few months (this is outside of
my long term goals for the game). I am open to suggestions as well as to what
this should be - there is a thread on the forums about the prototype game and
all ideas are welcome.

I really can't claim to be a good game designer yet. My primary goal really
was to get this engine into other people's hands, and the only reason I am
building a game is because I can't build a business off an engine alone, and I
need to dogfood the engine to ensure necessary features. :)

~~~
Glyptodon
Some sort of game where you design, build, and manage dams, canals, and water
usage for a small coastal country might be interesting and let you take
advantage of the terrain and simulation aspects of the engine. Plus you could
find out what happens when CA really does run out of water, ha ha.

~~~
TrevorJ
Wow, that would be quite fun! How does one sim water in 3d effectively in this
sort of case? Is it basically a 2d grid with a third "depth" variable and some
simple rules like "where neighbor depth > mine: +1 to neighbor depth on tick"
or something?

~~~
detaro
That approach has the downside that you can't have water jets or multiple
layers of caves with lakes above each other. Most "voxel"/block-based games
allow blocks to be filled with different levels of water and then have rules
to spread it around.

2 Examples:

In Minecraft, there are source blocks and normal water blocks. Water spreads
from source blocks towards the lowest point in the area and loses one level
(from 7) each step. If you put water source blocks close together, new ones
spawn between them. Water just "evaporates" after a few blocks: If you dig up
from a cave with flat ground into an ocean, water will spill to the ground and
flow 7 blocks. But that makes it easier to handle for players. Example:
[http://minecraft.gamepedia.com/File:Das_Waterfall.png](http://minecraft.gamepedia.com/File:Das_Waterfall.png)

Details:
[http://minecraft.gamepedia.com/Liquids#How_liquids_work](http://minecraft.gamepedia.com/Liquids#How_liquids_work)

Dwarf Fortress on the other hand has infinite water sources that also have
pressure, so hitting a water source with a tunnel will fill your fortress up
to the level of the source block, because the water spreads infinitely and
also can go up bends. FUN! (Especially if you hit one with high pressure =
producing a lot of water. First thing you notice is that the frame rate drops
to slide show speed, a few frames later there's water everywhere)

If you block it off, it remains. (vs in Minecraft plugging all source blocks
makes water disappear)

This is a more realistic approach, especially if the speed at which the
sources produce water is limited and they are only used at the map edges to
simulate inflow. Or one could look into finite element modelling and other
fluid simulation techniques and try to adapt them for game usage.

~~~
gavanwoolery
The water simulation I have built has finite water and also simulates pressure
correctly, as demoed in the past. However, on the downside it is infinitely
elastic (a single drop will spread over a large plane, like oil in an ocean).
The rendered water also does not correspond 1:1 with the actual water volume,
so it can look buggy. And there are still a few minor bugs as well.

~~~
kbenson
I noticed that it seemed to spread laterally much quicker than it dropped,
which looked odd. I imagine modeling water in a performant and semi-realistic
way is rather hard.

------
daenz
SDFs (Signed Distance Fields) are an amazing optimization to marching a ray
through a scene. Unreal Engine 4 uses them for ambient occlusion
[https://docs.unrealengine.com/latest/INT/Engine/Rendering/Li...](https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/DistanceFieldAmbientOcclusion/index.html#howdoesitwork)
and soft shadows
[https://docs.unrealengine.com/latest/INT/Engine/Rendering/Li...](https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index.html)

The author mentions Inigo Quilez, an incredible demoscene artist, who has an
amazing writeup of how he uses SDFs for creating the geometry in demos:
[http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf](http://iquilezles.org/www/material/nvscene2008/rwwtt.pdf)
I remember when it "clicked" for me... instead of defining geometry and
generating SDFs for use in shading, which is expensive, he was generating SDFs
directly to be used as the definition for geometry! It's brilliant.

~~~
edem
Are you talking about IQ from Shadertoy? You can check out his stuff here:
[https://www.shadertoy.com/user/iq](https://www.shadertoy.com/user/iq)

------
dietrichepp
I think one of the reasons there continues to be so much excitement about this
project is that it clearly does not look like any other game on the market.
It's only more exciting now that the renderer is fluid and the perspective not
limited, demonstrating that the results are not an unpractical hack.

~~~
gavanwoolery
Thanks! There was a time when graphics coding was more creative (people get
quite creative with what we have, but we can only take it so far). John
Carmack was writing Doom's engine, Ken Silverman the Build engine, etc.
Everything looked and felt different. The standardization of rendering
hardware and APIs has become a blessing and a curse. On the bright side, it
saves us from reinventing the wheel, but on the downside, there is some art in
reinventing the wheel. When I launched Doom for the first time, it was
basically Wolfenstein in terms of gameplay. But it was visually beyond
anything I had seen prior, and the visuals created an entirely different
experience on their own (and I used to be a large proponent of the "graphics
don't matter" camp). It is incredibly punishing (from a business standpoint)
to be in the engine business - even if you are one of the big guys, but I feel
like somebody has to add a little diversity to the arena. Using these newest
techniques is very refreshing to me because it allows for all kinds of tricks
that simply are not possible in your traditional modern polygon pipeline.

~~~
archagon
I agree completely. But as someone very interested in game dev, I am also
terrified by the idea if spending 3-4 years on just the tech. I wish there was
a good middle ground.

~~~
daenz
As someone who is writing a real-time 3d engine, let me tell you the
experience is incredibly rewarding. My math background is weak, but the
practical applications of 3d maths that you will learn is invaluable. If
you're interested in learning how a pixel is created on the screen from some
arbitrary model in a lighting environment, nothing can really replace writing
an engine. Give it a shot!
[http://web.archive.org/web/20150311211412/http://www.arcsynt...](http://web.archive.org/web/20150311211412/http://www.arcsynthesis.org/gltut/)

------
BatFastard
Looks great. What does concern me is the VERY limited view distance. I assume
this is a micro-voxel engine. So that in that small space there are millions
of voxels. Scaling that up to give a reasonable draw distance is a challenge I
have not seen anyone live up to yet.

If you like this style of engine check out
[http://www.atomontage.com/](http://www.atomontage.com/) and Ken Silvermans
[http://advsys.net/ken/voxlap/pnd3d.htm](http://advsys.net/ken/voxlap/pnd3d.htm)

Keep up the good work.

~~~
gavanwoolery
I mention it in the video, but it is somewhat buried - view distance is more a
data loading problem than a rendering problem. I just have to optimize for
faster data loading (right now it happens on the main thread so it locks the
program for bigger data loads/unloads and makes it lag). Still pretty early in
this respect, so a lot of room for improvement there down the road. I am
friends with Branislav (Atomontage) and a long time fan of Ken's work. :)

------
grownseed
Gavan's work is outstanding to say the least, I haven't felt like such a
fanboy in a very long time. Every time an update is posted, I'm on the edge of
my seat waiting to hear/see more.

Some people here and other places have noted that it is hard to get excited
without an actual gameplay, but for me the gameplay, while a very interesting
and essential point for the final product, is almost secondary. Just looking
at all the ideas people have come up with around the engine is quite telling.

People are being excited, curious, creative, collaborative and kind about the
whole project. Gavan's doing an amazing job at being transparent and honest,
while patiently listening and responding to people. Even if these are the only
things that ever come out of Voxel Quest (though I'm sure that won't be the
case :) ), I'd say that's already a great achievement.

~~~
gavanwoolery
Thanks, I am honored :)

------
searine
That draw distance is giving me Superman 64 flashbacks...

In all seriousness. Voxel tech is awesome and I can't wait to see some games
implement it fully.

~~~
gavanwoolery
Haha - yeah it is pretty poor but I will fix it up a bit soon. I did get
farther distances working "ok" but still need to work on optimizing it to load
in data without lagging. Here is one shot with a farther view distance:
[https://pbs.twimg.com/media/CJ83yn7UcAATnkU.png:large](https://pbs.twimg.com/media/CJ83yn7UcAATnkU.png:large)

~~~
rcthompson
For your first game, you'll probably want to pick a topic that either is not
hindered by the draw distance or is even helped by it. Like the way the early
Silent Hill games used the limited draw distance to create a spooky foggy town
setting.

~~~
gavanwoolery
Also, Daggerfall had a fairly limited draw distance IIRC, which I didn't mind
when I played it.

------
willvarfar
I've played in the past with ray marching
[http://williamedwardscoder.tumblr.com/post/26628848007/rod-m...](http://williamedwardscoder.tumblr.com/post/26628848007/rod-
marching) (I eventually did it all on the gpu) so I'm curious how this is
split between cpu and gpu?

~~~
gavanwoolery
Mostly GPU - the logistics of the fluid simulation are the only expensive
thing that runs on the CPU really

------
markus2012
Impatiently waiting for an engine + API docs that I can download and play
with. :-)

~~~
gavanwoolery
Soon actually - I can't give a release date but source should be going out in
the not TOO distant future. :)

~~~
kleer001
Have you figured out what you're going to do with your billions when this eats
up Minecraft? In all seriousness the bits and bobs you're putting together are
delicious. I would say that the stories and games that people use to built it
will be the most important part of its success, obviously.

~~~
gavanwoolery
I hope so! I'll settle for millions ;) ;)

------
newobj
Looking good.

Something about that land-based ripple effect makes my brain think the effect
is happening in screen space. Wonder why?

~~~
gavanwoolery
Thanks - its actually world space :)

~~~
daenz
Speaking of world space, have you run into any precision errors in world
space? The further you get away from the origin, your floating point numbers
lose precision, so I've understood that doing world space transformations and
comparisons can lead to artifacts. Have you had to compensate for this
anywhere yet?

~~~
gavanwoolery
Yes I've hit these errors in the past. One way around it is to keep things
local to camera space (as far as rendering goes).

------
Frenchgeek
And now I want to play magic carpet...

~~~
gavanwoolery
An ex-Bullfrog employee just told me they wanted to use my engine, so... :)

------
kenrikm
I really like the sprites they have some character though the shiny dirt is
not really my thing. Any idea when content like structured gameplay or stories
will start to be added or is this more like Minecraft where you kinda just
play with the world?

~~~
gavanwoolery
Yep the terrain needs improvement. :) Sprites are just placeholders I bought
from an asset pack. I am currently working on a building a small prototype
game that will be very simple, along the lines of Capture the Flag - so not
quite a story, but structured gameplay at least.

~~~
tP5n
CTF? OK. between this and the axe, at one point you basically have to do
voxelquake, just so that we can play with that engine :)

that might not be a bad idea for a 'simple enough' game, a fps within
everything is destructible. four a side, some simple enough goal, a timer set
to 20 minutes and you have a potentially very fun game.

/edit: in an 'afps' level design would make draw distance less of an issue
aswell.

------
agentultra
Thanks for the update! I really like your novel approach. Ray marching is
pretty cool for scaling in procedural generated graphics so that you don't
have to load entire geometries and cull most of it. Just render what you can
see! :)

Nice trick with the objects.

------
rasz_pl
I heard mention of single core and Im, afraid its already too late. Projects
that start single core and get advanced enough are very difficult to convert,
if not impossible without a total rewrite.

~~~
gavanwoolery
I use multiple cores for some tasks, such as the fluid sim - I only have not
moved loading scene data into a separate thread.

------
freehunter
>Arguably the isometric rendering looked the best of all the methods

I disagree just based on the few screenshots here. The isometric looks so
generic. The latest version almost looks like a 3DS game (especially with the
draw distance), but at least it has some character. The isometric screenshot
looks like an iPhone RPG that I would see in ads but never actually play.

~~~
iopq
But I love that look, I actually want to see videos of the first revision

~~~
gavanwoolery
You can find videos here:
[http://www.voxelquest.com/videos.html](http://www.voxelquest.com/videos.html)
(scroll down)

------
gcb0
rev 1 and 2 look better... 3 looks like everything is covered in oil.

~~~
gavanwoolery
Haha - thats an apt description. :) I've added in "real" specular (it was
"fake" prior), and probably went a bit too crazy with the specular highlights.
I need to tone it down considerably.

~~~
gcb0
or just deep fry it :)

