Skip to content
Myr

stb_voxel_render_interview.md

This file

Path

docs/stb_voxel_render_interview.md

173 lines · 7.0 KiB · Markdown

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than aeec66c point at it.

Merge branch 'randlong' of https://github.com/flibitijibibo/stb into workingSean Barrettbefore adoptionaeec66c

lines 1–173why, one step back
1# An interview with STB about stb_voxel_render.h
23**Q:**4I suppose you really like Minecraft?56**A:**7Not really. I mean, I do own it and play it some, and8I do watch YouTube videos of other people playing it9once in a while, but I'm not saying it's that great.1011But I do love voxels. I've been playing with voxel rendering12since the mid-late 90's when we were still doing software13rendering and thinking maybe polygons weren't the answer.14Once GPUs came along that kind of died off, at least until15Minecraft brought it back to attention.1617**Q:**18Do you expect people will make a lot of Minecraft clones19with this?2021**A:**22I hope not!2324For one thing, it's a terrible idea for the25developer. Remember before Minecraft was on the Xbox 360,26there were a ton of "indie" clones (some maybe making27decent money even), but then the real Minecraft came out28and just crushed them (as far as I know). It's just not29something you really want to compete with.3031The reason I made this library is because I'd like32to see more games with Minecraft's *art style*, not33necessary its *gameplay*.3435I can understand the urge to clone the gameplay. When36you have a world made of voxels/blocks, there are a37few things that become incredibly easy to do that would38otherwise be very hard (at least for an indie) to do in 3D.39One thing is that procedural generation becomes much easier.40Another is that destructible environments are easy. Another41is that you have a world where your average user can build42stuff that they find satisfactory.4344Minecraft is at a sort of local maximum, a sweet spot, where45it leverages all of those easy-to-dos. And so I'm sure it's46hard to look at the space of 'games using voxels' and move47away from that local maximum, to give up some of that.48But I think that's what people should do.4950**Q:**51So what else can people do with stb_voxel_render?5253**A:**54All of those benefits I mentioned above are still valid even55if you stay away from the sweet spot. You can make a 3D roguelike56without player-creation/destruction that uses procedural generation.57You could make a shooter with pre-designed maps but destructible58environments.5960And I'm sure there are other possible benefits to using voxels/blocks.61Hopefully this will make it easier for people to explore the space.6263The library has a pretty wide range of features to allow64people to come up with some distinctive looks. For example,65the art style of Continue?9876543210 was one of the inspirations66for trying to make the multitexturing capabilities flexible.67I'm terrible at art, so this isn't really something I can68come up with myself, but I tried to put in flexible69technology that could be used multiple ways.7071One thing I did intentionally was try to make it possible to72make nicer looking ground terrain, using the half-height73slopes and "weird slopes". There are Minecraft mods with74drivable cars and they just go up these blocky slopes and,75like, what? So I wanted you to be able to make smoother76terrain, either just for the look, or for vehicles etc.77Also, you can spatially cross-fade between two ground textures for78that classic bad dirt/grass transition that has shipped79in plenty of professional games. Of course, you could80just use a separate non-voxel ground renderer for all of81this. But this way, you can seamlessly integrate everything82else with it. E.g. in your authoring tool (or procedural83generation) you can make smooth ground and then cut a84sharp-edged hole in it for a building's basement or whatever.8586Another thing you can do is work at a very different scale.87In Minecraft, a person is just under 2 blocks tall. In88Ace of Spades, a person is just under 3 blocks tall. Why89not 4 or 6? Well, partly because you just need a lot more90voxels; if a meter is 2 voxels in Mineraft and 4 voxels in91your game, and you draw the same number of voxels due to92hardware limits, then your game has half the view distance93of Minecraft. Since stb_voxel_render is designed to keep94the meshes small and render efficiently, you can push the95view distance out further than Minecraft--or use a similar96view distance and a higher voxel resolution. You could also97stop making infinite worlds and work at entirely different98scales; where Minecraft is 1 voxel per meter, you could99have 20 voxels per meter and make a small arena that's10050 meters wide and 5 meters tall.101102Back when the voxel game Voxatron was announced, the weekend103after the trailer came out I wrote my own little GPU-accelerated104version of the engine and thought that was pretty cool. I've105been tempted many times to extract that and release it106as a library, but107I don't want to steal Voxatron's thunder so I've avoided108it. You could use this engine to do the same kind of thing,109although it won't be as efficient as an engine dedicated to110that style of thing would be.111112**Q:**113What one thing would you really like to see somebody do?114115**A:**116Before Unity, 3D has seemed deeply problematic in the indie117space. Software like GameMaker has tried to support 3D but118it seems like little of note has been done with it.119120Minecraft has shown that people can build worlds with the121Minecraft toolset far more easily than we've ever seen from those122other tools. Obviously people have done great things with123Unity, but those people are much closer to professional124developers; typically they still need real 3D modelling125and all of that stuff.126127So what I'd really like to see is someone build some kind128of voxel-game-construction-set. Start with stb_voxel_render,129maybe expose all the flexibility of stb_voxel_render (so130people can do different things). Thrown in lua or something131else for scripting, make some kind of editor that feels132at least as good as Minecraft and Infinifactory, and see133where that gets you.134135**Q:**136Why'd you make this library?137138**A:**139Mainly as a way of releasing this technology I've been working140on since 2011 and seemed unlikely to ever ship myself. In 2011141I was playing the voxel shooter Ace of Spades. One of the maps142that we played on was a partial port of Broville (which is the143first Minecraft map in stb_voxel_render release trailer). I'd144made a bunch of procedural level generators for the game, and145I started trying to make a city generator inspired by Broville.146147But I realized it would be a lot of work, and of very little148value (most of my maps didn't get much play because people149preferred to play on maps where they could charge straight150at the enemies and shoot them as fast as possible). So I151wrote my own voxel engine and started working on a procedural152city game. But I got bogged down after I finally got the road153generator working and never got anywhere with building154generation or gameplay.155156stb_voxel_render is actually a complete rewrite from scratch,157but it's based a lot on what I learned from that previous work.158159**Q:**160About the release video... how long did that take to edit?161162**A:**163About seven or eight hours. I had the first version done in164maybe six or seven hours, but then I realized I'd left out165one clip, and when I went back to add it I also gussied up166a couple other moments in the video. But there was something167basically identical to it that was done in around six.168169**Q:** 170Ok, that's it. Thanks, me.171172**A:**173Thanks *me!*