1 (edited by Elviz 2007-04-27 08:01:39)

Topic: 3D settings, frame rate and replay file size

Ever since upgrading my computer (it's now much faster than before) I had wondered why many of my newly-made replay files didn't look as smooth as the older ones. Sometimes they were downright twitchy, as if recorded with a very low frame rate. In some cases key frames - such as the exact moment the ball grabbed a coin or hit the floor - appeared to be lost. When replayed, this meant that the ball would miss the coin or that no 'bump' sound would be heard, respectively. Moreover, there was the floor vibration problem. All in all, I had many nice replays ruined by all of this.

I have now found that if I open the NVIDIA control panel and set the "Vertical sync" option to "Force off", all of the above problems disappear. Now that the frame rate is no longer tied to the refresh rate of my monitor (60Hz), Neverball says that I get between 200 and 650fps depending on the level and situation. Previously, the value was stuck at about 56fps. The game feels smoother, and, what's even more important, the replays are now finally as smooth as they should be. Those crazy floor vibrations are gone, too. Hooray! smile

One consequence of this, though, is that the replay file size has increased by a factor of 7-9. This doesn't cause any storage problems for me personally, but it's unclear how the Nevertable will handle it. I'll open a topic in the Nevertable forum for this. I don't suppose there's a way to tell Neverball to limit the maximum frame rate of a replay to a given value, say, 150fps?

2

Re: 3D settings, frame rate and replay file size

This issue was brought up a while ago;  Dave coded a frame rate limiter which I later removed based on my understanding that vertical synchronization is the proper way to do it.  Without going into needless detail, recent NVIDIA drivers provide a "triple buffer" option that can be used in combination with vertical synchronization.  Could you please do some testing on what happens if you enable it for your board?

3 (edited by Elviz 2007-11-12 00:53:00)

Re: 3D settings, frame rate and replay file size

parasti wrote:

Without going into needless detail, recent NVIDIA drivers provide a "triple buffer" option that can be used in combination with vertical synchronization.  Could you please do some testing on what happens if you enable it for your board?

Setting "Triple buffering" to "On" (while returning to "Vertical sync"="On") does not seem to help. hmm

This issue was brought up a while ago;  Dave coded a frame rate limiter which I later removed based on my understanding that vertical synchronization is the proper way to do it.

I think I have found the thread you are referring to. I might agree with rlk's and your conclusion if Neverball's replay system were really WYSIWYG. Perhaps conceptually it is (I didn't check that), but based on my experiences, in reality it's not. For one reason or another, I frequently get replays that are not visual carbon copies of the played round. Instead, such a replay will show some or even all of the symptoms described in my original post.

A replay frame rate limiter (configurable via neverballrc with a default value of 150fps, perhaps) doesn't sound like a bad idea. It would allow for saving a bit more information in replays while keeping the file size reasonable. Also, I don't think players should be forced to either use vertical synchronization or be excluded from uploading replays to the Nevertable.

Note that the replay files made on my old system had between 75 and 175fps which may be the reason why I rarely encountered problems with them.

4

Re: 3D settings, frame rate and replay file size

My only objection to having code that handles the frame rate is that it would have to be a work-around.  It's trivial to implement, but the very thought that it is completely unnecessary with respect to the code performing its function suggests that, while it may not be a bad idea, it isn't a good one either.  Additionally, most people don't ever experience the problems you have on your system.

Hell, I'm considering writing a separate utility solely for the purpose of "shrinking" a replay to a certain frame rate.  Seems somewhat overkill, but what do you think?

5

Re: 3D settings, frame rate and replay file size

Does seem "overkill", but at the same time, will allow users with currently too-large replays to remedy the problem... as well as future users. As long as it can handle both 1.4 format and the upcoming 1.5, it would be quite handy.

6

Re: 3D settings, frame rate and replay file size

As I answered in an other topic, Nevertable can't handle upload file bigger than 2MB. (php limit by my host).

A good way to take care of that would be use compressed replay file. My host supports zip, I haven't tested it though. But Neverball doesn't support it yet and it seems the compression ratio is not very good (around 80-90%...)

So I agree with a tool that shrinks a replay file. It would be useful to Elviz to upload his replay oh the Nevertable wink

7 (edited by Elviz 2007-05-11 22:04:50)

Re: 3D settings, frame rate and replay file size

parasti wrote:

My only objection to having code that handles the frame rate is that it would have to be a work-around.  It's trivial to implement, but the very thought that it is completely unnecessary with respect to the code performing its function suggests that, while it may not be a bad idea, it isn't a good one either.  Additionally, most people don't ever experience the problems you have on your system.

Then again, it only takes one counterexample to disprove a theory. And if using a higher frame rate fixes replay problems such as the ones I've encountered, then surely code to manage the size of those replay files is not completely unnecessary. I'm not a friend of workarounds or bloat either, but let's be slightly less GNOME-ish about it, and slightly more KDE-ish. smile

There's another point. If I'm not entirely mistaken, the data saved in replay files isn't just needed to render frames to the screen. It also provides vital information for Neverball's game engine. Did the ball pick up a coin or activate a switch? Does a bump sound have to be played? The finer the granularity of the data (ball position, etc.), the more reliably such decisions can be made. Of course there's an upper limit of usefulness, but that's what we're talking about anyway.

Hell, I'm considering writing a separate utility solely for the purpose of "shrinking" a replay to a certain frame rate.  Seems somewhat overkill, but what do you think?

Having such a tool sounds like a good idea. Actually, it's such a good idea that I hacked together a couple of Java classes, reduced the frame rate of my M23 most-coins replay and uploaded it to the Nevertable. cool

BTW, here's a fun fact: if you take Ctoan's cH11 replay and reduce it to 60fps, floor vibrations appear. Same goes for Sebastian's cH18 record.

8

Re: 3D settings, frame rate and replay file size

Maybe it would be a good idea to cache the replay first and only after that write it to a replay file with a standardized frame rate, ie. making this "seperate ultility" parasti was talking about a part of the NB code? It seems that since hardware is going to be faster, this could soon be a problem for more and more users.

9

Re: 3D settings, frame rate and replay file size

nue wrote:

It seems that since hardware is going to be faster, this could soon be a problem for more and more users.

That's what I thought, too. Just today a user called monasd submitted a replay that has ~330fps. And, BTW, judging from the frame rate of their replays, players like mym and Dave don't use vertical synchronization either. Their frame rates just aren't high enough to result in unusually big replay files.

10

Re: 3D settings, frame rate and replay file size

Elviz wrote:

And, BTW, judging from the frame rate of their replays, players like mym and Dave don't use vertical synchronization either. Their frame rates just aren't high enough to result in unusually big replay files.

You're absolutely right. I mentioned to rlk once, back when I originally put in the code to limit replay file frame rate, that I could notice(and still do, btw) a serious diffrence between 60fps and 120 fps, especially when the ball is moving fast. Yes I realize that my screen refresh rate is only 85 hz, and that I'm not really seeing those other 40 frames, but for some reason, it's liquid smooth at that 120 fps rate, while engaging the vertical sync drops it way below 85hz, so that it is more like 60, and that is no longer liquid smooth. I just don't understand why the game doesn't run at 85 fps with sync on, since it is obviously able to...

and while I understand mentally that I should be experiencing "tearing" of the image on-screen, I can honestly say I have never noticed it once. But I notice every single little chop-chop of lower framerate each second that I'm running the game with sync on...

Maybe I'm just weird.

11

Re: 3D settings, frame rate and replay file size

Sounds like it's time for refresh-rate entry in neverballrc file smile

Also sounds like another bug in SDL (assuming it is done via SDL)...

Currently Playing:
Celeste and Electronic Super Joy