Air Quality Monitor Plays Game Of Life

The problem with air quality is that you can’t really tell how good or bad it is just by looking…unless it’s really bad, that is. It’s usually more helpful to have some kind of sensor that can tell you what the deal is. To that end, [Arnov Sharma] built a neat air quality monitor with a fun twist.

A Raspberry Pi Pico W acts as the heart of the build, armed with an SGP40 gas sensor. This sensor is intended for monitoring total volatile organic compounds in the air, which can be a useful measure of air quality in at least one dimension. It reports a simple air quality score from 0 to 500, based on a 1-1000 ppm ethanol equivalent reading. Based on the sensor’s output, the Pi Pico drives an LED matrix display — setting it green for good quality air, yellow for moderate, and red for poor air quality (i.e. high VOC content). The fun part is that rather than just show a simple color, the display plays Conway’s Game of Life to create an animated visual. We’d love it even more if poor air quality lead to the premature death of individual cells, making it even more interactive.

We’ve featured other air quality monitors before; often, it’s desirable to monitor CO2 levels to determine whether more ventilation is needed.

Continue reading “Air Quality Monitor Plays Game Of Life

Porting A Fortran Flight Simulator To Unity3D

There’s an old saying (paraphrasing a quote attributed to Hoare): “I don’t know what language scientists will use in the future, but I know it will be called Fortran.” The truth is, there is a ton of very sophisticated code in Fortran, and if you want to do something more modern, it is often easier to borrow it than to reinvent the wheel. When [Valgriz] picked up a textbook on aircraft simulation, he noted that it had an F-16 simulation in it. In Fortran. The challenge? Port it to Unity3D.

If you have a gamepad, you can try the result. However, the real payoff is the blog posts describing what he did. They go back to 2021, although the most recent was a few months ago, and they cover the entire process in great detail. You can also find the code on GitHub. If you are interested in flight simulation, flying, Fortran, or Unity3D, you’ll want to settle in and read all four posts. That will take some time.

Continue reading “Porting A Fortran Flight Simulator To Unity3D”

LLM Dialogue In Animal Crossing Actually Works Very Well

In the original Animal Crossing from 2001, players are able to interact with a huge cast of quirky characters, all with different interests and personalities. But after you’ve played the game for awhile, the scripted interactions can become a bit monotonous. Seeing an opportunity to improve the experience, [josh] decided to put a Large Language Model (LLM) in charge of these interactions. Now when the player chats with other characters in the game, the dialogue is a lot more engaging, relevant, and sometimes just plain funny.

How does one go about hooking a modern LLM into a 24-year-old game built for an entirely offline console? [josh]’s clever approach required a lot of poking about, and did a good job of leveraging some of the game’s built-in features for a seamless result.

Continue reading “LLM Dialogue In Animal Crossing Actually Works Very Well”

Playing DOOM In Discord With A Special Image URL

Can you play DOOM in Discord? At first glance, that may seem rather nonsensical, as Discord is a proprietary chat service and neither a hardware device nor something else that may seem like an obvious target for being (ab)used for demon-shooting points. That is, until you look at Discord’s content embedding feature. This is where [PortalRunner]’s Doomcord hack comes into play, allowing you to play the entire game in a Discord client by submitting text messages after embedding a very special image URL.

Rather than this embedding being done in the client as done with e.g., IRC clients, the Discord backend handles the content fetching, caching, and handing off to clients. This system can easily be used with an animated GIF of gameplay, but having it be seen as a GIF file required adding .gif to the end of the URL to trick Discord’s backend into not simply turning it into a static PNG. After this, Discord’s throttling of message speed turned out to kill the concept of real-time gameplay, along with the server load.

Plan C thus morphed into using Chocolate Doom headless, rendering gameplay into cached video files by using the demo gameplay feature in DOOM. The Doomcord server template project provides a server if you want to give it a whirl yourself. Since this uses recorded gameplay, the switch was made from GIF to the WEBP format to save space, along with a cache expiry system. Just level 1 with all possible input sequences takes up 12 TB of disk space.

Continue reading “Playing DOOM In Discord With A Special Image URL”

NTRON Plays Games, Music

What do you get if you meld a Raspberry Pi, a chiptune synthesizer, and a case that looks like an imaginary Kenback-2000? Well, if you are [Artifextron], you get the NTRON. Part Nintendo console, part chip tune synthesizer, and part objet d’art. You can see the device do its things in the video below.

This is less of a bare metal design and more of a synthesis of parts, but it is a very clever system design using audio mixers and an assortment of modules to do its tasks. It does have an IC handling the gamepad ports. Of course, it also features a ton of 3D printed parts.

Continue reading “NTRON Plays Games, Music”

When Low SRAM Keeps The DOOM Off Your Vape

The PIXO Aspire is a roughly $35 USD vape that can almost play DOOM, with [Aaron Christophel] finding that the only thing that realistically stops it from doing so is that the Cortex-M4-based Puya PY32F403XC MCU only has 64 kB of SRAM. CPU-wise it would be more than capable, with a roomy 16 MB of external SPI Flash and a 323×173 pixel LC touch screen display covering the other needs. It even has a vibration motor to give you some force feedback. Interestingly, this vape has a Bluetooth Low-Energy chip built-in, but this does not seem to be used by the original Aspire firmware.

What [Aaron] did to still get some DOOM vapors on the device was to implement a screenshare firmware, allowing a PC to use the device as a secondary display via its USB interface. This way you can use the regular PC mouse and keyboard inputs to play DOOM, while squinting at the small screen.

Although not as completely overpowered as a recent Anker charging station that [Aaron] played DOOM on, we fully expect vapes in a few years to be perfectly usable for some casual gaming, with this potentially even becoming an original manufacturer’s function, if it isn’t already.

Continue reading “When Low SRAM Keeps The DOOM Off Your Vape”

ESP32 Hosts Functional Minecraft Server

If you haven’t heard of Minecraft, well, we hope you enjoyed your rip-van-winkle nap this past decade or so. For everyone else, you probably at least know that this is a multiplayer, open world game, you may have heard that running a Minecraft server is a good job for maxing out a spare a Raspberry Pi. Which is why we’re hugely impressed that [PortalRunner] managed to squeeze an open world onto an ESP32-C3.

Of course, the trick here is that the MCU isn’t actually running the game — it’s running bareiron, [PortalRunner]’s own C-based Minecraft server implementation. Rewriting the server code in C allows it to be optimized for the ESP32’s hardware, but it also let [PortalRunner] strip his server down to the bare essentials, and tweak everything for performance. For example, instead of the multiple octaves of Perlin noise for terrain generation, with every chunk going into RAM, he’s using the x and z of the corners as seeds for the psudorandom rand() function, and interpolating between them. Instead of caves being generated by a separate algorithm, and stored in memory, in bareiron the underground is just a mirror-image of the world above. Biomes are just tiled, and sit separately from one another.

So yes, what you get from bareiron is simpler than a traditional Minecraft world — items are simplified, crafting is simplified, everything is simplified, but it’s also running on an ESP32, so you’ve got to give it a pass. With 200 ms to load each chunk, it’s playable, but the World’s Smallest Minecraft Server is a bit like a dancing bear: it’s not about how well it dances, but that it dances at all.

This isn’t the first time we’ve seen Minecraft’s server code re-written: some masochist did it in COBOL, but at least that ran on an actual computer, not a microcontroller. Speaking of low performance, you can’t play Minecraft on an SNES, but you can hide the game inside a cartridge, which is almost as good.

Thanks to [CodeAsm] for the tip. Please refer any other dancing bears spotted in the wild to our tips line.

Continue reading “ESP32 Hosts Functional Minecraft Server”