u/Master_Molasses1783

▲ 183 r/CheapYellowDisplay+1 crossposts

Ported my ecosystem simulation to the CYD as a 3D Interactive Wireframe A-Life. Works flawlessly even with PSRAM disabled!

Hi everyone,

I wanted to share my latest desktop gadget project running natively on the Cheap Yellow Display.

I brought over the core game logic from my previous project and completely transformed it into a 3D wireframe world. It runs an autonomous, real-time ecological food chain (plants, herbivores, predators) with interactive touch controls.

The best part is that it is highly optimized and runs completely fine with PSRAM disabled.

If you have a CYD board, you can flash it via your browser with the Web Installer:

Feedback and suggestions are welcome!

u/Master_Molasses1783 — 13 days ago
▲ 99 r/CheapYellowDisplay+1 crossposts

Turned my Cheap Yellow Display into a 3D raycasting desk clock

GitHub:
https://github.com/ootake0914-dotcom/cyd-3d-maze

I made a retro 3D desk clock running on ESP32 CYD.

It displays the time with a raycasting-style dungeon view on the ST7789 TFT display.

Hardware:

  • ESP32-2432S028R (CYD)
  • ST7789 240x320 TFT
  • XPT2046 touch controller

Built with Arduino IDE and LovyanGFX.

>EDIT: I've uploaded the web flash utility! You can now easily install the firmware directly from your browser (Chrome/Edge recommended) here:
https://ootake0914-dotcom.github.io/cyd-3d-maze/

u/Master_Molasses1783 — 19 days ago
▲ 167 r/esp32

I pushed the ESP32 to its limits to build an autonomous 60FPS Ecosystem Simulator (Food Chain, Evolution, and Q_rsqrt optimization!)

Hey everyone! I wanted to share a digital terrarium project I've been working on. I tried to see how much artificial life logic I could cram into an ESP32 while maintaining a high framerate on a 1.9" TFT.

Here is what is running simultaneously:

7-Layer Food Chain: Plants -> Herbivores -> Carnivores -> Apex Predators -> Garbage -> Decomposers -> Spores (Virus).

Evolution & Natural Selection: Animals pass down their "Speed" traits to their offspring with slight mutations. But there's a trade-off: faster animals burn energy quicker and starve faster. Over time, the ecosystem naturally balances itself.

Grappling Mechanics: Predators don't instantly kill prey. They lock on, slow down, and slowly drain the prey's health (energy) while blood particles scatter, giving prey a chance to escape if the predator gets distracted.

The Technical Challenge (Optimization):

Calculating distances (sqrt) for flocking and hunting for over 100 entities was absolutely killing the ESP32's Core 0.

To fix this, I implemented the legendary Quake III "Fast Inverse Square Root" (Q_rsqrt) algorithm. This eliminated the heavy float division and sqrt operations, allowing the simulation to run butter-smooth! (Logic runs on Core 0, TFT rendering on Core 1).

I've uploaded the C++ (Arduino) code and a Python simulator version to GitHub if anyone wants to run it on their own board or PC!

GitHub: https://github.com/ootake0914-dotcom/esp32-ecosystem-sim

Let me know what you think or if you have any ideas for new traits to evolve!

u/Master_Molasses1783 — 1 month ago