Really Stupid Question I Can't Find the Answer To

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Skunk
Posts: 1189
Joined: Tue Jan 18, 2005 1:04 am
Contact:

Really Stupid Question I Can't Find the Answer To

Post by Skunk »

How wide are the actors? Like, if I were to make a hallway, how wide would the hallway have to be for the actor to move in that hallway?
User avatar
Arch
Posts: 491
Joined: Thu Nov 10, 2011 12:06 pm
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Arch »

Depends on the actor. Imp is 20, Demon is 30, Mancubus is 48, etc etc
Here:
http://zdoom.org/wiki/Category:Doom_II_monster

Choose your actor and check its radius, that´s the number you´re asking about.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Really Stupid Question I Can't Find the Answer To

Post by ChronoSeth »

Remember that the radius of something is half of its width, so the Imp is actually 40 units wide (for example).

I think that monsters need the "hallway" to be two units wider than themselves to move through it, and players only need one unit.
User avatar
Enjay
 
 
Posts: 27234
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Enjay »

Also, FWiW, remember that "radius" is a misnomer because the actors are square when viewed from above, not round.
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Really Stupid Question I Can't Find the Answer To

Post by FDARI »

:shock: Are doom actors not cylinders of destruction?
Where did this information come from?
User avatar
Enjay
 
 
Posts: 27234
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Enjay »

I don't know where it came from but it is correct. They are cuboids of destruction, not cylinders. My best guess as to why they are often thought of as cylinders is the fact that most editors use round icons to show them and the term "radius" is used to refer to half their width.

If you want to see it in ZDoom, type am_cheat 4 at the console. That shows the actors (like iddt iddt) and their hit boxes at the automap.
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Really Stupid Question I Can't Find the Answer To

Post by FDARI »

am_cheat 3?
While alerting us that these things are cuboids, perhaps also point out that they fit more easily in straight-angled corridors, since these match their bounding box. (Found similar post on doomworld forums where enjay supplied "am_cheat 3" and pointed this out. Thought it could be good here too.)

The RADIUSxRADIUS squares need to fit (with map units to spare?) throughout the corridor, which means that diagonal passages need to be wider.
User avatar
Enjay
 
 
Posts: 27234
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Enjay »

Doh! yes, am_cheat 3, of course.

What I find interesting is how the hit box does not rotate (most easily observed in the player). With am_cheat 3 active, zoom in on the player and spin around to see the effect. The arrow rotates but the square around it does not. So, yes, with that arrangement, diagonal corridors would need to be wider than straight angled ones.

I wonder if it also explains how walking down a diagonal corridor hugging the edge has always felt a bit "sticky" with the player seemingly getting caught on the wall sometimes?
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Nash »

FDARI, I'm surprised that you, out of all people, aren't aware that actors in Doom have square collision boxes. Considering you seem to know your way around the source pretty well from what I see... :mrgreen:
Last edited by Nash on Mon Aug 06, 2012 5:49 am, edited 1 time in total.
User avatar
Blox
Posts: 3728
Joined: Wed Sep 22, 2010 9:35 am
Location: Apathetic Limbo

Re: Really Stupid Question I Can't Find the Answer To

Post by Blox »

Nash wrote:blahblahblah
tl;dr
FLYBAT wrote:What the hell man?!
I wasn't expecting that kind of question from you!
;)
User avatar
Skunk
Posts: 1189
Joined: Tue Jan 18, 2005 1:04 am
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Skunk »

Oh, so thats what that means... okay so for example the imp radius is 20... so it can occupy and move around in a space 40x400 without getting stuck in a wall?

Edit: or possibly 42x400, as someone stated monsters possibly need an extra two units.

Also, radius is a value that can be changed within inheritance right? If so, say set all the monsters to radius 4, they could fit in an 8 or 10 unit space. They should still function, right?
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Really Stupid Question I Can't Find the Answer To

Post by FDARI »

Spoiler: Offtopic
I'm not sure what "changed within inheritance" is supposed to mean, but I'll try to make a helpful explanation.

Main rule, always applies: If you set the radius property in a class, actors of that class will always have that radius.

Inheritance, relevant for unspecified properties: If one class (the "child" class) inherits from another class, it will inherit the radius of that class (the "parent" class).

If you want a class you're editing to have radius 4, just set specify its radius as 4 (unless it inherits from another class that already has the right radius; then you might want to leave it unspecified).

If you want a class that you're not editing (such as the zombieman from zdoom.pk3) to change its properties, you will probably want to create a new class that inherits from the old class. Decorate will let you replace all actors of the old class (such as zombieman) with actors of your new class (slimzombie).

Code: Select all

actor SlimZombie : ZombieMan replaces ZombieMan
{
    radius 4
}
If I did not put it well, read all about it here: [wiki]Using_inheritance[/wiki]

A radius 4 zombie should fit inside a space of 8 units, or 10 if extra space is required. It should function. It would be a bit harder to hit. Maybe even a lot. Especially without autoaim, and with sprites that make it look a lot bigger than it is. People will think they can aim at the edges, when they actually need to hit very close to the middle of their target.
User avatar
Enjay
 
 
Posts: 27234
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Enjay »

Presumably (assuming that I have the maths right - and allowing for rounding) the following is correct for a 4 "radius" actor...

Image

A 4 "radius" actor is 8 wide but the longest possible measurement inside the actor (corner to corner) is a little over 11? I've always assumed the above is correct (at least since I found out that the actors are square). However, with the term "radius" being used, it could be (however unlikely) that the "radius" of the above actor is 5.66. ie the longest possible half distance inside the actor.

Although the diagonal measurement of the above actor being 11.31 is irrelevant most of the time, the fact that actors are wider when measured diagonally does have implications for placing them in a map. An actor placed too near a diagonal wall can have one of its corners in the wall or two actors placed diagonally near each other can have their corners overlap when, if they were circles, their circumferences would not clash.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Really Stupid Question I Can't Find the Answer To

Post by Gez »

The Doom engine does a lot of computations in a simplistic manner. Generally, to find the distance between two things, it compares their positions on the X axis and the Y axis, and takes up the larger of the two values. Explosions work this way, notably. It's faster than going all Pythagoras on it and computing up square roots.

For distance to actors, it also subtract the radius to the effective distance (which is measured to the center).
User avatar
Skunk
Posts: 1189
Joined: Tue Jan 18, 2005 1:04 am
Contact:

Re: Really Stupid Question I Can't Find the Answer To

Post by Skunk »

Allow me to put it this way, Enjay: if there was an 8 unit wide hallway containing a 4 radius monster it's assumed said monster can move backward and forward, but what happens if the monster tries to turn? Does he then get stuck or is the actor's relative position used to where he started?

See the reason I ask is one complaint about Pogostick was that it was attempting sidescrolling 3D gameplay with field depth and that it made it too difficult to draw a bead on certain enemies in the levels. So what if the enemies were going in a straight line akin to the player without moving into the foreground or background, like Contra or Mega Man? Being on the same axis the gameplay would feel more like a sidescroller, hence why I am asking... since the easiest thing to do would be throwing in two impassible linedefs that prevent movement away from that line and forcing enemies to use a different radius to stay in that line.
Locked

Return to “Editing (Archive)”