daw's Voxel Engine banner

daw's Voxel Engine

12 devlogs
15h 19m 3s

Updated Project: decided to come back to a project i thought i was done with, so i could show it off to you guys!
this is a minecraft clone made in OpenGL with C++. no game engine, just tears.

the project already has everything basic like text…

Updated Project: decided to come back to a project i thought i was done with, so i could show it off to you guys!
this is a minecraft clone made in OpenGL with C++. no game engine, just tears.

the project already has everything basic like textures, worldgen, chunk persistence and other stuff.
IMPORTANT: the demo link is a slightly outdated version, missing debug features. to get the full experience, download the binary from the repo page!

Demo Repository

Loading README...

daw

Shipped this project!

Hours: 15.28
Cookies: 🍪 427
Multiplier: 27.94 cookies/hr

first ship! i believe i’ve reached a pretty playable state for now (not that this is really meant to be a game..). i hope you enjoy messing around with it as much as i had fun making it! this is not the last ship, so expect updates!

daw

a devlog

Changelog


as mentioned in this here changelog, i’ve added quite a bit since i last posted!
this update brings procedural animations for placing blocks, breaking blocks, and using pickaxes!
i’ve also implemented some sound effects (finally) using miniaudio library.

0
daw

proper project demo is live

i took a little bit of time to make sure you don’t even have to download my engine to try it!
it runs through emscripten on a github page.
there are some limitations, like worse performance due to me having to use single-threaded rendering because BROWSER, no debug menu and some other quirks.
however, it works! check it out by clicking the demo button.

Attachment
0
daw

devlog i lost count, who cares i’m optimizationmaxxing

i love optimization. so much that i’ve achieved a 99.98% save file reduction!

turns out my old region and chunk management was horrible, and after roughly 5 minutes of just flying around with a fast move speed, the entire save managed to go up to around 700 MEGABYTES. and that was with no changes made to the blocks.
however, i stumbled upon this reddit post, which exposed me to some excellent compression techniques.
this lead to the NINETY-NINE POINT NINETY-EIGHT PERCENT reduction in save file size.
as mentioned above, the 5 minute exploration save used to be 700 megabytes, and now i’ve done testing and the same exploration results in a 164 kilobyte save file size in total.

Attachment
Attachment
1

Comments

NOT_A_ROBOT
NOT_A_ROBOT about 1 month ago

Hell yeah
We killing [Wirth’s Law](https://en.wikipedia.org/wiki/Wirth's Law) with this one!!!

daw

devlog nine

big changes!
this time i added frustum culling and added a cap to simultaneous jobs running to improve performance, new block icons that are generated on the fly, transitioned to a completely new texture stytem, and added biomes, among other things!
check out the screenshots!

Attachment
Attachment
Attachment
0
daw

devlog ocho

lots of changes in this one…
for starters, the tool/item model generator!
it takes a 2d sprite, and turns every opaque pixel into colored vertices that make up the 3d model you see in my hand.
i’ve also made a creative item menu, which lets you grab every item in the game easily.
some smaller features include flying in creative, random world seeds, and github workflows!

see you in the next one

0
daw

devlog 7

this one might be pretty boring (it was for me).
i just took an hour to do some refactoring, as keeping all files in one src/ directory was getting very cumbersome and slowed me down a lot.
just had to fix cmakelists, move some files and fix include directories!

Attachment
0
daw

devlog 6

item model generators are cool, and that system is how minecraft handles things. so, i had a look at the recently deobfuscated minecraft code, and figure out how they generate block models you see in your hand.
this lead me to recreating the system from scratch, and after some fiddling around, it’s ready!
commit here

0
daw

devlog fem

2 hours was all i needed to spin up a nice looking ui (to some extent…). i decided to just make everything in imgui, as i already know that and i’m too lazy to learn a ui library/framework.

pause menu, main menu, inventory ui

these were added in this update, you can check out the changelog here:

Changelog

0
daw

devlog cuatro

today was a very brief one, just added gradual block breaking in survival mode, and the visuals for it

also tweaked lighting for particles

0
daw

devlog trzy

i felt a bit adventurous today, and added gamemodes!!! the classic survival and creative are now here (sort of).

gamemodes

  • add survival system with health and hunger mechanics
    i created an anum called “Gamemodes”, which stores the current 2 modes (survival, creative). based on which of these is active on the player, it will (or won’t) show some imgui hud with your hp and hunger. yes you can die now! fall damage is a real thing, so be aware of where you jump.

command update

general

as it stands, the survival mode is just creative with health and hunger. i will however make improvements soon, so expect frequent updates!

do widzenia!

1

Comments

nmsoukmandjiev007
nmsoukmandjiev007 about 1 month ago

deltarune mentioned >:)

daw

devlog 2

today i did some light refactoring to make my life easier, as well as trying to add ambient occlusion (and failing miserably), and implemented some chat commands! (in an imgui window)

ambient occlusion

i tried, i failed. greedy meshing is my biggest enemy!!!

chat commands

  • /time set, the classic you know from minecraft. values are <0..1> or text values.
  • /seed, prints the world seed.
  • /gamemode, a placeholder command for future gamemode functionality
  • /noclip, toggles noclip

see you next time

1

Comments

tathya is aweomse
tathya is aweomse about 2 months ago

genuinely I thought u were making a minecraft plugin when I clicked on the video because of how indistinguishable it is from mc! great job!!

daw

its been so long…

i worked on this project around 2 months ago, and i got the sudden urge to revisit it. it’s a good way to clock some hours ;)


in this one, i added some particles! some eye candy is always appreciated.


the particle system uses gpu instancing. a single quad mesh is uploaded once, then each frame an array of particle data (position, size, color, texture index) is sent to the gpu and drawn in one call for all particles. each particle is a billboarded quad that always faces the camera by constructing vertex positions using the camera. particles spawn with random velocities when blocks break,

these need some adjustment still, but it works for now.

see you in the next one!

0