Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Creaphis

Experienced Heretic code-divers will find a neat wad within

Recommended Posts

This is a bit of a long shot, but...

Some time ago, I discovered that voodoo doll + conveyor belt scripting as we know and love it was possible in vanilla Heretic. Not all scrolling floor types worked to achieve this, but I found that medium and strong wind could push a voodoo doll in an exploitable manner. However, I just tried running the same experiments with a new scrap level, and my old discoveries are being thrown seriously into question. Now it doesn't work at all!

Now, when the level loads, all voodoo dolls remain motionless no matter what sort of sector they're on. But, if I shoot a voodoo doll standing on a wind sector (of any strength), he will then begin to be pushed along. The same is true for gasbags - they only start moving after they have been shot (or, unlike voodoo dolls, if they are pushed by a player or other gasbag). The gasbags produced by gasbag generators are pushed by wind as soon as they are created.

The fact that wind starts affecting these objects after certain events occur seems to imply that these objects start in one state and then are put into slightly different state in which wind can affect them, and gasbag generators put gasbags into this state right away. Also, the fact that voodoo dolls sometimes are affected by wind right away upon loading of the level (I am certain that I have had this work before, in Hereticp if not in Heretic.exe, and those exes now appear to be working identically) implies that there is some almost random chance involved - perhaps the order in which things, sectors and what have you are loaded into memory is important in some way.

Anyways, I'm hoping that someone here will be able to provide more insight into what's going here so that I know what to try. What is the wind code attempting and why doesn't it succeed? Thanks.

Share this post


Link to post

The reason for this behavior can be found in P_MobjThinker:

	// Handle X and Y momentums
	if(mobj->momx || mobj->momy || (mobj->flags&MF_SKULLFLY))
	{
		P_XYMovement(mobj);
		if(mobj->thinker.function == (think_t)-1)
		{ // mobj was removed
			return;
		}
	}
The wind effect gets done in P_XYMovement and that function only gets called when an object is already moving )i.e. momx or momy are not 0.)


Can it be that you tested this in ZDoom? ZDoom calls P_XYMovement even if an actor's momentum is 0.

Share this post


Link to post

I believe I tested in ZDoom and Hereticp, and I thought I had hit upon a setup that worked in both engines. I distinctly remember a test conveyor belt opening a door in an engine with large pixels and no sound. Well, okay then. If the code says it shouldn't be possible, then I won't expect it to work. All is not lost; I've already thought of a few ways to "prime" a voodoo doll script. And then we'll get to see scripting in an offshoot of Doom 1.2.

Heretic's voodoo doll code is just weird. Take 20 health off 5 dolls and the zombie effect occurs, but your health meter never stops saying 100. "Voodoo doll code" being a misnomer considering that they aren't even supposed to exist... :)

Edit: Oh, I guess I should ask this before I hit another snag: are gasbag explosions as consistent as barrel explosions or is there a random element?

Share this post


Link to post

Hey guys, I have some fun news for you. Take another look at the gasbag code, Graf. I think you're right about their blast radius - as far as I can tell, it's the same damage and size each time. BUT, the damaging explosion does not occur until after the dying gasbag launches itself in a random direction with a random speed. Luckily, gasbags and the exploding gasbag corpse are both blocked by impassable lines, so with some trial and error I should be able to lock that explosion within a small enough space to be consistent. The exploding corpse seems to have a slightly smaller radius than the "living" gasbag. Does the code confirm this?

Other relevant discoveries:
1. A moving voodoo doll stopped by a door stops permanently.
2. A moving voodoo doll that teleports onto a wind sector is stopped permanently.

The ripple counter isn't yet impossible but it's getting there.

Other exciting trivia:
- Do 50 damage to a voodoo doll, your health bar still says 100. Let a monster do 50 points of damage to you, your health bar will say 50 and you'll be in zombie mode. Let the monster lower your health to 0 and you'll die properly.


Edit: Alright, the exploding corpse can be locked completely in place, so that a distance of 143 map units between the doll and the gasbag consistently does a negligible amount of damage. So that isn't a problem.

Share this post


Link to post

I remember I came across this problem in Heretic many years ago. I had a map that was a building floating in the sky and there was some strong wind suction in some parts which was intended to pull the player out of the map and into a falling death. I put the player 1 start in a room that had a wind-based suction effect behind it with the intent of the player starting the map and immediately being pulled backward. After a few tests, I noticed I could stand there and spin in circles for minutes without the suction beginning until I finally moved in a direction. Obviously, it had to be redesigned :(

Share this post


Link to post
Lüt said:

Obviously, it had to be redesigned :(


You could have put the player start on a tiny scrolling sector to push him into the wind sector. Scrolling does push the player without prior momentum, even though it doesn't push voodoo dolls under any condition. There would also be no visibly scrolling floor area because, in a marvelous display of coding foresight, only the east scrollers actually scroll the flat. (This was presumably meant to accommodate the fltflww1-3 flat series, and those flats only. Most other scrolling flats show slight tutti-frutti.)

Isn't it great learning things many years too late?

Share this post


Link to post

Yeah I know about the scroll flat special issues, I usually had to use the wind specials to fake liquid flow unless I made way for the waterflow or molten lava flats (afaik that's the only other flat that scrolls seamlessly, and really looks quite nice with the blink/flow/damage combo floor special).

But the design of the original map wasn't so great in the first place, so now the start room is its own chamber; 4 in each corner. And it's not too late, even if you're new you should know by now I never finish anything, so it was never released :P

Share this post


Link to post
Creaphis said:

Hey! That ripple counter! I got around to making it.

http://www.filesavr.com/hcount

It also looks way better than fraggle's. No offense.

Wow. So scripting to some degree is possible with vanilla heretic...

When you cross a certain line, crushers come down and blow up the gas bombs, causing the dolls to move... nice.

I would think that results may vary though, considering the doll has to take damage in order for this to work.

Share this post


Link to post

ZDoom fixed the voodoo doll health issues, I remember because I was the only one ever to use them in open play.

Mike.Reiner said:

Wow. So scripting to some degree is possible with vanilla heretic...


As it is with Boom maps, some of which use the same technique to create scripts. (although slightly different as scrollers move the dolls straightaway, and teleport lines were available too)

Share this post


Link to post
Mike.Reiner said:

I would think that results may vary though, considering the doll has to take damage in order for this to work.


Yeah, there are a number of disadvantages to doing this in Heretic.exe. You need to manually jump-start every voodoo doll with explosion damage, and then you either need to make use of the doll's movement right away, or preserve that movement in an eternal circular dance. As soon as they stop moving, they don't start again.

However, some of the voodoo doll weirdness cancels itself out. You don't want your character to mysteriously lose a point of health for no reason? Well then you're in luck - when the voodoo doll is damaged, the player's health bar doesn't change (even though that does bring the player closer to a zombie effect).

The bigger problems have to do with the difference between Heretic.exe and ZDoom with the handling of wind sectors. There are other tricks you could use to make a level that works in both engines, but at a certain point it stops being worth it.

Share this post


Link to post

http://www.filesavr.com/hcount

Same link, different file. Here's the completed version for the one or two of you who care about this. I've already uploaded this to incoming, and I'd appreciate it if one of you could claim it for a /newstuff Chronicles review when it's available - I don't want somebody judging it on its gameplay merits.

Share this post


Link to post
Creaphis said:

Ha. Come to think of it, an utterly scathing review would probably lead to the most downloads...

mmm.. irony.

Share this post


Link to post
Creaphis said:

It also looks way better than fraggle's. No offense.

Very nice, although it did take me a while to work out how the numbers were being represented. Mine is ugly but it at least has a big obvious sign on the wall.

It's also faster.

So there :-)

Share this post


Link to post
exp(x) said:

Nice! I tested it with chocolate-heretic.


Ooh, is it done? Is it? Is it?

If it isn't, then it's more accurate to say that you tested chocolate-heretic with this wad.

Share this post


Link to post

Many whiskeys perpetually improve themselves, but there is a point where you can start calling them "done" as opposed to the alternative.

So there's no official release yet, I take it.

Share this post


Link to post

Creaphis obviously means that Chocolate Heretic isn't even officially released, and when it is, it's bound to have several major flaws anyway.

Chocolate Doom itself can be considered more or less "finished", at this point it's mostly minor problems being spotted now and then (although The Sky May Be still doesn't run completely correctly :<).

Share this post


Link to post
MikeRS said:

Creaphis obviously means that Chocolate Heretic isn't even officially released, and when it is, it's bound to have several major flaws anyway.


I really was genuinely asking if Fraggle had packaged it up for release yet. I thought maybe I missed it.

Over 50% of the posts in this thread are mine. Let's see how long I can keep that up.

Share this post


Link to post
Creaphis said:

Ooh, is it done? Is it? Is it?

If it isn't, then it's more accurate to say that you tested chocolate-heretic with this wad.

Single player mode Heretic and Hexen mostly work fine now. There's still a load of things I need to fix up before I'll consider it good enough for a proper release. Multiplayer is broken at the moment, for example.

There's a full list here.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×