Sep '24 (edited) • JOURNEY
Devlog#2
Hi. Just wanted to share a quick update on my project.
I finally got my chunk system up and running. It took way longer than expected (some irl stuff got in the way), but it’s finally done. There are still a few minor tweaks left (like: crossing the world origin (0, 0) makes chunks load weird, integrating with older systems, and optimizing chunk-based rendering) but nothing too complicated.
The world is generated based on a png image, which itself is generated procedurally with perlin magic and stuff. World is 512x512 chunks and the image is 512x512 pixels so each pixel is mapped to a chunk and the chunk is generated based on the pixel value. I hope all of this still counts as the game world being procedurally generated.
I did some calculations and realized my game world is a bit bigger than I initially thought:
Chunk count: 512 * 512 chunks = 262 144 chunks
Chunk size: 512 * 512 pixels
Total pixels in world: chunk size * chunk count = 68 719 476 736 pixels
So, its probably best not to load everything into memory at once.
Here is a video, and please ignore the overlapping entities, repetitive ground textures, NO easings for biome changes, and all that other junk:
Also the ”smiley face” in the video isn't just a bunch of ground textures. The different squares are the chunks themselves and they all have their own entities, rules for generating entities and other useful stuff.
Edit: forgot to show loading and unloading the chunks in the video. I will post a bigger update later with that
7
0 comments
Jani Pe
3
Devlog#2
powered by
Ooga Booga Game Devs
skool.com/game-dev-grinders-8513
A group for game devs who want to ship great games from scratch in C, while mastering the ancient art of Caveman Programming
Build your own community
Bring people together around your passion and get paid.
Powered by