Jump to content

[DeHackEd mod] Yet another deathmatch bot for Vanilla Doom


Sinshu

Recommended Posts

There have been several attempts to make deathmatch bot for Vanilla Doom with DeHackEd.
This is yet another attempt to make the combat more realistic.

 

Here is a demo video:

 

 

Ports required to play

Any vanilla compatible ports should work.
I've tested the following ports.

  • Chocolate Doom
  • Crispy Doom
  • PrBoom+

 

Files

Download link:
https://github.com/sinshu/fake-bot-for-vanilla-doom/releases/tag/v1.1

  • fbot.deh
    The DEH file which turns monsters into deathmatch opponents.
  • fbottest.wad
    A deathmatch map in which you endlessly fight against opponents.

 

IWAD

DOOM2.WAD is recommended, since fbottest.wad replaces MAP01.

 

Recommended options

To make the game enjoyable, -deathmatch and -solo-net options are highly recommended.
For example:

-deh fbot.deh -file fbottest.wad -deathmatch -solo-net -warp 1

 

Share this post


Link to post
  • 1 month later...

Only seeing this now, interesting, this FBot!

@Sinshuis this something you are willing to put up at /idgames?

 

Could you also explain to me what you did to make the combat more realistic? As in, how does FBot differ from other DEH- based attempts?

Share this post


Link to post

@Sinshu in stock Doom2.exe through DOSBox, the deh parameter obviously doesn't work.

I tried:
 

doom2 -file fbottest.wad fboth.deh -deathmatch -solo-net -warp 1

This launches me on the map, but all i get are monsters and a monster spawner. Not a DeHacked bot.

 

I am probably missing the obvious, but perhaps you can lend a hand here?

Share this post


Link to post

@Redneckerz

I wanted to achieve the following things:

  • The bots' rate of fire and firing animation are exactly the same as that of a real player.
  • Bots never stop moving until they kill the player, even when they are attacking or in pain.

To achieve these two things at the same time was not easy.

 

Monsters that can move while attacking has already been accomplished in many mods. A simple way to accomplish that is to insert the A_Chase code pointer to the attack animation. However, in this way, since A_Chase might reset the monsters' animation to the initial attack frame even in middle of the attack animation, we cannot make a long attack animation like reloading SSG.

 

The solution of this problem is not to use any attack states. In this mod, bots does not have attack state, so that we can ensure that A_Chase will not break the animation. Bots only have spawn, walk, pain and death states. So how do they attack the player?

 

The walk animation is arranged like this:

 

(1) One cycle of walking animation (One cycle of marine's walking sprites)
(2) The A_CPosRefire code pointer
(3) The attack animation with A_Chase inserted
(4) Go to (3)

 

After one cycle of the walking animation, bots always try to shoot the player. (2) is the code pointer used for chaingunners to stop attacking when the player is not visible. So bots will return to (1) if they cannot see the player. Thus, bots will shoot the player only when they can see the player, as if they have the attack state.

Share this post


Link to post

Regarding /idgames, I have no plan to upload to there, since this is an experimental thing.

 

If you want to run this mod on DOS Doom, DOOM2.EXE must be modified via DeHackEd, but I have never tried that...

Share this post


Link to post
1 hour ago, Sinshu said:

Regarding /idgames, I have no plan to upload to there, since this is an experimental thing.

 

If you want to run this mod on DOS Doom, DOOM2.EXE must be modified via DeHackEd, but I have never tried that...

Through VULD, you can merge any .deh. Ill give it a try.

 

For what it is worth, i have referenced FakeBot on the Bot page on the DoomWiki.

 

Thank you for your extended explanation in how this was achieved. I hope this will provide other authors who would want to attempt a DeHacked based bot ideas.

Share this post


Link to post
4 hours ago, Redneckerz said:

@Sinshu in stock Doom2.exe through DOSBox, the deh parameter obviously doesn't work.

I tried:
 


doom2 -file fbottest.wad fboth.deh -deathmatch -solo-net -warp 1

This launches me on the map, but all i get are monsters and a monster spawner. Not a DeHacked bot.

 

I am probably missing the obvious, but perhaps you can lend a hand here?


The original DOS exes had absolutely no support for DeHackEd patches; the original method of application was to use the patches with DeHackEd itself to modify the executable. This is why what you're doing doesn't work.

 

Given that .deh files themselves have changed in nature since the '90s, there's a chance that even patching the executable may not work as intended, also.

Share this post


Link to post
6 minutes ago, Jayextee said:


The original DOS exes had absolutely no support for DeHackEd patches; the original method of application was to use the patches with DeHackEd itself to modify the executable. This is why what you're doing doesn't work.

That would be merging them together. This was true in the old days.

 

I assume this patch isn't made for anything else other than the Doom 1.9 executables and aren't binary patches.

6 minutes ago, Jayextee said:

Given that .deh files themselves have changed in nature since the '90s, there's a chance that even patching the executable may not work as intended, also.

Its a text-based patch. I ran Fbot.deh through DEHpick so that it only merges FBot.Deh with Doom2.exe and creates the new executable FBOT.EXE. That already brings errors.

Adding FBottest.wad, the level runs, but then a whole bunch of illegal writes get made before the game hard crashes with the error:

 

Z_CT at wad.c:510

I didn't do a full VULD proces because all that is there is a .deh and the test map. VULD assumes you also want flats and textures to append. Since FBot does not use those, DEHPick was used.

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...