Cacodemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Newfangled Doom > Doom 3 General > Some vanilla Doom code found in Doom 3
 
Author
All times are GMT. The time now is 08:25. Post New Thread    Post A Reply
Quasar
Moderator


Posts: 5757
Registered: 08-00


We're not sure if it survived all the way through the entire id Tech engine chain or if it has come and gone a few times, but:

http://pastie.org/8122797

This function is a direct modification, comments and variable names preserved, of a portion of the DOOM source, a function originally named P_NewChaseDir, and is the core of the DOOM AI "wandering" behavior - try a direct path; if that's blocked, try a non-reversal direction; if that's blocked, maybe turn around and move the other way.

We need to trace this back and see if it's really been in there the whole time ;)

EDIT: I give you the full history of the code. Interestingly, though not surprisingly, it does drop out of the tree in Quake 3, as that game had no single player mission and thus no need for ordinary AI.
http://eternity.mancubus.net/text/p...dir_history.txt

Last edited by Quasar on 07-11-13 at 01:55

Old Post 07-11-13 00:21 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8538
Registered: 06-06


It's even in Wolfenstein 3d, in three variants even: pastebin.com/ASBNvLfm (wl_state.c)

__________________
Automatic Wolfenstein - Version 1.0

Last edited by printz on 07-11-13 at 09:31

Old Post 07-11-13 07:48 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
MFG38
Member


Posts: 294
Registered: 05-13


Interesting.

__________________
script 38 (void)
{
thingcount(T_HELLKNIGHT,666) = TOOMANY;
}

Old Post 07-11-13 09:31 #
MFG38 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8538
Registered: 06-06


Might explain why monster AI still is shitty and has barely evolved. Are the Rage monsters equally bad?

__________________
Automatic Wolfenstein - Version 1.0

Old Post 07-11-13 09:39 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
kb1
Member


Posts: 280
Registered: 11-06


Holy crap - what a nice find! So much for "he starts with a blank code window for each game"...

Old Post 07-11-13 23:18 #
kb1 is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10665
Registered: 07-07


This is not part of the rendering engine.

Old Post 07-12-13 08:59 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Springy
Senior Member


Posts: 1185
Registered: 09-12


Great find Quasar! I've not played Rage so I'm not sure what the monster behavior is like but this is certainly an interesting find.

Old Post 07-12-13 12:14 #
Springy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 5757
Registered: 08-00



kb1 said:
Holy crap - what a nice find! So much for "he starts with a blank code window for each game"...

It's never been true, not even for Quake and its supposed total engine rewrite. It's pretty clear that what happened was that Carmack took the DOOM source code directory, made a copy of it, and then started pruning game-specific crap til he was left with a minimal framework and some utilities. This is how wad.c and zone.c (the latter in particular) are intact, and some other file names and such still remain the same even though the contents may be radically different. Other code may have been brought back in after having been cleared out, such as this scrap of the AI, when it became clear later that the same approach with some minor modifications would work in the new game.

DOOM itself, though you could hardly say it is based on Wolfenstein, did grow out of what I describe as a "cloud" of transitional engines - see Shadowcaster and RoTT in particular - which were largely still based on it, the former having colormap distance fading and DOOM-like sky drawing; the latter using an alpha form of DOOM's patches, DOOM's wad files, and DOOM's memory allocator. I have little doubt that the "code cloud" started life in the same way, as a direct copy of the Wolf source which was quickly cleared of everything but basic utilities and then rebuilt back up.

My question at this point would be if Wolf started as a copy of Catacomb 3D, and Catacomb 3D as a copy of Hovertank 3D :P

Old Post 07-12-13 16:23 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 08:25. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Newfangled Doom > Doom 3 General > Some vanilla Doom code found in Doom 3

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Message Board Statistics