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

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [WIP] Setting TICRATE via (Z)MapInfo's GameInfo.

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

by Rachael » Mon Mar 04, 2019 12:51 pm

@ Graf: Should we close and reject this, or do you have any reason to keep it open?

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

by Surface2EvilShotgun » Thu Feb 07, 2019 9: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.

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

by Chris » Sat Feb 02, 2019 7: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.

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

by Surface2EvilShotgun » Sat Feb 02, 2019 10: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.

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

by Rachael » Thu Jan 31, 2019 3: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.

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

by Graf Zahl » Thu Jan 31, 2019 1: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.

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

by Arctangent » Thu Jan 31, 2019 12: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.

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

by Rachael » Thu Jan 31, 2019 11:26 am

That is correct. Or they are precalculated based on 35, which is even harder to find.

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

by Marisa the Magician » Thu Jan 31, 2019 11:23 am

I'm guessing a lot of things don't use the TICRATE variable and instead have a hardcoded "35" in their math.

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

by Surface2EvilShotgun » Sat Jan 26, 2019 12: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 all

gameinfo
{
	TICRATE = 70
}

Top