Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 60hz 30tics 320x240/640x480 video mode #140

Open
TheCyberCafeMAN opened this issue Apr 2, 2023 · 5 comments
Open

Implement 60hz 30tics 320x240/640x480 video mode #140

TheCyberCafeMAN opened this issue Apr 2, 2023 · 5 comments
Labels
graphics help wanted Extra attention is needed

Comments

@TheCyberCafeMAN
Copy link

TheCyberCafeMAN commented Apr 2, 2023

to prevent jittering/frame pacing in the game and improve compatibility in certain monitors

@TheCyberCafeMAN TheCyberCafeMAN changed the title Implement 60hz 30tics video mode Implement 60hz 30tics 320x240/640x480 video mode Apr 2, 2023
@dougvj
Copy link
Contributor

dougvj commented Dec 30, 2023

My changes for #81 could accommodate this but I don't know how to force 60hz without VESA 3.0, which dosbox etc doesn't support. I haven't checked if any other emulators support it, I can try to test with those and some real hardware

@viti95
Copy link
Owner

viti95 commented Jan 5, 2024

Yep, refresh rate setting is only supported on VBE 3.0 devices (for example with VBEhz TSR). I think this only could work well if we implement some kind of frame interpolation to get more than 35 fps. Also this could only be tested on real hardware, emulators don't care at all about this VBE 3.0 feature.

@viti95 viti95 added help wanted Extra attention is needed graphics labels Jan 5, 2024
@dougvj
Copy link
Contributor

dougvj commented Jan 6, 2024

I think I have VESA 3.0 hardware, I would be willing to test this out. I know there was some experimental support for VRR in dosbox-x to get 70hz, I am not sure if that went anywhere, but it would be interesting to extend that with VESA 3 support.

I think this only could work well if we implement some kind of frame interpolation to get more than 35 fp

By frame interpolation do you mean interpolation of the velocity/animation state? That would work.

Unclear why we can't run the engine at a higher rate though, is that related to why the uncapped framerate option was dropped?

@viti95
Copy link
Owner

viti95 commented Jan 6, 2024

I dropped the uncapped framerate option because it was running internally at 35 ticks/second and no interpolation was made at all, so visually it was 35 fps although generating as much frames as possible. And yes, by frame interpolation I mean player / sprites movement interpolation, similar to what GZDoom and similar ports do (this is the hard part, at least for me). I really like this idea, and really want it to be on FastDoom.

@dougvj
Copy link
Contributor

dougvj commented Jan 8, 2024

I like that idea too, I will look into in the coming weeks

dougvj added a commit to dougvj/FastDoom that referenced this issue Feb 11, 2024
Changes needed to accomplish this:
- Readded uncapped FPS option
- Increased the timer interrupt from 35 Hz to 560 Hz (x16)
- Added interpolation to sprite, view, and floor/cieling routines.

This saves the following values between two gametics:

- All things (m_objt) x, y, and z positions, includes the player
- All sectors ceiling and floor heights.
- Player viewz

Values are only saved when uncappedFPS is enabled.

Known bugs:
- When on lifts, the interpolation is not quite correct. Doors seem
  correct, which uses the same code, so there is some interaction with
  viewz perhaps that is problematic
- There is something off with the menu rendering with the extra option

This will allow work to proceed to handle viti95#140 with custom refresh rates
that better accomodate modern displays
dougvj added a commit to dougvj/FastDoom that referenced this issue Feb 11, 2024
Changes needed to accomplish this:
- Readded uncapped FPS option
- Increased the timer interrupt from 35 Hz to 560 Hz (x16)
- Added interpolation to sprite, view, and floor/cieling routines.

This saves the following values between two gametics:

- All things (m_objt) x, y, and z positions, includes the player
- All sectors ceiling and floor heights.
- Player viewz

Values are only saved when uncappedFPS is enabled.

Known bugs:
- When on lifts, the interpolation is not quite correct. Doors seem
  correct, which uses the same code, so there is some interaction with
  viewz perhaps that is problematic
- There is something off with the menu rendering with the extra option

This will allow work to proceed to handle viti95#140 with custom refresh rates
that better accomodate modern displays
dougvj added a commit to dougvj/FastDoom that referenced this issue Feb 11, 2024
Changes needed to accomplish this:
- Readded uncapped FPS option
- Increased the timer interrupt from 35 Hz to 560 Hz (x16)
- Added interpolation to sprite, view, and floor/cieling routines.

This saves the following values between two gametics:

- All things (m_objt) x, y, and z positions, includes the player
- All sectors ceiling and floor heights.
- Player viewz

Values are only saved when uncappedFPS is enabled.

Known bugs:
- When on lifts, the interpolation is not quite correct. Doors seem
  correct, which uses the same code, so there is some interaction with
  viewz perhaps that is problematic
- There is something off with the menu rendering with the extra option

This will allow work to proceed to handle viti95#140 with custom refresh rates
that better accomodate modern displays
dougvj added a commit to dougvj/FastDoom that referenced this issue Feb 13, 2024
Changes needed to accomplish this:
- Readded uncapped FPS option
- Increased the timer interrupt from 35 Hz to 560 Hz (x16)
- Added interpolation to sprite, view, and floor/cieling routines.

This saves the following values between two gametics:

- All things (m_objt) x, y, and z positions, includes the player
- All sectors ceiling and floor heights.
- Player viewz

Values are only saved when uncappedFPS is enabled.

Known bugs:
- When on lifts, the interpolation is not quite correct. Doors seem
  correct, which uses the same code, so there is some interaction with
  viewz perhaps that is problematic
- There is something off with the menu rendering with the extra option

This will allow work to proceed to handle viti95#140 with custom refresh rates
that better accomodate modern displays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphics help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants