I Remade Minecraft But Optimized!

preview_player
Показать описание
In this video, I will talk about the optimizations that I did for my C++ Minecraft Clone!

#cpp #gamedev #minecraft #opengl

Join my Discord:

Try my Steam Game Midnight Arrow:

Join this channel if you want to support me 😻:

Repo:

Minecraft Clone Playlist 🟩:

Full Game Guide in C++ 😎🕹️!

Z pre-pass:

Music: Evan King - Everything is Okay

Minecraft soundtrack: C418 - Aria Math
Minecraft soundtrack: C418 - Subwoofer Lullaby
Minecraft soundtrack: C418 - Minecraft
Рекомендации по теме
Комментарии
Автор

you should greedy mesh air, or you cant?

linksword
Автор

You could hugely increase performance by using meshlets instead of the standard rendering pipeline, Other things you could do is 1. Greedy meshing 2. In the standard pipeline gpus always check a 2x2 grid during rasterization so If you have lots of small triangles (less then 2x2 pixels it will hit performance quite hard, mentioned in UE nanite talk/website), 3. Don't really understand if you talked about this or something else but you can only ever see 3 faces of a block so you don't even have to bother with checking the rest 4. mipmaping will make the game look better 5 Some kind of occlusion. You may also be limited by something stupid like texture streaming recommend you use renderdoc quite easy to use yet absolutely amnazing it helped me so many times I can't even count. Greate video, really enjoyable to watch

bartekburmistrz
Автор

yo, i had this idea a while ago, i glad someone actually did it because im way to lazy

know_how_games
Автор

Seriously though, this is sick! I genuinely hope your channel grows because this is a top tier resource.

toksic
Автор

This is awesome! I've been thinking about hyper-optimized Minecraft clones lately. I wish I was skilled enough to make one. I have ideas, but ideas alone aren't worth much.

Just finished watching the video. Thanks for making it!

MortonMcCastle
Автор

Very nice video, thank you for making it.

A few things:


Did you consider adding ambient occlusion at all? Seems like a minor performance hit that makes the lighting look very good.

Did you see Vercidiums video on using 6 different meshes for each face for a chunk, so you can do face culling on the CPU side and might mean you can save memory bandwidth on face data.

distantrepublic
Автор

Would be cool if it talked the minecraft protocol, so you could join vanilla servers

alvesvaren
Автор

Have you seen Vercidium video on optimizations ? There are some steps that I find quite interesting

leflo_
Автор

If it gets modding api it might become a really cool game.

kidnamedfinger.productions
Автор

I mean you remade it and *tried* to optimize it.
Why the heck did you not START with frustrum culling?
You can't have AO or smooth lighting the way you started.
Any plans to have occlusion culling?
Shadow culling?
Colored lighting?
The chunk visualizer is pretty nice.

Houstonruss
Автор

Use mesh shaders like the minecraft nvidium mod does to make the game only compatible with like 20% of the GPUs out there but run really good lol.

gandev
Автор

To learn something new you could also try ray tracing voxels in compute shader instead, it has way bigger potential and overall way more natural for voxels, once you implement caching of traversal and low-res pass to exploit ray&frame coherence(can do it at CPU too) it's basically instant.. gotta use mip-maps for grid though. Also lower overheads for textures, not necessary to use uv unwrapping.
P.S sure triangle rasterization still fine for voxels but it's boring and has overheads/annoying

stiliok
Автор

About Z-Pre Pass optimisation, I read somewhere that you can get more performance with it, if you for example send less vertices to render it.
For example if you rendering normally, you still need to send vertices multiple times, even if they are adjacent, because if you don't texture coodrinates will be messed up, but if you send same vertex for adjacent blocks, or even better, make a simple greedy mesh geometry (one quad for many block faces) I think it can definitelly increace performance.
But I haven't tested that yet (I'm also playing with making optimized Minecraft-like renderer)

RawFishDChannel
Автор

The real reason why minecraft is slow is not the graphics. I can't say for sure, but imo the biggest problems are: pathfinding for a large number of mobs, simulation of all processes (except particles, probably) on the CPU side and the fact that the game does not use any of parallelism with many layers case (and i'm not sure is it even possible)

cyanmargh
Автор

Seeing chunk buffer data stored in list + map combo made my eye twitch. Unless i misunderstood something in that code snippet, you gonna choke your memory on linear reads of lists and additions to map - making whole idea of huge buffer obsolete, I know that its very convenient and clean, but good ol' malloc/realloc would perform much better on simple data. Dont wanna nitpick, this might be just a macro optimization in the end, chunk view culling + sorting is deffinetly much more costly part of code anyway. Good luck with optimizations and bug hunting :D

lupuskt
Автор

you should look into working on Cosmic Reach, another very promising minecraft-like game, that already has a small community around it.

panagiotisapostolidis
Автор

Unified geometry, still 30 FPS? Its strange, how do you upload that gpuBuffer partially?

IvanPopelyshev
Автор

wait until he finds out that the distant horizons mod uses 3d skyboxes instead of loading the chunks

Snikker
Автор

Have you seen FinalForEach's minecraft clone?

axorusmt
Автор

How would you do water for a smooth minecraft-like, on a voxel planet?

GES