A
Arduino2mo 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
7 Replies
tdaca
tdacaOP2mo ago
Here is the arduino code...
tdaca
tdacaOP2mo ago
And the python one
tdaca
tdacaOP2mo 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.)
Demon Lord of the Round Table
pretty cool,have you considered using an sd card or something so the nano can make chunks.and store them,then make another chunk with the memory it has
tdaca
tdacaOP2mo ago
would be too slow for my liking
Alby
Alby4w ago
What arduino nano are you using?
Killed_By_Hydra
Yeah something like Minecraft would be incredibly difficult to make run on small hardware like a nano It has been done to some extent tho But being able to do that is a huge feat

Did you find this page helpful?