Lemmings Forums

Other Lemmings Projects => Other Projects => Topic started by: DirtyHairy on March 15, 2026, 04:56:24 PM

Title: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on March 15, 2026, 04:56:24 PM
I am currently working on a cross-platform reimplementation of DOS Lemmings in Rust that reads the original data files and acts as a drop in replacement for the original binary. I have yet to add the actual gameplay, but the interface and the basic engine are now in place and ready for some rodents to move in, so I thought I'd share a few screenshots ;) If you're curious you can find the project at https://github.com/DirtyHairy/rustlings
Title: Re: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on May 09, 2026, 08:59:43 PM
Progressing towards "playable" ;) Walking, falling and all kinds of "death by terrain" are now working and match frame-to-frame with the original.
Title: Re: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on November 01, 2026, 09:11:39 PM
After picking up Rustlings again, all skills are now implemented. There still is no checking for game over conditions, and there still are no menus, but all levels are playable. I still want to add a few unit tests for builders, and then I'll put up test builds for MacOS, Linux and Windows that you can try out if you feel adventurous later this week  ;)
Title: Re: Rustlings: a WIP lemmings engine
Post by: Simon on November 02, 2026, 09:06:31 PM
Rustlings is exciting to follow.

The closest engines in spirit are Lemmix and Golems, for bug-compatible DOS Lemmings 1 physics. But Lemmix is written in Delphi for Windows. Golems runs in the browser and has a Windows release, but it's not open-source yet. Rustlings is both cross-platform and open source, building it was easy (get the source, then cargo build) and it all works offline after cargo has fetched the dependencies.

And you've reverse-engineered parts of DOS L1 yourself. We believe that Lemmix and ccexplore's descriptions replicate DOS L1 exactly, but it's always possible that there are bugs that we haven't found even after 20 years of Lemmix.

I don't think I'm going to play a lot of Lemmings under exact DOS Lemmings 1 physics. I play DOS L1 itself occasionally in Dosbox for nostalgia. Still, I'll see how much modern convenience, replay fine-control, ... you'll add.

You show VGA level graphics with the EGA skill panel and information bar. Is that intentional?

-- Simon
Title: Re: Rustlings: a WIP lemmings engine
Post by: The Tomato Watcher on November 02, 2026, 09:53:13 PM
Quote from: Simon on November 02, 2026, 09:06:31 PMYou show VGA level graphics with the EGA skill panel and information bar. Is that intentional?

That's not the EGA panel, that's just what it looks like in the "For High Performance PCs" mode with VGA graphics selected. EGA graphics features the same mode, and it looks similar there, but the colors aren't the same.

EGA:
image0005.png

VGA:
image0006.png
Title: Re: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on November 03, 2026, 07:44:10 AM
Thanks a lot for the kind words!

Quote from: Simon on November 02, 2026, 09:06:31 PMAnd you've reverse-engineered parts of DOS L1 yourself. We believe that Lemmix and ccexplore's descriptions replicate DOS L1 exactly, but it's always possible that there are bugs that we haven't found even after 20 years of Lemmix.

To be fair, the parts that I reversed from the DOS binary so far are (from the top of my head) are the level code encoding, level ordering & oddtable, particles (I wanted to make sure that I am using the exact particle data and algorithm as the original), skill panel palette and a few more things that I probably forgot. My physics code currently is mostly a 1:1 port of the mechanics implemented by Lemmix. I did do a frame by frame comparison with the DOS binary though, so at least the aspiration is to be a pixel and bug perfect copy :P

Quote from: Simon on November 02, 2026, 09:06:31 PMStill, I'll see how much modern convenience, replay fine-control, ... you'll add.

I'll add the original menu screens (but with a live preview of the level) and the title screen next, and after that it's probably audio time. And when that's done... who knows.  :8:()[:

Quote from: Simon on November 02, 2026, 09:06:31 PMYou show VGA level graphics with the EGA skill panel and information bar. Is that intentional?

As The Tomato Watches says, this is actually how DOS looks in VGA in "High Performance" mode. Lemmings uses the same display code and 16 color mode for VGA as for EGA and just takes advantage of the larger color space (probably for code reuse, and faster blits). The difference between "High Performance PCs" and "PC compatibles" are that the latter uses the same palette for the skill panel as for the rest of the level, while the "high performance" mode does a palette switch just before it displays the panel and uses a different palette there.
Title: Re: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on November 04, 2026, 10:32:43 PM
Alright, I have publised a 0.1.0 release with binaries for MacOS, Windows and Linux here: https://github.com/DirtyHairy/rustlings/releases/tag/0.1.0

Just dump the binary next to the DOS data files and launch it (or point it to the data directory from the command line). All levels should be fully playable, but there is not detection of end conditions yet, the level continues to run when the last lemming is gone (or time is up) until you switch to another level.


In case you try it: have fun!
Title: Re: Rustlings: a WIP lemmings engine
Post by: DirtyHairy on November 08, 2026, 05:47:37 PM
Menu screens are coming along, including a live preview of the next level. Sticking to original graphics doesn't mean that you can't put those extra pixels that you get on a modern display to work... ;)