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

Does the map move in relation to the player or vice versa in Doom?

Recommended Posts

I'm watching this tutorial from 3DSage, and he says that it's the map that moves, not the player. Is this actually true in OG Doom?
vid link:

 

Share this post


Link to post

this tecnically counts as a self bump, but actually, how does it work in wolf3d? and build engine games?

Share this post


Link to post

The map stays still and the player (and other actors) move around within it. You can confirm this by checking the coordinates of the player in the automap in any ports that allow you to see that info

Share this post


Link to post

It's an abstract concept, in other words; neither is true. The renderer doesn't know or care about anything where the player is, it has no concept of location of the player or map. All it's told is to render the map from a certain coordinate at a certain angle. Someone more qualified to talk about the topic will have to back this up though.

7 minutes ago, Doomkid said:

The map stays still and the player (and other actors) move around within it. You can confirm this by checking the coordinates of the player in the automap in any ports that allow you to see that info

OP is talking about from a rendering context.

Share this post


Link to post
22 hours ago, Individualised said:

It's an abstract concept, in other words; neither is true.

So, TL;DR: it doesn't matter?

Share this post


Link to post
39 minutes ago, jmpt16 said:

So, TL;DR: it doesn't matter?

It doesn't. 3DSage is explaining it this way to to teach the viewer how a 3D game world is drawn on the screen relative to the player's position. The video doesn't mean that the map has some sort of position and angle value that changes when the player "moves", doing it that way would make no sense. The map has no such position property, obviously the player does. 3DSage explained this in a quite confusing way as it gives novice programmers the impression that such is a thing. It's similar to how older Doom mapping tutorials/books would explain the limitations of the engine by saying that Doom is a 2D game. Unfortunately that one stuck around.

Edited by Individualised

Share this post


Link to post
23 hours ago, Doomkid said:

The map stays still and the player (and other actors) move around within it. You can confirm this by checking the coordinates of the player in the automap in any ports that allow you to see that info

That doesn't actually mean the player is moving though. I have next to no familiarity with DOOM's source code itself, but I have coded enough little game prototypes to know that what usually happens is the player coordinates are just some numbers that change with certain user inputs, and those numbers are used to calculate where to render the level relative to the player (and the player relative to the screen).

 

You can interpret this to mean either the player or the level is moving, both are valid interpretations, neither is tecnhically true.

Edited by QuotePilgrim : a bunch of typos

Share this post


Link to post

Why do I get the feeling "the map moves, but the player doesn't!" is about to become the next "Doom is actually a 2D game!"

Share this post


Link to post
11 minutes ago, QuotePilgrim said:

That doesn't actually mean the player is moving though. I have next to not familiarity with DOOM's source code itself, but I have coded enough little game prototypes to know that what usually happens is the player coordinates are just some numbers than change with certain user inputs, and those numbers are used to calculate where to render the level relative to the player (and the player relative to the screen).

 

You can intepret this to mean either the player or the level is moving, both are valid interpretations, neither is tecnhically true.

You articulated what I was trying to say much better than I could have. OP, this is the answer you're looking for.

Share this post


Link to post

We're all stationary, but the entire universe moves in the opposite direction as we walk around.

Share this post


Link to post
50 minutes ago, Shepardus said:

If the map moves and not the players, what do you think happens in multiplayer?

 

QPU misalignment

Share this post


Link to post
58 minutes ago, Shepardus said:

If the map moves and not the players, what do you think happens in multiplayer?

OP is talking about from a rendering perspective and not game logic, or at least I assume so given the context (the video linked).

Share this post


Link to post
3 hours ago, ShallowB said:

Why do I get the feeling "the map moves, but the player doesn't!" is about to become the next "Doom is actually a 2D game!"

 

yes this is exactly what I was going to say and I am SO READY FOR IT

 

3 hours ago, QuotePilgrim said:

That doesn't actually mean the player is moving though. I have next to no familiarity with DOOM's source code itself, but I have coded enough little game prototypes to know that what usually happens is the player coordinates are just some numbers that change with certain user inputs, and those numbers are used to calculate where to render the level relative to the player (and the player relative to the screen).

 

You can interpret this to mean either the player or the level is moving, both are valid interpretations, neither is tecnhically true.

 

At first I also thought along the "nothing is actually moving" line, but then again how do you define movement in meatspace? Changing position relative to some reference. In Doom, the player's position changes relative to the coordinates 0,0,0. The map can move in certain instances, but the majority of it is locked to the coordinates forever.

Share this post


Link to post

I believe that way of explaining things comes from hardware accelerated rendering tutorials.  The natural thing that people want to do at first is to just feed their map into the API as-is and specify a camera location, but I believe the second part is not possible in the APIs (haven't done a lot of hardware rendering myself).  So tutorials would explain that you have to move the world instead of the camera.  Ultimately as has been said in this thread this is just about how the math for projection is relative to the camera so the first step is effectively to subtract the cameras location from coordinates (which could be seen as moving the world around the camera).

 

However, when you look at the play-sim code (the non-renderer parts) the player object is indeed the thing that's moving.  Otherwise it would be really difficult to do multiplayer.

Share this post


Link to post

Nothing moves, everything is a illusion that remains stationary.
 

Spoiler

What is actually true in video rendering lol

 

Share this post


Link to post

No, only the player is moving, the level never moves even when it comes to rendering. Especially for Doom.

"But Edward, the camera needs to be at zero!", graphics rendering doesn't have a camera, it has a frustum you project into. You are not telling a graphics API where to start drawing a level, you are telling the graphics API what you want to draw via a matrix projected into screen space. The coordinate information isn't the same thing at all as the level (nor would you want to draw that way most of the time, it can become too much data). Simply, you project in a hardware renderer, you don't place a camera.

 

Funnily enough this only covers a hardware renderer, however that's not Doom in the traditional sense. Doom's software renderer is a different story where you can more easily argue there is a camera as part of its draw process, where the render instructions start collecting BSP information from. All this math is done relative to the camera position because the level data is already optimized to do that as quickly as possible. That was the whole point. It then all gets converted to 2D screen space math to finally draw the pixels.

Share this post


Link to post

He's describing the coordinate translation that happens as part of the rendering process. It's a silly way of describing it - nothing really moves around, it's just that an offset gets added to the world coordinates when the screen is rendered.

Share this post


Link to post
4 hours ago, magicsofa said:

At first I also thought along the "nothing is actually moving" line, but then again how do you define movement in meatspace? Changing position relative to some reference. In Doom, the player's position changes relative to the coordinates 0,0,0. The map can move in certain instances, but the majority of it is locked to the coordinates forever.

Even in real life, if you move from your living room to the bathroom, it is perfectly valid to think of it as you being stationary as your house moves around you. That's what a frame of reference is. That is why I said both ways of looking at it are valid, and both are technically not the truth. There is no true interpretation, movement is relative.

 

If you're just playing the game, it makes sense to think of it as the player is moving and the environment is not, but when you are programming movement in a game, what you are doing, usually, is making the environment move according to what the player's coordinates are. Look at the automap in DOOM, the little arrow that represents the player is always at the same spot on the screen as the map rotates and moves around. Or just look at gameplay in general, what is the thing that you actually see change position in the screen? Is it the player or the environment around the player?

Share this post


Link to post
9 hours ago, DELTA256 said:

In soviet russia, map moves, not player!

AUTOMAP REVEAL YOU!!

This also reminds me of the old Chuck Norris joke where he doesn't walk anywhere, the Earth rotates under his feet and brings his destination to him.  

Share this post


Link to post
2 hours ago, SMG_Man said:

 

you can turn off "Follow mode" by pressing 'F' and still move the player around using strafe keys and the mouse, you know

 

image.png

 

 

The point I'm making isn't that the map moves and the player doesn't. The point that I'm making is that both interpretations are valid. Thank for proving my point.

 

So, let me state this a little more clearly. It is true that the player has a set of coordinates relative to the world origin, which change according to some user inputs and other things that happen in the game. You can think of those numbers changing as the player moving relative to the level. As a player it makes more sense to think of the player character moving, because that what's happening conceptually.

 

It is also true that the way the level is rendered consists of calculating what parts of the level to draw on the screen relative to what the player coordinates are. You can think of this as the level moving relative to the screen/player. As a programmer it makes more sense to think of the level as moving, because it's the thing that you actually see move on the screen as the player coordinates change.

 

The player moves relative to the level, the level moves relative to the player. Both statements are equally true. This exactly what I said from my very first comment.

Edited by QuotePilgrim

Share this post


Link to post
3 hours ago, QuotePilgrim said:

As a programmer it makes more sense to think of the level as moving, because it's the thing that you actually see move on the screen as the player coordinates change. 

As a programmer I actively do not think this at all.

 

It frankly makes more sense to think of rendering as standing in a spot in the level and reading out drawing instructions over an RT to someone else in a completely different location who is drawing your instructions onto a canvas.

Share this post


Link to post
41 minutes ago, jmpt16 said:

is it safe to assume i struck some kind of nerve?

Not really, I just see metaphysical discussion on the nature of what it means to "move," and also confusion over what's frankly a very vague question.

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
×