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

I have a question about gzdoom and zdoom.

Recommended Posts

How did they creators of zdoom and gzdoom make it so the player is able to look up and down jump and fly? I really want to know i am very curious!

Share this post


Link to post

In ZDoom, the player's viewspace (aka the camera) is shifted up or down, to give the illusion of looking up and down, yet it doesn't have perspective correction so naturally it can get distorted if you look too high or too low.

 

In GZDoom, there's no rendering limitation and the world is rendered more or less like a polygonal 3D game, so no screen shift tricks needed. But the Software renderer also got full up and down looking, in the way of the Softpoly Render, which is like the Quake renderer but in Doom.

 

As for flying, the code is inherited from Heretic/Hexen, it's nothing special at all because it's just setting the player's height to a different value and this is easily possible even by RAM editing Vanilla Doom.

Share this post


Link to post

Jumping isn't complicated, it's just adding a new input key and giving some upward vertical momentum to the player if they're currently on the ground (or a thing).

 

Flying is quite simple, too, just disable the gravity code and update movement direction to also take the pitch into account. It's not actually the Raven code because this one required dedicated "fly up" and "fly down" buttons, if you look up or down while flying in vanilla Heretic or Hexen, you don't move up or down, you stay at your current altitude.

 

Looking up and down in the original software renderer is done by Y-shearing.

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
×