Rustlings: a WIP lemmings engine

Started by DirtyHairy, March 15, 2026, 04:56:24 PM

Previous topic - Next topic

DirtyHairy and 1 Guest are viewing this topic.

DirtyHairy

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

DirtyHairy

Progressing towards "playable" ;) Walking, falling and all kinds of "death by terrain" are now working and match frame-to-frame with the original.

DirtyHairy

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  ;)

Simon

#3
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

The Tomato Watcher

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

DirtyHairy

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.