Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Hellbent

Monster stuck in wall tolerance

Recommended Posts

For editing, what are the dimensions of monsters? Do they all have the same stuck in wall tolerance? What I mean is, the imps on the lift in Map01 look to be stuck in the wall in the Deepsea editor, but do not have a problem in the game. What is the imp's dimensions? Does it have a tolerance for being slightly stuck in the wall? If so, what is its tolerance and is it the same for all monsters?

Thanks

Share this post


Link to post

You can get data on all monsters in the Doom wiki (e.g, Cacodemon stats).

I've not used Deepsea, but I know in the top-down view in all editors I've used (DEU, DETH and DoomBuilder), every thing (when selected) has a bounding box. Keep the bounding box from touching/going through walls, and you'll be golden.

Share this post


Link to post
Lich said:

You can get data on all monsters in the Doom wiki (e.g, Cacodemon stats).

I've not used Deepsea, but I know in the top-down view in all editors I've used (DEU, DETH and DoomBuilder), every thing (when selected) has a bounding box. Keep the bounding box from touching/going through walls, and you'll be golden.

This I know, which is why I brought up this post. Because in Entryway the imps' bounding boxes are inside the walls but they aren't stuck overlapping each other but they are not stuck.. Thanks for the link.

Are those cacodemon damage frequencies real? I find them rather random! Interesting if they are, but I'm skeptical.

Another thing I don't understand: A caco's map speed is 56 units per second, which is 7 times more than his bit speed of 8. A demon's map speed is 175 units per second which is 17.5 times faster than is bit speed. Why aren't these two numbers linearly correlative?

Says here Arch-vile is 128 wide. I think it's more like 40.

I think I like the beta lost souls more! The one's that made into the game are a little too cutesy.

Share this post


Link to post

Imps and Archviles both have a radius of 20 units (i.e. 40x40 total size).

Some editors show a circle for monsters and other things, but that is misleading because in-game everything is a square box for doing collisions.

The Yadex editor shows the imps on the lift as OK, a few units away from the walls, so I don't know what is wrong with Deepsea.

Share this post


Link to post
Ajapted said:

so I don't know what is wrong with Deepsea.

Nothing from what I can tell. I just checked all the imps in map01 with it. None of the bounding boxes were in the wall. Some were close, but not actually in the wall.

As a side note, DeePsea can show things using circles or squares (either filled or outline), small crosses or sprites and the bounding box is shown when the thing is highlighted.

Share this post


Link to post
Hellbent said:

This I know, which is why I brought up this post. Because in Entryway the imps' bounding boxes are inside the walls but they aren't stuck. Thanks for the link.

Are those cacodemon damage frequencies real? I find them rather random! Interesting if they are, but I'm skeptical.

Another thing I don't understand: A caco's map speed is 56 units per second, which is 7 times more than his bit speed of 8. A demon's map speed is 175 units per second which is 17.5 times faster than is bit speed. Why aren't these two numbers linearly correlative?

Says here Arch-vile is 128 wide. I think it's more like 40.

I think I like the beta lost souls more! The one's that made into the game are a little too cutesy.


Sorry, I misunderstood your initial post. Retard point for me!

Let's see if I can get another retard point under my belt if I'm wrong on this one... A map unit may be very different from bit speed... Like the disparity between Fahrenheit and Celsius temperature measurements. It would explain how a higher map speed is x times more than bit speed... I'm sure there may be monster data that disproves my assertion, though.

Can we get a Doom engine expert on this one? Quasar...? Anyone?

Share this post


Link to post

woops, not in the wall, but on each other. They are overlapping! So the question should be, how much can monsters overlap before they're stuck together--and it is it the same for each monster? or does the amount of units that the monsters can tolerate become proportionately larger for larger monsters?

Share this post


Link to post
Ajapted said:

in-game everything is a square box for doing collisions.


I never knew that: I always assumed it was a cylinder.

This has interesting implications.

Which direction does the collision square (cube?) face? Is it always aligned with the map such that it has 2 edges going east-west and 2 going north-south, or does it always face in a direction such that one of the square's edges is perpendicular to the direction the actor is looking? Or is it something crazy and different which nobody would have imagined without looking at the source code?

Share this post


Link to post
Spleen said:

Is it always aligned with the map such that it has 2 edges going east-west and 2 going north-south


Yes.

If you want to see the square bounding boxes in action, try this: Make a little room with two sharp "spikes" jutting out of the walls - one spike that juts straight east, west, north or south, and one that juts a diagonal direction - NW, NE, SW or SE. Load this map up, and try to walk directly into the spikes.

You'll easily be able to keep walking into the first spike after you touch it without sliding off to its side, but when you walk into the diagonal spike, you'll slide off to the side instantly, because you're trying to balance one corner on another corner.

Share this post


Link to post
Creaphis said:

Yes.

If you want to see the square bounding boxes in action, try this: Make a little room with two sharp "spikes" jutting out of the walls - one spike that juts straight east, west, north or south, and one that juts a diagonal direction - NW, NE, SW or SE. Load this map up, and try to walk directly into the spikes.

You'll easily be able to keep walking into the first spike after you touch it without sliding off to its side, but when you walk into the diagonal spike, you'll slide off to the side instantly, because you're trying to balance one corner on another corner.


This is why a corridor that is at a 45 degree angle in the map editor (ie, in a NW-SE or NE-SW direction) it has to be 90 units wide for a cacodemon to go down it but only 64 units wide if it's going north-south or west-east.

Share this post


Link to post
Hellbent said:

woops, not in the wall, but on each other. They are overlapping!

The ones overlapping have different skill flags, hence they never show up in-game at the same time.

Monsters can never overlap walls or each other, otherwise they cannot move (though some source ports might be more tolerant, e.g. Boom allows players stuck in a wall to get out).

Share this post


Link to post
Ajapted said:

The ones overlapping have different skill flags, hence they never show up in-game at the same time.

Monsters can never overlap walls or each other, otherwise they cannot move (though some source ports might be more tolerant, e.g. Boom allows players stuck in a wall to get out).

Check again. the 3 imps behind the secret door where the lift is are all overlapping and are all flagged for skill 4.

Share this post


Link to post

Yes I just noticed myself. Weird.

I'm guessing a monster is not "stuck" if the overlapping distance <= the speed of a monster. In this case, the imps are overlapping by 8 units and the speed (distance a monster moves in each A_Chase call) is also 8 units.

Share this post


Link to post
Ajapted said:

Yes I just noticed myself. Weird.

I'm guessing a monster is not "stuck" if the overlapping distance <= the speed of a monster. In this case, the imps are overlapping by 8 units and the speed (distance a monster moves in each A_Chase call) is also 8 units.

hmm.. so arch-viles would have a 15 unit tolerance for overlap? Revenants 10. I dunno, I guess I could screw around with it.. I'm surprised fraggle or quasar or some other doom guru hasn't chimed in yet.

Share this post


Link to post
Creaphis said:

Yes.

If you want to see the square bounding boxes in action, try this: Make a little room with two sharp "spikes" jutting out of the walls - one spike that juts straight east, west, north or south, and one that juts a diagonal direction - NW, NE, SW or SE. Load this map up, and try to walk directly into the spikes.

You'll easily be able to keep walking into the first spike after you touch it without sliding off to its side, but when you walk into the diagonal spike, you'll slide off to the side instantly, because you're trying to balance one corner on another corner.


Very interesting, thanks!

The applications I was thinking were of combat, especially that involving super shotguns - moving diagonally of an opponent to launch an attack, then moving vertically/horizontally of them when they attack.

Share this post


Link to post

This is not so weird at all, it is due to the simplicity of Doom's collision detection.



When the monster moves, it uses a simple formula:

next_position = current_position + velocity_vector

current_position is shown red in the image. Notice how it is stuck in the wall (black). next_position is shown green in the image. The velocity_vector has the length of the monster speed (blue arrow in the image). Before the monster actually moves, it checks if it can stand at next_position. If that position is valid, it will move, even though it was stuck in a wall. So only if you put a monster deep enough in the wall (deeper than it's movement velocity in map pixels) it's next_position in all directions will also be stuck in that wall and then it won't move.

Share this post


Link to post

If you want to see the bounding boxes in game, use Zdoom (or GZdoom) and type am_cheats 3 at the console. This makes the automap look like iddt iddt but also adds the bounding boxes of the actors.

Share this post


Link to post
CodeImp said:

This is not so weird at all, it is due to the simplicity of Doom's collision detection.



When the monster moves, it uses a simple formula:

next_position = current_position + velocity_vector

current_position is shown red in the image. Notice how it is stuck in the wall (black). next_position is shown green in the image. The velocity_vector has the length of the monster speed (blue arrow in the image). Before the monster actually moves, it checks if it can stand at next_position. If that position is valid, it will move, even though it was stuck in a wall. So only if you put a monster deep enough in the wall (deeper than it's movement velocity in map pixels) it's next_position in all directions will also be stuck in that wall and then it won't move.

Ajapted said:

Yes I just noticed myself. Weird.

I'm guessing a monster is not "stuck" if the overlapping distance <= the speed of a monster. In this case, the imps are overlapping by 8 units and the speed (distance a monster moves in each A_Chase call) is also 8 units.


So Ajapted was right. So is this true for monsters overlapping walls or just other monsters? I had an arch-vile in a 40 wide hallway in a map I've been working on but it was stuck (well, it had no where to go... so bad test) Thanks for the clarifications.

Share this post


Link to post
Hellbent said:

Another thing I don't understand: A caco's map speed is 56 units per second, which is 7 times more than his bit speed of 8. A demon's map speed is 175 units per second which is 17.5 times faster than is bit speed. Why aren't these two numbers linearly correlative?

Because the "bit speed" is how far he moves every frame of animation, not during a fixed time interval.  Really fast monsters like arch-viles change frames more often, which makes the "map speed" increase more.  (This is not explained very well in the wiki table, I suppose.)

Are those cacodemon damage frequencies real? I find them rather random! Interesting if they are, but I'm skeptical.

*LOL*   They're as real as we've managed to make them so far (see previous discussion here for example).  Can you be more specific in your skepticism?

Share this post


Link to post

I just remembered something regarding stuck monsters...while working on the currently ongoing 1024 project, in one of my maps there were some monsters that were stuck in walls in Eternity, while they worked properly in prboom and Zdoom. So apparently some ports have slightly different ways to handle monster movement.

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
×