stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

Voxelium

  • 7 Devlogs
  • 51 Total hours

Voxelium is a voxel game I built from scratch in C++ and OpenGL, no engine, just a lot of code. Endless worlds with real seas, mountain ranges, caves, weather and animals, and you can break and build whatever you want.

What’s in it

  • Endless worlds from a seed: seas with islands, wide beaches, mountain ranges with snow on top, big deserts and forests, and you can see about 5 km out
  • Caves with huge caverns, tunnels and ravines, old mineshafts running through them, and it’s actually dark down there so bring lamps
  • Lighthouses, shipwrecks, desert ruins and pyramids (there’s something under the pyramids)
  • Water that flows, waves that go crazy in storms, coral reefs and kelp forests
  • Weather that does its own thing: rain, snow that piles up and melts, thunderstorms with real lightning, mist over the water at sunrise
Ship #1 Pending review

Voxelium 1.0

First release!! Voxelium is a voxel game I built from scratch in C++ and OpenGL, no engine, just a lot of code. Endless worlds with real seas, mountain ranges, caves, weather and animals, and you can break and build whatever you want.

What’s in it

  • Endless worlds from a seed: seas with islands, wide beaches, mountain ranges with snow on top, big deserts and forests, and you can see about 5 km out
  • Caves with huge caverns, tunnels and ravines, old mineshafts running through them, and it’s actually dark down there so bring lamps
  • Lighthouses, shipwrecks, desert ruins and pyramids (there’s something under the pyramids)
  • Water that flows, waves that go crazy in storms, coral reefs and kelp forests
  • Weather that does its own thing: rain, snow that piles up and melts, thunderstorms with real lightning, mist over the water at sunrise
  • Crabs, turtles, fish, jellyfish that glow at night, birds, butterflies and fireflies. You can punch them, they will run
  • Every block has its own sounds and every biome has its own ambience
  • Break and place blocks, 25 lamp colours, no height limit, save as many worlds as you want
  • Low / Medium / High / Ultra presets so it runs on more than just my PC

Controls
WASD + mouse, space to jump, F5 walk/fly, hold left click to break, middle click to place, F4 hotbar, ESC settings, F3 debug stuff

Tips

  • Hit New World on the title screen and type a seed or roll one. Save from the ESC menu if you want to keep a world
  • If Ultra is laggy, turn down detail dist in the settings first, it’s the biggest cost by far

Big thanks to everyone on opengameart.org whose textures and sounds are in here, they’re all credited in the readme.

  • 7 devlogs
  • 51h
Try project → See source code →
Open comments for this post

34m 56s logged

OK FINAL DEVLOG ACTUALLY

There were a few bugs from the previous one which I had to fix before release :dead:

  • Tree tops looked unlit and forests looked really gloomy, even in full sun. The light was reaching them fine, the auto exposure was measuring the whole screen including the bright sky and darkening everything under it. It only measures the world now, so trees actually look lit

  • Every new world had an old glowing test room carved underground in the same spot. It’s gone from new worlds, old worlds keep it so nothing in them changes- The game was running one of my internal tests every single time it launched, it doesn’t anymore

  • There was a hidden launch option that crashed the game on purpose, left over from testing the crash reporter, removed

0
0
34
Open comments for this post

14h 7m 42s logged

Final devlog (probably)

Terrain & World Gen

The old terrain was hills everywhere with puddles in between, and the mountains were random spikes shooting straight up out of flat ground like something was stabbing the map from underneath. So I rewrote the whole generator.

There’s real seas now with islands and deep water, and coasts start with a proper wide beach before the land slowly rises. Mountains come in long ranges with foothills, bare rock on the steep parts, a treeline and snow on top, and deserts are one big desert instead of a sand patch in the middle of nowhere.

Getting the mountains right took way longer than I want to admit. First they went up like walls, then there were 40 block deep trenches running in perfectly straight lines for hundreds of blocks through the hills. Turned out the math that works out how far you are from the coast completely loses it deep inland, so now it looks out in eight directions for the actual coast instead of guessing. Old worlds keep their old terrain so nothing you built gets new ground under it.

Caves & Structures

Caves are actual caves now: huge caverns, long winding tunnels, ravines, water pooled at the bottom, and stalactites. They also don’t break out of the side of every hill anymore, which is where all those random gaps and chasms were coming from.

Old mineshafts run through them with lamps and plank bridges over the drops, and there’s pyramids out in the desert with a lit room inside. There’s also something hidden under the pyramids but I’m not telling you what.

Water & Animals

Water has actual waves now, flat at the beach, bigger out in deep water, and way bigger in a storm. Also fixed far away water reflections breaking into lines.

The animals were ghosts this whole time; you could walk straight through a turtle. Now they’re solid, punching one knocks it back and it runs off, and swimming into a school of fish scatters them. The fish were also translucent, fixed that. And the black squares that flashed on screen when it rained are gone (funny NaN issue).

Lighting & Performance

Caves are properly dark now unless something lights them, and lamp light hangs in the air a bit so lamps actually glow instead of just painting the wall. Lighting runs on its own thread now so it doesn’t eat into your frame, and sun shafts and lamp glow render at half resolution, which made them way cheaper and you can’t tell.

Also fixed a bunch of random bugs:

  • Game freezing for a few seconds when you broke a block somewhere new.
  • The world sometimes thinking it was still loading forever.
  • Memory getting corrupted when you closed the game.
  • The settings back button hiding off the bottom of the screen at 720p.
1
0
40
Open comments for this post

4h 41m logged

Hallo, audio and the settings menu are in like I said last time, plus a mountain of bugs I only found by actually sitting down and playing it

TLDR; The game has sound now, a real title screen, settings with quality presets, and I fixed a ton of stuff that only showed up during long play sessions

Audio: The world was dead silent so I added a bunch of CC0 sounds. Every block has its own break, place and footstep sound based on what it’s made of now instead of almost everything falling back to one generic clip. Jumping, landing (heavier sound if you fall from high up), getting in and out of water, all of that. Funniest part is the audio test was passing the whole time while the game made zero sound, it only checked that sounds were “playing”, not that anything came out of the speakers, so now it actually listens to the output. Also added ambience for every biome, birds, cicadas, frogs, desert wind, waves, gulls and cave drips. Some I generated myself from noise and some are real recordings.

Menus: Proper settings menu with tabs and Low/Medium/High/Ultra presets. The presets actually change how much work the shaders do instead of just flipping effects on and off. Render scale got a sharpening pass so running it below 1 doesn’t look like mush anymore, and a few settings were quietly resetting every time you launched which is fixed. Made a real title screen too, you can type a seed or load a saved world and it shows the actual world behind the menu, it even previews the terrain as you type a seed. First version of it had buttons that did literally nothing when you clicked them lol. Also added a screenshot key, crash dumps and an app icon.

Bugs (so many): The first block you broke after launching froze the game for like 10 seconds and every edit after that for another second or two. Sometimes the area you spawned in just never loaded and you had to fly to the nearest chunk. Flying fast made it look like the whole world was reloading. Ultra was loading a smaller world behind the loading screen and then doubling it the second you spawned, so the start was super laggy. Hard black blotches all over the terrain in the day turned out to be cloud shadows aliasing, and the checkered pattern on grassy slopes was ambient occlusion getting applied twice. Water had black spots at certain angles from the reflections freaking out, and weird streaks across lakes that turned out to be the ambient occlusion using the lake bed under the water instead of the surface. Caves were getting lit by the time of day which makes no sense, light fading off in visible rings is gone, and the leaf texture had no transparency so every tree was a solid blob this entire time. Did a lighting pass to make it look more like a shader pack, overdid it and everything was way too bright, so I dialed it back. Also killed contact shadows completely, they caused more problems than they fixed.

Next up is making the world more interesting, new biomes, animals and better weather

0
0
18
Open comments for this post

8h 3m 26s logged

Hallo pretty big changelog because I didn’t do anything for a bit oops

TLDR; Cleaned out old bugs, did a performance pass, built actual world simulation and did a full graphics overhaul

Bugs: Chunks were silently vanishing past a hardcoded cap that was way too low for default settings, no draw, no shadow, which turned out to be that “chunks glitch out while moving” bug. Fixed it plus streaky stars, a moon that looked like a tiny sun, and water growing phantom walls at chunk borders from an earlier fix. Teleporting somewhere far caused a 1004ms freeze. Profiled it instead of guessing and found the GPU arena was doing a full reset every time. Fixed properly and worst case is under 12ms now.

Performance: Frame time was 15.5ms. Turned out shadows were re-rendering every single frame for no reason, only redrawing a cascade when it actually needs to cut that down 89% and dropped the whole frame in half to about 2.3ms. Built a couple things expecting wins that turned out to be losses when actually measured (one was 28% slower), and almost built a whole defrag system for the arena before realizing it wasn’t fragmentation, it was just too small so I bumped it up and the problem vanished on its own.

Real world woahh: Flowing water, colored block light, ore veins that actually clump instead of speckling everywhere. Rewrote falling sand and gravel, the old version was doing 118k lookups a tick and never even stopped. Rebuilt caves properly using two noise fields overlapping instead of one, actual tunnels now instead of flat noodles. Also chunks exist at any height now, no ceiling at all. Building that surfaced 3 old bugs that had been broken this whole time.

Graphicss: Water got reflections, caustics, underwater god rays. Found an evil ass NaN bug doing the caustics where the seabed was rendering as solid black rectangles until I caught it. Rain and snow are generated entirely in the vertex shader, so 30k drops cost one draw call and zero buffer uploads. Volumetric clouds and cloud shadows now share the same noise field so they can’t disagree with each other. Also fake normal maps with zero authored art, the pixel art textures already have the detail baked into their own shading so I just reused that as the normal map, completely free. Built and killed an atmosphere LUT after measuring it three separate times, kept losing to the simple hand tuned sky. Also fixed emitters like lamps flickering their own glow depending on the angle you looked at them.

Next up is audio, a settings menu, and makign the game look better somehow

0
0
18
Open comments for this post

8h 7m 3s logged

voxel engine devlog #3

Shadows, post processing, save files, and actual trees. GPU arena overflow funny moments it was not pleasant to deal with + graphics overhaul (added water)

Forward HDR & Shadows: Built a full pipeline with 3 cascade shadow maps, half-res SSAO, and Jimenez bloom. Shadows were super vertex-bound at first (5.12ms), but tightening the cascade splits chopped that straight down to 3.5ms.
Saving to Disk (.vxr Region Files): Chunks now compress using varints (a cave chunk shrinks from 65 KB down to 5.7 KB). We now only save edited chunks as a diff against the noise seed while everything else regenerates on the fly. I tested it by blowing up a wall, flying a few thousand blocks away to evict it, flying back, and it reloaded intact from disk.
Trees without neighbor lookups: Solved tree canopy generation across chunk borders by making them deferred. Each chunk calculates what parts of nearby tree roots fall inside its bounding box, avoiding goofy crossthread neighbor lookups.
Water meshing: Added water as a second mesh layer. Opaque faces draw against air or water (so you see the seabed), while water faces only emit against air.
Performance upgrades: High render distances were causing massive frame stalls because the GPU arena buffer was running at 92% capacity and triggering full GPU resets. Bumped the arena from 8M to 16M quads (128 MB) and nuked a hidden O(N) chunk scan sooooo hopefully smooth sailing from now :clueless: .

What now?: Full pipeline runs at ~4.5ms (~0.9ms with shaders off). Up next: smoothing out face lighting with per-corner ambient occlusion (AO) baked into the greedy mesh and looking into SSR for water.

0
0
4
Open comments for this post

5h 44m 25s logged

voxel engine devlog #2

Threading turned into rendering turned into lighting turned into an actual world with caves in it, all in one sitting. This was NOT the plan but here we are lol.

Threading: got gen + meshing off the main thread onto a real worker pool. Workers are just pure functions, voxels in results out through queues, so the only actual cross-thread headache was stopping a chunk from getting unloaded while another job was still reading it (fixed with a refcount). World output came out byte-identical to before which is exactly what I wanted, just moved where the work happens not what it produces. Worst case frame during a full re-stream is under 1ms now.

One draw call: this was the fun one. Went from 349 draw calls (one per chunk, kind of wacko ngl) down to 1. GPU buffer stays persistently mapped, culling got moved into a compute shader, and the indirect draw pulls its own visible count straight off the GPU so it never even touches the CPU. Same exact pixels as before, just the CPU isn’t sitting there doing a bunch of pointless work anymore.

Cave culling: engine now figures out which chunks you could actually see air through and just doesn’t draw the rest. Above ground that’s about 40% fewer chunks. My sealed test room underground was cutting 98%+ but that number came back down once real caves existed instead of one clean sealed box, which makes sense since it’s following actual connectivity now instead of a best case demo.

Lighting: sky + block light through BFS, baked straight into the mesh so there’s no separate lighting pass at render time. Threw in a glow block to test with. Removing a light source zeroes it out exactly and adding it back restores it exactly, verified both instead of assuming it just works.

Terrain + you can hit stuff now: swapped the flat test world for actual noise based terrain, caves carved with 3D noise instead of flat tunnels. Added raycasting so you can break/place blocks. Player movement runs on a fixed timestep so framerate literally cannot change how fast you move.

Next up: lighting is flat per face right now, want that smoothed per corner eventually. also got one frame time spike during heavy cave streaming I need to go check out before it turns into an actual problem once flying through caves is a thing.

0
0
2
Open comments for this post

9h 29m 17s logged

voxel engine first devlog yayyyyyy!!!!!!

Deadahh just wanted to put everything from the last few days into one initial devlog so I don’t have to keep yap too much.

Started with basic OpenGL 4.6 and GLFW, instead of using string lookups for shaders which is clown behavior, everything uses explicit locations. I also set up a headless smoke test so the CI can render offscreen, check its own pixels, and pass without popping up a window and being too goofy.

For debugging, I threw in an ImGui menu to track frames, draw calls, and memory without making the heap allocator crash out. Steady-state heap allocations are at zero right now + also flipped the depth buffer to reversed-D because standard depth buffers kaboom at long distances and make the textures Z-fight.

The Mesher thingy

The first mesher I built was literally just a mesher. A regular mesher. There was nothing special about it. It just emitted 6 expanded vertices per face which took up way too much space (615 KB a chunk) and was slow.

I improved it and made a binary greedy mesher that packs an entire quad into a single 64-bit integer. It uses 64-bit bitwise column ops to merge faces instantly. 2.7x fewer triangles and 33x less memory. It’s so fast it takes like 0.05ms and I also ripped out VBOs completely for SSBO vertex pulling, meaning the GPU just reconstructs the geometry on the fly.

There was one issue where the greedy mesher left microscopic sub-pixel holes everywhere so I kept seeing pinhole cracks, so I just bloated every quad by 0.001 so they overlap and cover it up (surely this works well enough).

Chunks & Compressing

Having raw voxel arrays was eating my RAM alive, so I used palette compression. If a chunk is entirely air or entirely stone, it just stores one ID now. If it’s mixed, it bit-packs the indices, this dropped voxel memory by 20x. We’re streaming a 21x21x4 chunk radius (like 2,100 chunks) and it only takes 6.6 MB.

Added a chunk streaming manager so it loads in a ring around you. I had to put strict budgets on generation and meshing per frame, otherwise the game just freezes when you move too fast + CPU frustum culling means we only actually draw the chunks you’re looking at.

What’s Next?

Right now the engine is in the state of being too good and being too bad at the same time. It’s doing like 349 individual draw calls per frame (one for every visible chunk). It works, but it’s got some quirks that I need to kaboom first.

Next up is building a persistent arena buffer and GPU-driven culling so we can collapse the entire world into ONE single draw call using indirect drawing.

0
0
3

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…