A
Arduino2d ago
tdaca

Arduino Nano Minecraft-Esque World Generation System

Gee, what a mouthful. I am making some arduino code that generates a blocky world similar to minecraft's, then sends the world data through serial into a PC. The PC, using a python script, renders the world. Very unoptimized, though. The world itself is made of 121 chunks, each measuing 4x6x4 blocks, leading to a total of 11,616 blocks. This is the absolute maximum I could manage with the limited SRAM of the Arduino Nano. (in theory, the Arduino Mega 2560 could make a map 4 times bigger, or handle extremely simple mobs :P) (There are also 256 types of blocks) I took a lot of inspiration from PortalRunner, who ran a (very) limited minecraft server in an ESP32. Obviously, he could do that because the ESP32-C3 he used had 400kB SRAM, over 200x more than my puny little Nano. TODO: - Load the correct block type depending on the y-level (and random chance) - Get an arduino mega
No description
No description
3 Replies
tdaca
tdacaOP2d ago
Here is the arduino code...
tdaca
tdacaOP2d ago
And the python one
tdaca
tdacaOP2d ago
just load the arduino one and when you run the python one it will start rendering the world. (From the code, you can tell I tried to add caves and stuff, but the map is simply too small.) (ps. not sure how to upload core to github, will look into that.)

Did you find this page helpful?