Factorio Running On Mobile

As a video game, DOOM has achieved cult status not just for its legendary gameplay and milestone developments but also because it’s the piece of software that’s likely been ported to the most number of platforms. Almost everything with a processor can run the 1993 shooter, but as it ages, this becomes less of a challenge. More modern games are starting to move into this position, and Factorio may be taking a leading position. [Point Substantial] has gotten this game to run on a mobile phone.

The minimum system requirements for Factorio are enough to make this a challenge, especially compared to vintage title like DOOM. For Linux systems a dual-core processor and 8 GB of memory are needed, as well as something with at least 1 GB of VRAM. [Point_Substantial]’s Xiaomi Mi 9T almost meets these official minimum requirements, with the notable exception of RAM. This problem was solved by adding 6 GB of swap space to make up for the difference.

The real key to getting this running is that this phone doesn’t run Android, it runs the Linux-only postmarketOS. Since it’s a full-fledged Linux distribution rather than Android, it can run any software any other Linux computer can, including Steam. And it can also easily handle inputs for periphreals including a Switch Pro controller, which is important because this game doesn’t have touch inputs programmed natively.

The other tool that [Point_Substantial] needed was box86/box64, a translation layer to run x86 code on ARM. But with all the pieces in place it’s quite possible to run plenty of games semi-natively on a system like this. In fact, we’d argue it’s a shame that more phones don’t have support for Linux distributions like postmarketOS based on the latest news about Android.

Thanks to [Keith] for the tip!

Some assembly code

Programming Space Game For X86 In Assembly Without An Operating System

In this video our hacker [Inkbox] shows us how to create a computer game that runs directly on computer hardware, without an operating system!

[Inkbox] briefly explains what BIOS is, then covers how UEFI replaces it. He talks about the genesis of UEFI from Intel in the late 90s. After Intel’s implementation of UEFI was made open source it got picked up by the TianoCore community who make tools such as the TianoCore EDK II.

[Inkbox] explains that the UEFI implementation provides boot services and runtime services. Boot services include things such as loading memory management facilities or running other UEFI applications, and runtime services include things like system clock access and system reset. In addition to these services there are many more UEFI protocols that are available.

Continue reading “Programming Space Game For X86 In Assembly Without An Operating System”

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”