[No] [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Moderator: GZDoom Developers

[WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Surface2EvilShotgun » Sat Jan 26, 2019 1:34 pm

GitHub link.

I'm working on a pull request to allow setting the TICRATE via (Z)MAPINFO's GAMEINFO section. This would be useful for TCs that want to run at a different tic rate than Doom (PS1/N64 Doom TCs would benefit from 30 tics, Wolfenstein TCs would benefit from 70 tics, and I can imagine 60 tics being a popular choice for certain mods). I'd like to avoid the end user having to change everything's speed and gravity, only their states. I was going to wait until I finished it before posting here, but I'm having issues getting movement to feel correct at ticrates other than 35. I've been testing with tic rates 10, 35, 70, and 700. Sliding against the wall is currently the wrong speed. Jumping and gravity are close, but aren't *quite* perfect (at 700 tics, DoomGuy will grunt from this own jumps). Friction is absolutely busted. At a ticrate of 10, you slide much futher, and at a ticrate of 700, you stop on a dime. I've tried various methods to counteract the friction, but they've been fruitless. I'd appreciate any advice.

To test this, create a ZMAPINFO with the following contents:
Code: Select allExpand view
gameinfo
{
   TICRATE = 70
}
Surface2EvilShotgun
 
Joined: 24 Jan 2019

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Marisa Kirisame » Thu Jan 31, 2019 12:23 pm

I'm guessing a lot of things don't use the TICRATE variable and instead have a hardcoded "35" in their math.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Rachael » Thu Jan 31, 2019 12:26 pm

That is correct. Or they are precalculated based on 35, which is even harder to find.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Arctangent » Thu Jan 31, 2019 1:56 pm

I feel like changing how speed and gravity work would be less intuitive than just keeping them as-is. I mean, having to work with speed in terms of MU per 1/35ths of a second in your 60fps project is pretty arbitrary instead of just working with MUs per 1/60ths of a second, especially when your actor's states are all bound to whatever framerate your game is working at to begin with.
User avatar
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Graf Zahl » Thu Jan 31, 2019 2:28 pm

TBH I don't see this working out. The changes are far too extensive and often far too subtle and I think it speaks volumes that basically no port has ever tried - and those who did try to mess around with this ultimately fail to properly run the game.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Rachael » Thu Jan 31, 2019 4:11 pm

Also it just isn't a good idea to have a high tic rate. There needs to be an upper limit and it needs to be lower than 70. Probably 50 is the very most, but that's stretching it. The biggest problem here is network and demo compatibility - higher tic rates will demand much more throughput in bytes per second - and that's going to be an even bigger issue going forward with the change in network model since that will necessitate the server sending much more data than it currently is.

Remember - Quake has a tic rate of 10 tics per second. MMORPG's have an even lower tic rate (EverQuest, for example, has a 1/6th per second tic rate - i.e. it only tics once every 6 seconds!).

Doom is one of the games with the highest tic rates ever. Even Build engine games run at only 30 tics per second.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Surface2EvilShotgun » Sat Feb 02, 2019 11:08 am

Rachael wrote:Remember - Quake has a tic rate of 10 tics per second. MMORPG's have an even lower tic rate (EverQuest, for example, has a 1/6th per second tic rate - i.e. it only tics once every 6 seconds!).
They don't limit the animations to the ticrate, right? Maybe I should take that approach instead.
Surface2EvilShotgun
 
Joined: 24 Jan 2019

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Chris » Sat Feb 02, 2019 8:12 pm

Surface2EvilShotgun wrote:
Rachael wrote:Remember - Quake has a tic rate of 10 tics per second. MMORPG's have an even lower tic rate (EverQuest, for example, has a 1/6th per second tic rate - i.e. it only tics once every 6 seconds!).
They don't limit the animations to the ticrate, right? Maybe I should take that approach instead.

Don't know about those games specifically, but it is possible to limit animations and physics to a low ticrate and interpolate them for between-tic frames, giving the appearance of more detailed animation and movement. It's how you can get smooth results on 100+hz monitors even if the game logic updates 30 or 60 times a second. ZDoom interpolates physics/object positions IIRC, so objects appear to move smoothly with 35+hz refreshes, but you can't interpolate sprite animation as easily as skeletal animation, so those will still appear limited.
User avatar
Chris
 
Joined: 17 Jul 2003

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Surface2EvilShotgun » Thu Feb 07, 2019 10:20 pm

Yeah, but if you have more frames of animation than tics, you could theoretically "interpolate" between them, in the sense that if you've got a 35 ticrate game, you could have several frames that take place in 1 tic, but are displayed over several frames in between the beginning and the end of the tics. This is possible with the animated textures, for example. Those, however, are only loosely tied to tic-rate, unlike HUD sprites. This would be a lot more logically complex than just upping the ticrate, but could be more universally used. I'd have to take a long look at the codebase to figure out how to even start tilting at this windmill, though.
Surface2EvilShotgun
 
Joined: 24 Jan 2019

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Rachael » Mon Mar 04, 2019 1:51 pm

@ Graf: Should we close and reject this, or do you have any reason to keep it open?
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

Postby Graf Zahl » Mon Mar 04, 2019 2:10 pm

Dump it.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: AFADoomer, Untitled and 1 guest