Open samosaphile opened 3 years ago
I think it's because of a bad internet connection just like when you played Counter Strike (PC game) where you see "jumpy" players. Was this played over the internet or on LAN?
I also saw similar issue on Naruto Kizuna Drive when i tried to simulate high ping and high packet loss rate using clumsy
on localhost to test the game's connection reliability.
PS: We really need a ping monitoring feature where players can see everyone's current and highest ping, along with their lost packet rate, so we can separate internet connection issue with an actual PPSSPP issue.
Wireless connections from both sides seem to cause more packet loss which seems to cause this to happen more frequently (maybe even on LAN). At least if one user uses a wired connection it would reduce the chance of this happening. Then again on 2 PSPs that try to play online wont see this issue.. I remember getting this issue on GT if the other side was running the game at either 60 FPS or running it with a lot of frame drops so it could be that as well. Also running different PPSSPP versions can cause it since from a certain version @ANR2ME changed that HLE Delay thing to be way smaller.
BTW found this site recently: https://packetlosstest.com/ It tells you how much packet loss you get. But I don't know which preset fits PPSSPP the most... It also shows late packets percent but I have no idea what that means for the user.
BTW found this site recently: https://packetlosstest.com/ It tells you how much packet loss you get. But I don't know which preset fits PPSSPP the most... It also shows late packets percent but I have no idea what that means for the user.
The default or custom one should be good enough, but to be more exact the packet size, frequency (usually one packet per player per frame being rendered), and probably the duration too might need to be set to match the game packets & behavior (which can be varies depend on the game)
Late packets are packets that is taking more time than "Acceptable Delay". For example my latency on Georgia server is about 304ms in average, so if i use 200ms acceptable delay i will get 100% late packets, but if i increased acceptable delay to 500ms i only get about 1% late packets.
I think late packets are also related to TCP, where if they didn't received ACK within 200ms (as i remembered it's the default value on TCP but can be changed on some platform, but tricky) after sending, they will resend/retransmitted the packet. There will be an extra latency on each resend/retransmit, because sending another packet will takes another latency to arrived on the destination, thus from the receiver perspective it takes a multiple of 200ms + actual latency at the time it managed to received it successfully.
As i remembered, even on localhost UDP packets could arrived more than 10 seconds later for unknown reason.. while it usually only takes a milliseconds, and most program will consider it as lost if it's taking that long.
My result is this with default settings:
PS: This will only test your connection against packetlosstest.com's server and not your connection against other player connection. Even if both players have a good result tested on packetlosstest.com's server, it doesn't mean that the connection between players will also be good (especially if you're living on a different region), because the packets are going through a different route, and some nodes on these route can be worse than other.
I guess you could use something like PathPing if you are on Windows or an equivalent app on Android. You do need to know the other player IP address but that's not really hard to know. Then again you can say that the nodes change every day week and month so won't get the same result each time lol. In the end of the day packet loss is the more important factor and its easy to get high amounts of it if you use a wireless connection over a wired one.
@ANR2ME game was played over internet. I always play over internet only. The friend I played with here in those two video clips I posted above is someone who I do not lag in most other games that we do ad-hoc ppsspp netplay in. Even games which notoriously have terrible netcode (e.g. Tekken 6 and street fighter alpha 3) are playable with him. Not saying we have the most amazing connection or anything but it seems good enough for majority of titles except for really laggy stuff (armored core series games, GTA Chinatown wars, DBZ:TTT, kof, etc) which makes me think it's more ppsspp than connection related.
Btw, is there anything that can be done on ppsspp side to speed up slowish ad-hoc games over internet? (I.e. powerstone, SF alpha 3?) I've heard on hardware between real psp's these games are very smooth but that's just very close local play on same network. It's a shame they only need to be abit faster (on internet) and they'd pretty much be like LAN play.
Btw, is there anything that can be done on ppsspp side to speed up slowish ad-hoc games over internet? (I.e. powerstone, SF alpha 3?) I've heard on hardware between real psp's these games are very smooth but that's just very close local play on same network. It's a shame they only need to be abit faster (on internet) and they'd pretty much be like LAN play.
Depends on how the netcode worked, some games will not update anything on screen before all players data are synced, making the screen looked frozen.
Many games are trying to sync the data synchronously on every frame supposed to be rendered (ie. 16.6ms interval on 60 FPS, 33.3ms interval on 30 FPS), on a real LAN environment, 20ms or 10ms are probably enough to do the rendering and with additional delay from LAN latency which is normally less than 5ms making the interval of 33 or 16ms is sufficient to get it synced and rendered at full 30 or 60 FPS.
However, when you replace this LAN (<5ms latency) with internet latency (for example 50ms) you can imagine how much delay it will need just to render a single frame, thus resulting a low FPS.
Fortunately, there are also games that sync data asynchronously, similar to MMO games, so it won't affect your own movement/actions, while seeing other players moves suddenly/jumpy/erratically during lags.
Note: in case you're wondering where is this 16.6ms or 33.3ms came from 33.33ms interval = 1000ms(1 second) divided by 30 frames (which makes 30 frames per second) 16.6ms interval = 1000ms div by 60 frames (which makes 60 frames per second)
TBH this does seem like more of a PPSSPP issue because i cant reproduce this on real hardware playing online much. The only ways it could happen is if the connection is really really bad or that the other player is using cheats like a 60 fps cheat or something similar. Playing with a VPN software like ZeroTier might help improve the connection and may reduce the issue though. I understand why its an Android only issue though.. it's not easy to debug there.
Btw, is there anything that can be done on ppsspp side to speed up slowish ad-hoc games over internet? (I.e. powerstone, SF alpha 3?) I've heard on hardware between real psp's these games are very smooth but that's just very close local play on same network. It's a shame they only need to be abit faster (on internet) and they'd pretty much be like LAN play.
Depends on how the netcode worked, some games will not update anything on screen before all players data are synced, making the screen looked frozen.
Many games are trying to sync the data synchronously on every frame supposed to be rendered (ie. 16.6ms interval on 60 FPS, 33.3ms interval on 30 FPS), on a real LAN environment, 20ms or 10ms are probably enough to do the rendering and with additional delay from LAN latency which is normally less than 5ms making the interval of 33 or 16ms is sufficient to get it synced and rendered at full 30 or 60 FPS.
However, when you replace this LAN (<5ms latency) with internet latency (for example 50ms) you can imagine how much delay it will need just to render a single frame, thus resulting a low FPS.
Fortunately, there are also games that sync data asynchronously, similar to MMO games, so it won't affect your own movement/actions, while seeing other players moves suddenly/jumpy/erratically during lags.
Note: in case you're wondering where is this 16.6ms or 33.3ms came from 33.33ms interval = 1000ms(1 second) divided by 30 frames (which makes 30 frames per second) 16.6ms interval = 1000ms div by 60 frames (which makes 60 frames per second)
Could you look into those two games specifically (powerstone collection and street fighter alpha 3)? I was gonna open a new GitHub issue regarding these 2 games and laggyness / slow speed online. But I really wasn't sure if worth it or anything could be done.
If something can be done about those because of their netcode, I'll open a new GitHub issue.
Laggyness or low FPS during online multiplayer is not something that we can fix if it was due to the netcode design, but if it happened on LAN or multiple-instance we might be able to try to improve it (their performance should at least not far different than on a real PSP on LAN)
Someone would need to rom hack the games from inside to make the netcode better. Powerstone collection for some reason got issues with FPS beyond just online though. It's laggy in the menus after connecting until the gameplay starts locally with multiple instances or LAN.
@ANR2ME Just wanted to give a small update. I take back what I said about looking into street fighter alpha 3, powerstone and seeing if anything could be done.
Just recently I was lucky enough to be able to play (over the internet again) with someone who lives in the same country as me and decent connection.
And I must say, it was impressive. 0 lag. :) So I guess these games just extremely sensitive to distance / latency.
I lost sync in the powerstone game, but I think the answer really is force real time clock sync. Been trying that recently and it's been fixing quite a few instability issues with me on adhoc play over the internet. And I also notice I seem to require this option more when it's pc to android than android to android.
Maybe we should force lagsync (internal name of the option) on when netplay is enabled, or at least when a socket is connected.
It would have a negative impact to single-player performance on weaker devices, though, so I'd rather avoid enabling by default for everyone.
-[Unknown]
Hm, yeah, might be a good idea. Maybe there'll still be reasons to have it off though (less sensitive games)?
Guess could have a compat.ini setting that forces it on when a socket is open for games we know need it..
Yeah, it should be put on compat.ini because there are games might also use socket for single player (for example UNO), and some other game (i forgot the game name, seems to be mystery type of game) initialize network when playing single player, so that other player can joined him and the game became multiplayer (ie. the 2nd player will replace one of the NPC), was it Obscure the Aftermath game.. So it will probably going to affect these games' performance on single player, right?
But, there are probably only a small number of games that use networking during single player.
Alright. Another update. Maybe I got abit too excited. After doing a lot more testing force real clock sync doesn't seem to really fix stuff. I guess I test at different times and maybe lag was just less at night because less traffic on web / route / path.
One thing is for sure. Playing someone who lives right next to you completely fixes many of the ad-hoc network related ppsspp bugs. Unfortunately, the I couldn't test more games as the person who lived close to me seems to have quit ppsspp gaming completely :/
Apparently having auto frameskip helps too. You cant use it with real clock sync though. Just writing it here for others.
Looks like the option got issues with GT specifically though for now : https://github.com/hrydgard/ppsspp/issues/15525
It does work well with other games.
What happens?
In Gran Turismo, during wireless play between 2 android devices cars will behave erratically. Almost like a completely different beast from offline single player play.
https://user-images.githubusercontent.com/30265284/127596260-ffde0671-1b05-4271-bbbc-9d9ac7ce9988.mp4
https://user-images.githubusercontent.com/30265284/127596276-2461a55e-2912-4b1d-8262-8c6de927e1b9.mp4
What should happen?
A car shouldn't be skipping frames across track, which it almost seems like it's doing? And especially not getting stuck (like when someone crashes into a wall, it'll just show the car repeated hitting a wall in a loop for ages) it should work as intended, like offline play.
What are you using?
What hardware / device and operating system?
Pixel 4a on pixelOS (stock android 11)
What graphics card (GPU) or mobile phone model?
Adreno 618 / sunfish.
What PPSSPP version (standalone/official), and did it work before?
Tested on 1.11.2-432 and 1.11.3-842. not to my knowledge it ever worked correctly between 2 android devices. It seems to work tho, when a pc user hosts game? So clearly when android is hosting, it's not doing something quite right.
Which game or games?
UCES01245.
Checklist