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

how source port allow a 2.5d game look up and down

Recommended Posts

Hi, i have a question. Can anybody explain to me how the source port these days can make a 2.5D game able to look up and down?? Cause the 3d we see in Doom, they are not real are they?? People been saying they are an illusion, 2d data with added height data, and there are no real 3d model inside the game. So how can this gimmick be achieved??

Share this post


Link to post

Yeah, the zdoom wiki article looks like a good explanation. You're basically moving the view up and down in a vertically expanded viewport.

The fundamental limitation is that the Doom engine can only render vertical walls, so you can never look straight up or down, and the y shearing trick becomes increasingly distorted the further away you get from a normal straight-ahead view.

Share this post


Link to post

And don't forget that this kind of "freelook" was actually added by Heretic back in 1994, so it's definitively not something new for the Doom engine. It's also relatively simple to implement, requiring only minor changes to the rendering code.

Share this post


Link to post

It wasn't system limitations that kept free look from being in Vanilla Doom, it was the ID team deciding that looking around freely was a big too complicated for players and that auto-aiming would be easier for them. Even Quake didn't have free look on by default, until an update. Personally, I prefer free look because Doom's auto-aim can sometimes be hit or miss depending on the distance and how high up the target is, free look puts all the power into my hands so, if I miss, it's my own damn fault.

Share this post


Link to post

I am sorry. I should be referring to freelook. Bad game vocabulary on my part.

and how much harder can the code be applied??

Share this post


Link to post

Autoaim and freelook are two different things in the Doom engine BTW. You can have one without the other. Heretic used a slightly modified autoaim algorithm, which also tried to take into account the player's view pitch, but that's it. It could miss or choose an unintended target just as much as Doom's.

Share this post


Link to post
Danfun64 said:

O.O

...wait. Are you asking how difficult this code is to implement or... *shudders*


i did actually referring to the difficulty of implementing such code. sorry bad english.

Share this post


Link to post

It's not very difficult, and it has been added in Heretic so you can use that as a guide.

In fact it was kinda-sorta implemented in one of the Doom alphas. Not as something controlled by the player, but just as the way the view looked "down" a bit depending on screenblocks setting.

Share this post


Link to post

Y-Shearing is also present in id software's first 3D title Hovertank 3D. Not user controlled, but the exact same thing regardless.

Share this post


Link to post

I finally found out the confusion. I am actually referring to the true freelook system in Zdoom not y-shearing, so may I ask is Zdoom a 3d game?? and if yes, is it possible to export the map into 3d software??

Share this post


Link to post

ZDoom is not "true" 3D, but ports like GZDoom are - when you load a level in it, it converts the level to polygons and what have you.

A Doom map editor, GZDoom Builder, has functionality to let you export Doom levels to a format usable in 3D modelling software.

Share this post


Link to post
keithktam said:

I am actually referring to the true freelook system in Zdoom not y-shearing

Freelook in ZDoom is Y-shearing. The thread has been telling you this the whole time. It doesn't have anything else as it's not actually a 3D renderer.
Are you thinking of GZDoom, which actually is a 3D renderer?

Share this post


Link to post
Linguica said:

ZDoom is not "true" 3D, but ports like GZDoom are - when you load a level in it, it converts the level to polygons and what have you.

A Doom map editor, GZDoom Builder, has functionality to let you export Doom levels to a format usable in 3D modelling software.


can you give me links, please?


I am just trying to understand how graphic works in game, so my next question is how does a 2.5d game being rendered?? I know a height "data" is added to the engine, but can someone explain it a bit more detail??

thanks

Share this post


Link to post

You claimed that Doom is 2D and that its 3D appearance is some illusion, but that's at least debatable, and IMO, it's outright a myth that is incorrect. When you play Doom, the game environment is actually 3D - with a couple limitations:

-Every point on the (x,y) plane has exactly 1 floor height and exactly 1 ceiling height, and no game object can exist below said floor height or above said ceiling height.
-Solid game objects cannot vertically overlap (be above or be below) each other. (But non-solid objects such as projectiles or corpses can vertically overlap (be above or be below) solid objects or each other perfectly well.)

Aside from that, both rendering and colllision detection in the Doom engine use algorithms akin to those in true 3D engines, just with a kind of "optimizations" for the abovementioned limitations that increase the engine's speed.

Share this post


Link to post
scifista42 said:

-Solid game objects cannot vertically overlap (be above or be below) each other. (But non-solid objects such as projectiles or corpses can vertically overlap (be above or be below) solid objects or each other perfectly well.)


Actually they can, if you don't mind stuck monsters, but it's hard to force overlapping in actual gameplay except in pathologically designed levels.

scifista42 said:

You claimed that Doom is 2D and that its 3D appearance is some illusion, but that's at least debatable, and IMO, it's outright a myth that is incorrect.


After 23 years, I don't think there's any doubt that Doom isn't a fully 3D game, and 2.5D is a generally accepted categorization. The gameplay itself is almost fully 2D, as you mentioned, with only few elements hinting to a third dimension. In fact, you could perfectly play Doom with just a top-down Asteroids-like view in the automap, if there weren't ambiguous situations like e.g. whether you can could safely run under a projectile, or height-related puzzles. It's not as 3D as e.g. Descent or Pyrotechnica (which also had 6-axis controls to show for it and full freedom of movement), but not completely 2D like e.g. Tower Assault. You could say it's a 3D projection of a 2D world (actually, of two 2D worlds: the floor and ceiling).

Share this post


Link to post
scifista42 said:

Aside from that, both rendering and colllision detection in the Doom engine use algorithms akin to those in true 3D engines, just with a kind of "optimizations" for the abovementioned limitations that increase the engine's speed.

Nah, the collision detection is a good example of how Doom isn't a true 3D engine. Collisions on the X and Y axes are checked in a different function and at a different time and in a different way than collisions on the Z axis. In a true 3D engine, collisions on all axes are checked simultaneously, and identically, in the same function; in Doom vertical collisions are an afterthought tacked on horizontal collisions in a clumsy manner.

Share this post


Link to post

^ Infinitely tall actors, for one.

Share this post


Link to post
Maes said:

The gameplay itself is almost fully 2D, as you mentioned, with only few elements hinting to a third dimension.

I'd say it's almost fully 3D, except the third axis is implemented as a bunch of hacks. Yet it's there.

Share this post


Link to post
Da Werecat said:

I'd say it's almost fully 3D, except the third axis is implemented as a bunch of hacks. Yet it's there.


OK then aim and shoot at something flying directly above your head ;-)

OK, TBQH, you can't actually do that in many modern AAA shooters, either, but for entirely different reasons.

Well, then try simply jumping off a ledge with monsters swarming beneath it (in the original .exe, not Boom or ZDoom).

But the best way to understand 2.5D gameplay IMO is to try ZDoom's flyby mode: you essentially move like an airship: almost complete control in the X and Y axis, but changing altitude is a much more complicated and slow affair.

Share this post


Link to post
kuchitsu said:

Is the sound 3D too?

No.

kuchitsu said:

Will I hear a cyberdemon 20000 units below but right next to me?

Yes. You'd need another hack for that.

Share this post


Link to post
kuchitsu said:

Is the sound 3D too? Will I hear a cyberdemon 20000 units below but right next to me?


The sound distance calculation is even more broken: you may hear sounds across the map as coming from the room next to you, and the linearity is also horrible. Getting an accurate lock on something's general direction based on sound alone is generally a losing proposition: you can only acknowledge that something exists somewhere and that's it.

Regarding the 20000 unit distance, I recall that the "approximate distance function" used has a wraparound around 14000 units (!), so anything relying on it will actually be broken.

Share this post


Link to post
Maes said:

The sound distance calculation is even more broken: you may hear sounds across the map as coming from the room next to you, and the linearity is also horrible. Getting an accurate lock on something's general direction based on sound alone is generally a losing proposition: you can only acknowledge that something exists somewhere and that's it.

I don't remember it being that bad. Unless you're trying to test the limits of the engine or something.

Share this post


Link to post

It doesn't take much to test the limits: try a map with something that continuously generates sound (esp. crushers) and walk around it: you'll be able to hear them quite loud even in rooms that are quite far away and have no obvious sound connection, and not hear them in rooms that are geometrically closer. Even if you know their precise direction from your location and wear headphones, turning yourself around will result in an unnatural change in volume and perceived position.

Ofc, this is not a general rule: some maps seem to work fine and sounds stay confined within reasonable distances, getting louder only as you approach, while in others there are unnatural fluctuations in volume, partly because of the "approximate distance" function.

BTW, 14000 units are not a lot, considering the map coord space ranges from -32K to 32K, so any above-average size map is susceptible. It just happens that sound is one of the few subsystems that actually uses this function regularly and is also likely to stretch it to its limits. It's also possible -though very unlikely- to be remotely hit by melee attacks by monsters that are in your same sector number and thus mistakenly conclude that you're within striking range, if you happen to be at one of the wraparound distances. You'd need a single very large sector or a bunch of smaller sectors with the same number for this to happen, though.

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
×