Menu

C to Factorio Compiler, and Playing (Mini) Factorio in Factorio
📰

C to Factorio Compiler, and Playing (Mini) Factorio in Factorio

#factorio#redditfactorio#game#compiler#mini
Reading 0:00
15s threshold

Factorio in Factorio, video sped up 4x

The mini-game works on a 192x144 resolution, uses 27328 lamps, 7k combinator units, 144 MW of power and takes about 200 to 300 ticks to process one frame.

Compiler source code (factory.c as an example): https://github.com/eliphatfs/factorio-llvm-backend .

Factory blueprint: requires 2.1 vanilla, should also work in Space Age. https://factorioprints.com/view/-P5NIfJ1Sc0L-FvPSzNU

I read through https://www.reddit.com/r/factorio/comments/1xjhlbj/i_fit_flappy_bird_in_a_single_decider_combinator/ this post a few days ago and got inspired about its design. The decider combinator is a valid complete Finite State Machine in 2.1, and though theoretically that's not the same as a Turing Machine, as long as you can scale the memory up it is practically one. Technically, the compiler does not support recursion yet, but loops are supported, and so is a software stack array, so you can emulate that with a loop, which makes it Turing Complete, though at questionable efficiency.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.