Jump to content

How did the rancy.exe program included in the eternal doom megawad worked?


Recommended Posts

So, if you've ever played the eternal doom megawad (released in 1996 by teamTNT), then you have probably come across that wads infamous map, aka map 33 cybersweeper. That map recreated Minesweeper in vanilla doom and with that wad, came included a little utility called rancy.exe

https://doomwiki.org/wiki/MAP33:_CyberSweeper_(Eternal_Doom)

which was used to randomize the placement of cyberdemon in each subsequent playthrough.

 

So, my question here is how that program worked, and being available for vanilla doom meant that before the release of the doom source code, I guess that program was probably a nifty exe hack? Idk.

 

Also I'm unable to run that program by myself as it refuses to run in windows 7 or 10 (because it's a 16 bit exe)

Share this post


Link to post
6 minutes ago, Sasunil bhotos said:

So, if you've ever played the eternal doom megawad (released in 1996 by teamTNT), then you have probably come across that wads infamous map, aka map 33 cybersweeper. That map recreated Minesweeper in vanilla doom and with that wad, came included a little utility called rancy.exe

https://doomwiki.org/wiki/MAP33:_CyberSweeper_(Eternal_Doom)

which was used to randomize the placement of cyberdemon in each subsequent playthrough.

 

So, my question here is how that program worked, and being available for vanilla doom meant that before the release of the doom source code, I guess that program was probably a nifty exe hack? Idk.

 

Also I'm unable to run that program by myself as it refuses to run in windows 7 or 10 (because it's a 16 bit exe)

 

Have you tried running Eternal Doom in Dosbox, or one of its variants like Dosbox Staging or Dosbox X

Edited by Master O

Share this post


Link to post

Due to the technical issues that make starting it a hassle it my educated guess is that it just modfied the provided csweeper.wad level, so it doesn't need any detailed knowledge of the EXE.

 

Share this post


Link to post
2 hours ago, Graf Zahl said:

Due to the technical issues that make starting it a hassle it my educated guess is that it just modfied the provided csweeper.wad level, so it doesn't need any detailed knowledge of the EXE.

 

 

I concur. Jim or someone on the team would have known how to modify the positions of things in a structured manner. Since the map is simple and precise it would be easy to move one Cyber to the left or right 128 units or whatever based on a random number and be confident its in one of the squares. Looking at the docs, the program needs to be called from the original launcher so maybe the launcher fed it parameters to control the randomisation process.

Share this post


Link to post
8 hours ago, Sasunil bhotos said:

So, my question here is how that program worked, and being available for vanilla doom meant that before the release of the doom source code, I guess that program was probably a nifty exe hack? Idk.

It is not an exe hack, rather, a supplemental program to modify stuff on the Cybersweeper map. Rancy.exe is unique because it does this without doing DeHackEd.

 

I always thought rancy.exe was rather cute because its purpose made for one thing, in comparison to executable that actually muck with the IWAD.

 

5 hours ago, Graf Zahl said:

Due to the technical issues that make starting it a hassle it my educated guess is that it just modfied the provided csweeper.wad level, so it doesn't need any detailed knowledge of the EXE.

It likely alters values based on that specifc map alone.

 

Unique executable, but does not alter the exe or the IWAD. There have been maps that supply extra executables to accomplish similar feats to DeHacked albeit custom.

Share this post


Link to post
11 minutes ago, Redneckerz said:

It is not an exe hack, rather, a supplemental program to modify stuff on the Cybersweeper map. Rancy.exe is unique because it does this without doing DeHackEd.

 

I always thought rancy.exe was rather cute because its purpose made for one thing, in comparison to executable that actually muck with the IWAD.

 

It likely alters values based on that specifc map alone.

 

Unique executable, but does not alter the exe or the IWAD. There have been maps that supply extra executables to accomplish similar feats to DeHacked albeit custom.

Thanks for your answer, but I'm still in limbo as to how that program actually works... maybe someone more knowledgeable than me could reverse engineer that exe and find the source code?

Also, can i make my own exe like that for 32 or 64 bit systems to modify the placement of any monster in each playthrough??

Share this post


Link to post

Ive always been interested in some of the things about that Eternal Doom exe, all of which were already outdated by the time I got to play it. Stuff like the skies changing colour depending on time for example, because theres certainly no extra skies in the wad.

Share this post


Link to post
40 minutes ago, Sasunil bhotos said:

Thanks for your answer, but I'm still in limbo as to how that program actually works... maybe someone more knowledgeable than me could reverse engineer that exe and find the source code?

 

It's modifying the WAD itself. Thinking about it some more, it is probably working in one of two ways.

 

Somewhere in the data therein is the position coordinates for the Cyberdemons. Just as a level editor can change that information based on the level designer's want, it could also be done programmatically. So say the Cyberdemon 1 is under square 1, row 1 and has thing number 2. The X and Y coordinates might be 256, 256. Assuming the center of each square is say 256 units apart, and the randomisation process determines it should be moved two squares over, the program would then change the X coordinate of Thing #2 to 768 ie: 256 + (256 * 2).

 

The other way is that it's actually inserting the things itself rather than manipulating existing things. This would probably be simpler from a coding perspective. There's 36 squares total. The code could map out the coordinates of the centre of each square. Square 1 row 1 is 256, 256, square 2 row 1 is 512, 256, Square 1 row 2 is 256, 512 etc etc. The code that generates the exact pattern of the Cybers gets executed, then the code inserts things at the given centre point based on the grid.

 

There will be other things getting changed like the hint textures as well.

 

I would wager the the code then puts the WAD back to it's default state once the game is exited, ready to be run again. The code could be reverse engineered but that would be no small feat to massage it into usability. Even in it's original state it would be quite complicated code. The more I think about it and reading the full description on the Wiki, it's actually quite impressive. I am actually quite curious now. Going to make a mental note to open the map up and see if the Cybers are already in place. That should determine which of the two methods is being used.

 

The launcher should work fine under DOSBox. What operating system are you running on?

Edited by Murdoch

Share this post


Link to post

So the map has the Cybers already in place. There's only 8 of them. So the code most tweak their positions?

Share this post


Link to post
1 hour ago, Murdoch said:

So the map has the Cybers already in place. There's only 8 of them. So the code most tweak their positions?

 

Didn't look too deeply with Ghidra but that's the gist of it @Murdoch.

Edited by vyruss

Share this post


Link to post

If you use the frontend to launch it on Nightmare, it does actually have more Cybers. I do remember having problems trying to get it working at first but now I don't remember what those problems were or what I did about them. I've tried zipping the folder exactly as it is for me, minus doom2.exe and the iwad of course, and if you open Dosbox and start with "mount c (the folder you've extracted with your own exe and iwad added)" and run eternal.bat you'll hopefully have things set up to launch Cybersweeper on the difficulty of your choice and get a random arrangement of the number you want. Then when doom2.exe starts you can just close it and play the newly generated wad in the port of your choice.

 

Pre-emptive apologies to the many people here who are better at computers than me and read those instructions and thought "that is disgustingly inefficient" or something.

Share this post


Link to post

I guess the Id boys there also helped Jim to develop these little executables, judging by the fact that he would later go on to make the boom source port with Lee and others. And being involved with teamTNT meant more deep knowledge of the doom exe before the release of the source code back then (as they were in close contact with Id software)...

 

Hell, even thinking about randomizing the placement of monsters today, many would go to acs Or udmf for help. Nobody would even glance at getting it to work on vanilla or maybe boom format maps.. Bravo Jim

 

Share this post


Link to post

I doubt they'd need help from id Software to develop such a small utility. All you need to know is how a Doom map is built, and this was the case since there were map editors. You could in fact program the utility to just rewrite the entire map "from scratch" instead of reading and modifying it, and that would probably be the easiest way to do it.

 

  1. Build the layout in a regular map editor.
  2. Hardcode all the resulting lines, sectors, sides, segs, and nodes stuff in your program.
  3. Now just randomly add things at predefined locations.
  4. Write it out!
1 hour ago, Grassy chunks said:

Hell, even thinking about randomizing the placement of monsters today, many would go to acs Or udmf for help. Nobody would even glance at getting it to work on vanilla or maybe boom format maps.. Bravo Jim

There's a massive difference here in that with ACS you can make it so that the map randomizes itself while playing. This vanilla approach is based on quitting the game, randomizing the map with a dedicated program, then restarting the game with your new map version.

 

As for UDMF, in itself, it doesn't offer any randomization capacity. It's just an extensible map format.

Share this post


Link to post
22 hours ago, Sasunil bhotos said:

I guess that program was probably a nifty exe hack? Idk.

wad hack I think. Just to change numbers inside THINGS lump. Automated hex editing

Share this post


Link to post
14 hours ago, Sasunil bhotos said:

Thanks for your answer, but I'm still in limbo as to how that program actually works... maybe someone more knowledgeable than me could reverse engineer that exe and find the source code?

Also, can i make my own exe like that for 32 or 64 bit systems to modify the placement of any monster in each playthrough??

It is a Jim Flynn program. And when Jim Flynn is mentioned, i have to mention that he made a lot, really a lot of those. 

 

The grunt of these utilities got ported to Windows last year, so you can basically, together with batch files, create an automated deployment system (Similar to RAMP) using Jim's tools. Or edit a Colormap or two :)

 

Rancy is just another one of those tools, a randomizer executable for that one map.

 

With ACS, you can create a randomizer script that can run over multiple maps - ZDaemon's Rhinolib ACS library has a randomizer script (Originally by @Worst) that has made a lot of mapsets and game modes possible in that port.

 

 

Share this post


Link to post
8 minutes ago, Redneckerz said:

It is a Jim Flynn program. And when Jim Flynn is mentioned, i have to mention that he made a lot, really a lot of those. 

 

The grunt of these utilities got ported to Windows last year, so you can basically, together with batch files, create an automated deployment system (Similar to RAMP) using Jim's tools. Or edit a Colormap or two :)

 

Rancy is just another one of those tools, a randomizer executable for that one map.

 

With ACS, you can create a randomizer script that can run over multiple maps - ZDaemon's Rhinolib ACS library has a randomizer script (Originally by @Worst) that has made a lot of mapsets and game modes possible in that port.

 

So someone would have to re-compile rancy.exe in 64-bit for modern Windows systems?

Share this post


Link to post
18 minutes ago, Master O said:

 

So someone would have to re-compile rancy.exe in 64-bit for modern Windows systems?

Likely. It needs to be ported over. Gibbon did port Boom Editing Utils and Patcher, but not Rancy since it isn't a part of those packages. Its also a specific tool (It randomizes placement on a map called Cybersweeper) so it makes sense it wasn't ported.

 

I can sorta see a modernized application where that map can be endlessly randomized, but thing randomizers/placers as-is aren't a new thing. Doom had plenty of those.

Share this post


Link to post
1 hour ago, Redneckerz said:

I can sorta see a modernized application where that map can be endlessly randomized, but thing randomizers/placers as-is aren't a new thing. Doom had plenty of those.

Nowadays instead of a dedicated program just for that, you'd use Lua or JavaScript or perhaps WadC or Liquorice.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...