Lag in Monkey Magic?

Psygho
Posts: 46
Joined: Thu Nov 19, 2020 11:46 pm
Has thanked: 2 times
Been thanked: 2 times

Lag in Monkey Magic?

Unread post by Psygho »

Hello,
Is it me, of is there a little lag in this game?
When I push in example , the jump button, it has a bit of lag.
I am a person, who notice it quite well, I do not notice it with rayman, klonoa, of other similar games.
Tried several sources for game, but result keeps the same.
AngelicLiver
Top Contributor
Posts: 434
Joined: Fri May 29, 2020 8:50 am
Has thanked: 86 times
Been thanked: 120 times

Re: Lag in Monkey Magic?

Unread post by AngelicLiver »

I was playing this last week and did not notice any appreciable input lag on this game, albeit this was on a CRT using a DualShock controller natively via SNAC and it was my first time playing it.

Could you give a few more details about your setup please?
Psygho
Posts: 46
Joined: Thu Nov 19, 2020 11:46 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Lag in Monkey Magic?

Unread post by Psygho »

HDMI, lowest lag mode,
Wired ds4 and ds5 controller.
lg c7 oled display
FPGAzumSpass
Core Developer
Posts: 385
Joined: Sat May 23, 2020 12:55 pm
Has thanked: 42 times
Been thanked: 414 times

Re: Lag in Monkey Magic?

Unread post by FPGAzumSpass »

Cannot reproduce that, even with vsync adjust 0 jump and boxing seems instant.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Lag in Monkey Magic?

Unread post by Malor »

I've never played the game before, but it seems okay here, at least to my aging reflexes. My setup:

HDMI, lowest lag mode
Wired DS5 controller
LG GN850 LCD display

One thought that occurs is that maybe you need to set the C7 to game mode? I don't know the C7, but the LG TVs I know about are pretty laggy in modes that do processing. IIUC, only game mode is really quick.

There's also some issue with this model year LGs handling 4:3 inputs; they apparently add a lot of lag there. I'm not familiar with the C7, but it could potentially have the same thing. If you make sure the Mister is sending a 1080p signal, you'll avoid that bug. (which may be fixed by now, anyway.)
therexershow
Posts: 1
Joined: Fri Nov 18, 2022 11:25 pm

Re: Lag in Monkey Magic?

Unread post by therexershow »

I have noticed some significant lag playing Mike Tysons Punchout, both on hardwire USB and BT controller, whereas before I did not notice it. The only thing that has changed was I added an I/O Board, and using my Vizio TV instead of a monitor.

Are you saying that my TV can add input lag from a controller?

I understand tv response time, but that's not input lag. Also, what is "LOWEST LAG MODE"? And what is C7? And should I put polling on fast? Any help is appreciated. I can easily beat Tyson on OG Hardware, but can't do it on the Mister.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Lag in Monkey Magic?

Unread post by jca »

Your TV does not add input lag but its response time will look like the input lag increased.
The C7 is the model of the monitor used.
If your TV has a gaming mode select that.
The lowest lag mode is vsync_adjust=2 in MISTer.ini.
Fat polling on will also help.
^
Fast fingers :lol:
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Lag in Monkey Magic?

Unread post by Malor »

The TV can add display lag, which feels like control lag because you don't see the results of your inputs as quickly. On a CRT, from the time the console sends a pixel to the time you see it is literally nanoseconds, where any flat panel will add some delay before the pixel becomes visible. Bad TVs can add a couple full frames of lag. Even the best typically add at least 5ms, about a third of a frame.

You may be able to improve display lag by setting your TV to 'game mode'. The difference between movie and game modes can be major on some TVs.

As jca says, the lowest lag mode is vsync_adjust=2, which adds about four scanlines of latency versus real hardware. It's a single buffer mode that passes the video sync through directly, so whatever the core is generating is what gets sent, even if it's a weird rate like, say, 60.2Hz or 58.5Hz or whatever. If your TV can sync with the varied signals, this is the best mode to use. The other vsync modes add one or more frames of lag, but then put out a nice steady signal that lower-quality TVs can understand.

Setting fast polling is an excellent idea; at 1000Hz polling, that's an average of 0.5ms lag. But note that your controller will add additional lag. Some controllers are very fast, some not so much. This is true input lag, and it's only kind of additive with display lag. It will recognize your inputs after X milliseconds, and the game will respond appropriately. Meanwhile, display lag is how long it takes for the signal to show up to your eyes. The two lags are additive if you wait to see something and then react, but if you anticipate an event and react sooner, the core may detect your input before the display catches up.

Wired controllers are usually best. Wireless and Bluetooth controllers can be quite laggy. The DualSense 5 is a good option, at about 1.8ms latency in wired mode, and it's easy to find. There are sticks that do a little better, and a whole lot that do much worse. You can peruse the list here:

https://rpubs.com/misteraddons/inputlatency
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Lag in Monkey Magic?

Unread post by pgimeno »

To add another piece on the "input lag vs display lag" puzzle, or why monitor lag can feel like input lag: note that you're reacting to the screen you see, that actually happened in past, because what you're seeing is delayed. So you're reacting to an old frame, not to the current frame. Even if the input is immediate, you won't see the effect until the display lag catches up.

It's simply not possible to distinguish input lag from display lag, without a measurement in the CPU side. Here's a diagram to illustrate the problem:

Code: Select all

                  _______                        _________
  [Input]--------[_______]-----[CPU/MiSTer]-----[_________]--------[Monitor/TV]
     ^           Input lag          ^           Display lag             ^
     |                              |                                   |
                   Happens at an unknown (to you) time                  |
     |                                                                  |
     +------- Lag you can perceive (sum of input + display lag) --------+
Post Reply