Video není dostupné.
Omlouváme se.
I Made a Voxel Engine
Vložit
- čas přidán 16. 08. 2024
- ➤Checkout GameMaker 👉 opr.as/GM-Zyger
In today's video I'm taking on the exciting challenge of creating a Voxel Engine! Inspired by Minecraft, I'll be covering 3D voxel creation, rendering, shaders, chunks, procedural generation, block types, and much more, all with a focus on OpenGL. Whether you're a fellow developer or a curious gamer, this video offers a deep dive into the world of voxel engines. Join me in this adventure by liking, subscribing, and hitting the notification bell. Let's explore the magic of voxel worlds together!
➤Previous Video: • I Made a Graphics Engi...
➤My Links:
Discord: / discord
Instagram: / gabzxd
Twitch: / officialzyger
Twitter: / zygerdesigns
Patreon: / zyger
The music featured in this video is sourced from Epidemic Sounds under my licensed agreement.
➤Resources Used
This is not all of them, as i accessed so many websites throughout development. Therefore, these are the most important ones that I used.
GLFW: www.glfw.org/
GLAD: glad.dav1d.de/
FastNoiseLite: github.com/Aub...
ImGui: github.com/oco...
libxls: github.com/lib...
Other resources I used:
sites.google.c...
/ voxel_chunk_management...
learnopengl.com/
ogldev.org/
➤Similar Videos:
Making a Voxel Engine from SCRATCH (w/ Destruction) : • Making a Voxel Engine ...
I made a Voxel Engine with Rust (NO GAME ENGINE): • I made a Voxel Engine ...
Create MINECRAFT in Unity - Introduction:
• Create MINECRAFT in Un...
ChatGPT makes Voxel Engine with Rust:
• ChatGPT makes Voxel En...
Making my Voxel Engine Really Fast:
• Making my Voxel Engine...
➤Ignore:
I've made my very own voxel graphics engine, aiming to incorporate an array of compelling features. The journey began with rendering 3D voxels on the screen. Initially, I considered using an object loader, but efficiency concerns led me to opt for the traditional method of employing vertices and indices to render shapes. As the project progressed, I expanded my horizons by rendering multiple voxels and harnessing the power of chunks to tackle lag. To enhance performance, I integrated memory-saving techniques. User-friendliness was achieved through the implementation of a user interface, eliminating hard-coded elements and enhancing the engine's accessibility.
The next chapter in this endeavor involved leveraging noise maps, including Perlin and cellular maps, for world generation. Procedural generation and chunk storage followed suit, transforming the world into an infinite expanse. To complete this journey, I introduced features like structure placement, block addition and removal. The finishing touches included dynamic lighting and a captivating sky.
➤Time Stamps
0:00 - Intro
0:25 - API
1:23 - Rendering a Voxel
2:30 - Creating UI
2:50 - GameMaker
4:09 - Chunks
5:41 - Noise Maps
6:53 - Block Types
7:42 - Procedural Generation
9:10 - Structures and Block Placement
10:05 - The End
#gamedev #zyger #gameengine
Dont forget to checkout GameMaker 👉 opr.as/GM-Zyger
what framework are you using? .NET?
oh wow, i skipped the intro. I'm a fool lol
I feel like you are slowly morphing into jdh
maybe I am jdh 🤐
@@ZygerGFX new conspiracy theory unlocked lol
@@ZygerGFX Impossible unless you use the good ol C👌 and write 186127625627252622lines of code in 2 months
“Whats up guys, today im going to be distracting myself from the meaninglesness and eternal void of life by taking on another graphics programming challenge”
Describes both JDH and Zyger perfectly
Isn't everyone?
It feels nice to see a person that is able to do these kind of things and it motivates me to try new things and don't give up. I personally subscribed to your channel, hope that you will continue to inspire me
Good job fixing your explanation of vertices and indices! I noticed you called them edges last time but have learned since then. Visible progress
As a vulkan user I can relate a 100%
ESPECIALLY to the part where after the build it took you one line to create a window
It is extremely relatable, and I'd never spend hours prepping every single variable, allocating memory for them, cleaning them up, and checking how these values interract to make sure that none of them corrupted.
As I mentioned I'd never do that because that'd be idiotic, so once again 100% can relate to creating a window right after the first build
And also liked and subbed because great video
Chad Vulkan!
Doesn't the language you are using has templates?
I've heard Vulkan is horrible. That's from people who are much smarter than me, so I'm happy to believe them.
@@halfbakedproductions7887 If someone used the word "terrible" to describe Vulkan, then there are definitely NOT smarter than you.
Vulkan is meant to be a lower level API hence, it needs more work (and from what I heard, much, much more) but it was made purely to be able to give that control and allow optimizations. So from a point of view, I guess that you can call Vulkan "terrible" in a sense that it's very more complicated and harder to learn and use than OpenGL. But this isn't the best description you could give about it, as for most people, the term "terrible" makes us think of something bad and not something hard or complicated.
Did these "smart" people provided any reasons to call it terrible other than the ones mentioned? As I don't have personal experience with it, I may not know some things. But from what I see online, Vulkan is supposed to allow you to have more optimizations and have your 3D apps run faster, and lots of Software seem to move to it.
Vulkan is for people who are too scared to go full openCL, but too pretentious for the OpenGL @@halfbakedproductions7887
You really like this cat sound, don't you?
I thought they were seagulls, but yeah, way too many
@@PixelThornbruh they werent seagulls ?
Loved the video, just want to say "acksually", the dark parts of a perlin noise map are 0, not 1. Just cause the perlin noise at a point is actually just a single value and the image is generated by setting RGB components to be that single value and all 0s is black and all 1s is white.
Looking forward to a part 2, I saw someone in the comments mention occlusion culling but I also wanted to mention frustrum culling, using both in conjunction really cuts down on what even gets considered being sent to the GPU
I’m making a game engine in OpenGL and I started at the start of the year and you were the first person I looked to (I was making it in DirectX when I started)
also you should make an attempt to make a graphics engine in vulkan (I'm praying for your sanity)
I think if someone wants to use 3D Graphics, Vulkan makes sense as OpenGL is abandoned (from what I heard).
@@godnyx117 I was kind of new to graphics programming when I started making the engine so I chose a simpler graphics library. I might switch to Vulkan in the second iteration of the game engine.
@@FREAKBAlT Yeah, I understand. My comment was a bit more general as to 3D graphics. I understand that you personally wanted to use OpenGL as your first API. Good luck my friend!
@@godnyx117OpenGL is not abandoned. It is supported by every platform except Apple's (because of course), and is still getting new updates.
C&C Tiberian Sun used voxels and it looked pretty futuristic for 1999. It was a radically different look to other C&C games, definitely enhancing the dark and foreboding mood of the game that they were going for. I wish voxels were used more often because it does look cool.
I was also thinking occlusion culling to save on rendering cycles for things not visible to the player, but you basically covered that off.
Great Video but Indices are no instructions. They each act as a index for the Vertex buffer and the order of the indicies define in which way each triangle is drawn
you made your all thing in c++ while i'm still struggling to make my own game engine that will use a batch renderer with texture atlas and shits. also i do it in zig ;> wich is kinda cool. anyways if you didn't know, because i didn't a week ago, but raycast are just a collision check between a line and a polygon. so good luck :)
This voxel engine is way less complex than an actual game engine. It's designed to do one thing and one thing only.
I would say minecraft isn't really a voxel game since the faces of the blocks are rasterized like quads.
Now after the "akshually" moment,
it's really impressive you condensed all the info into a 10min video, nicely done!
How are voxels supposed to be drawn? You can't just feed a 3d volume texture into a GPU and tell it to draw it as cube like voxels.
Voxels are a storage method, not a drawing method. You can draw them in several ways, polygons being one of them.
In the 16bit and DOS era voxel landscapes were drawn using 2d rectangles, similar to billboards. There is no rule for rendering them.
editing was top notch in this video! nice work!
I am loving this series of low level projects
i counted 13 meows
You should implement greedy meshes and mipmap stuff
Your lucky you don't have to trade your arm and internal organs to use the API
Great work! 😉
What's up next? Perlin worms for cave generation or maybe marching cubes for sloped terrain?
the marching cubes one defeats the entire point of the project lol
well with marching cubes it will no longer be voxels
@@m4rt_ That's not exactly true, it just won't look cubic any more. Technically, heightmaps are voxel terrains, just rendered differently. True voxels are simply points in 3D space, meaning technically even a point cloud is a voxel system. Plus, if you look at the early work of procworld.blogspot.com/ you will see that voxels don't even have to be uniform in shape
@@zmeczonyprogramistait's meant to be a VOXEL engine, if you add marching cubes, there won't be any voxels anymore
If u don't mind, I have some advice for u: instead of allocating memory for each Chunk, u can use directly the emplace_back on the vector or placement new. If you know the render distance R, u need (2R+1)² chunks in total. Now u can use the chunk out of range for the new one getting in vision. With modulo arithmetic this is easy possible (chunk.x % (2R+1)) would be the x index of a chunk at chunk.x in the chunk grid. After the same operation for y (or z), u can linearize the index into the vector and get a unique position in ram, that does not change. Also it is possible to change render distance, but the chunks have to be regenerated.
If u want to index a specific chunk position, this is also easily possible, since it's just the linearization. Continuous memory is extremely efficient when u have to traverse it regularly...
6:16 Actually use a seed to generate the noise map and when the world generates as you explore it just finds out based on the seed
enum with string as its base type looks cursed
I later ended up changing it to a char. But yes I agree 😂
You've been doing quite a lot with OpenGL lately... If it isn't too much to ask for, would you give Vulkan a try and document your process? I know it's daunting and a decent amount of code (because I'm writing one myself), but pretty please?
May im mistaking but a seed as it exists in minecraft would be a way to prevent a overflow of the dictonary since the chunck is calculatable and has no longer to be stored.
Will you move your story fps into unreal
this bird sound is going to make me rip my eyeballs out
Can you make it smooth / photo realistic?
Great video, just wondering why you placed your self-written voxel engine in a folder called Unity/UnityProjects :D Too hard to change the Git-folder? I get it.. Also, all great people place their projects in the F-drive!! Oh yeah, you deserved a like, I'm already subbed, sorry :(
Yeah I placed my git folder in the unity projects folder ages ago when working on a unity game. And I uavent been bothered to change it. Though this comment is a good reminder to do it 😂 also thanks
Brilliant! Can't wait for part 2
I think you should develop this engine and create a game based on it. Nice vid!
OpenGL is not an API, it's a library
also 6:03 you got it backwards
But it is an API. It is also a graphics library. And yes I now realised that it's backwards 😅
Eyyy new video! And its amazing, worth to wait n keep up the good work man! :3
Which one did you enjoyed the most to work with ? OpenGL or Direct3D ?
I couldn’t even figure out how to initialise directx. I’m all for GL
open source your projects. so we can see and try to play around oy maybe improve too
How much C++ do you need to learn to write a simple engine? I got some experience with C#. trying to learn c++ right now but I don't know how much to learn before I should start
do a voxel api it's a funny task and if you di it coretly it going to be faster then triangles because instead have 8 tiangles per cube = 32bits. voxel can have a x,y,z and one bit of size its 16bits per voxel 2 times less!
it's a common misconception that it's a bunch of cubes. it's really difficult to find a REAL voxel game :(
(like old outcast, or blood 1 did for some assets, that had the actual voxel engine)
I love your videos! I hope you make a part 2 :)
It's a good video. I wanted to make a game since I was young, but as I got older and started working, I didn't have time to do it, so I looked up a lot of videos like this and it's fun. I want to make my own game someday. Thank you for the good video.
you make it seem like its easy as hell but when i try it takes weeks lol
Welcome to gamedev. I too write mountains of buggy garbage, only to find a tutorial where someone does it in like 10 lines of code and it works better.
So annoying. Study and practice is the way forward, much like anything else.
Awesome 🎉
thank you :))
Welcome to the voxel development hell :D
7:03 is not valid C++. An enum can't have "std::string" as an underlying type. Only integral types can be used (eg int, char, long etc).
You have a great humor. Keep up and have fun!
If you want to get caves working, you should look into Perlin Worms, not sure if you added them in the stuff not shown or not but figured I'd mention it.
Why is the background music missing
It's not, it may he too quiet though. My bad in that case
Have you ever tried Raylib?
Great video!
Love it , hopefully you do well n this project
I want to do something not-so-simillar to a minecraft clone but I can't get the window. I was using SDL because I want to make it Windows-Linux compatible. I already made all the stuff the guides and the StackOverflow answers that had the same problem and still nothing.
"Developers" in 2023 essentially Frankenstein things together js.
Awesome as Always!
why one batch per chunk instead of one batch for all of the mesh? also are you going to add greedy meshing?
game dev vlogger publish sponsor a game engine:
proceed to make her own game engine*
really inspiring
great work!
underrated youtuber
But it's not voxel engine. Voxel is 3d equivalent for pixel. It's not cube, which made from polygons. Minecraft is just cubic art style game, but it dont use anything like voxel rendering
Vulkan next?
estou navegando por todo tipo de experiencia e tutorial sobre criar esse tipo de sistema procedural de voxels, recentemente vi um video muito bom, talvez vode poderia adicionar ambient occlusion no shading, da um aspecto bom. ótimo video
How long of C++ study is needed to learn to make this?
What's with the cat sound?
i love yuor videos please dont stop x
You should make a smooth voxel engine
This was a good video, but I’m afraid I’m gonna need part 2 ASAP. Lol
Yayyyy i love voxel engines.
If i got a dollar for every time i saw a cat meme or heard "Meow". Id be pretty rich 😂.
Jokes aside ive been wanting to make a render engine or a PS1-2 style graphics engine to make my games but never knew where to start.
I have been working on a voxel engine in the browser for some time, mine isn't this fast tho
Great video, BUT PLEASE DONT USE THE SAME SOUND EFFECT 1K TIMES IN THE VID!!!
no offense 👌
looks cool
thanks
i want a part 2!!!!!
How about making it in the Lobtser language? 🤔
Remove annoying transition sound pls
yoyoyo, whats the deal?
I am the 3 people on earth who use scratch and this is very impressive and inspiring!!
What do you mean by… scratch
@@FREAKBAlTthe block thingy
are u planing on releasing the source code?
Never heard of you. Watched this video. I got a thing for voxels n shit. I like what I'm hearing. Watch some more. Dank memes, blender memes. Exactly what I'm looking for. 👍
Let's hope she knows about std::async
Do people play many Voxel based games?
the only ones I've really played is ofcourse Minecraft and the Teardown
@@ZygerGFX So the dev is just for fun?
I feel like you really need to be a genius to do all of this that easily
wow good video
Voxelitious
that sound effect is driving me mad
Out of interest, why do you use glad as a pose to glew?
celluwar
Very cool video, but wow that cat noise (or whatever it is) got repetitive and was kinda annoying
make a graphics card driver.
I am jealous.
why is your project in the unity projects folder are you hiding smth from us
bad file management that's all. I made a project there once by mistake and linked it with git and ever since i haven't bothered moving it :))
@@ZygerGFX same bruh😭🙏
Minecraft isn’t actually a voxel game it’s still uses the other technique of rendering everything out of triangles and so simulates voxels because it’s better Performents wise
That’s still voxel
no its simulating voxels voxels are a completly difrent rendering method@@ragdude7323
Voxels = storage method (3d pixels)
Polygons = drawing method
They are not the same things, both can be used.
Everything will be rendered with triangles in the end, as that's just how the GPU works...
i know thats what i was talking about@@Stroopwafe1
when realysing this game engine for $30/m?
Amos seus videos ❤🇧🇷
Try rist please
bruh. Your github please :v
Edit: Nice video btw
👍
LIAARRRRR...U used directX in ur last video
Wrong. I used opengl: czcams.com/video/XfKFZ46mDXI/video.html
That's my last video 😅
WRONG a voxel engine is suffering cubed
make a a new part
I think your editing is great, but I really an not stand the sound effects. I don't mean to be rude, but the cat sound effect every ~30 seconds, and the stone grinding constantly are overused.
Besides that it's a great video
Free Plestine ❤❤❤❤❤❤
Way too many seagull sounds