• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 8 9 10 11 12 ... 116 Next »

Rollback netcode
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Rollback netcode
12-26-2019, 09:04 AM
#1
Segs
Unregistered
 
Now that the GGPO netcode has been open-source for a while, I was wondering if it's possible to implement it into Dolphin netplay, or if its just not possible to make it work with Dolphin's netplay.
Reply
12-26-2019, 09:24 AM
#2
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 8,836
Threads: 7
Joined: Oct 2014
Like the name implies, the defining feature of rollback netcode is that the game state can be rolled back in an earlier point in time. This can be made quite fast if a game's engine is designed specifically for it, but Dolphin would have to do it using savestates, and those are not very fast (since they have to store the entire state of the emulated GameCube/Wii, not just things like the positions and states of characters and projectiles). I haven't tested the performance of savestating too closely, and it is possible that there are speed improvements to be made, but I wouldn't be surprised if it would just be too slow to be playable.
Find
Reply
12-26-2019, 12:42 PM
#3
Helios Offline
Stellaaaaaaa
**********
Developers (Some Administrators and Super Moderators)
Posts: 4,397
Threads: 15
Joined: May 2012
I don’t think it can ever be usable. I did a quick search and I’m pretty sure dolphin flushes the JIT cache when saving state. So it’s going to stutter like mad
Find
Reply
12-26-2019, 12:59 PM
#4
Segs
Unregistered
 
Thanks.
Reply
12-27-2019, 10:06 AM
#5
Billiard26 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,661
Threads: 8
Joined: Feb 2010
"Rollback" netplay also requires significantly faster than real-time simulation to advance to the proper time after the "rollback". GC/Wii emulation is still pretty taxing.
Find
Reply
12-27-2019, 06:34 PM
#6
Kolano Offline
Wiki Admin
*******
Content Creators (Moderators)
Posts: 1,720
Threads: 1,100
Joined: Mar 2010
Regarding the performance, would just storing the save states in RAM make much difference? While not common, 32+gb setups are now easily attainable, and Dolphin doesn't consume that much by itself currently.
Website Find
Reply
12-27-2019, 08:19 PM (This post was last modified: 12-27-2019, 08:23 PM by Helios.)
#7
Helios Offline
Stellaaaaaaa
**********
Developers (Some Administrators and Super Moderators)
Posts: 4,397
Threads: 15
Joined: May 2012
JIT cache is still going to be constantly flushed. Even if you could optimize the saving operation to be absurdly fast and somehow avoid audio stutter from the state being paused for even a fraction of a frame, you'll be plagued with JIT stuttering anyways.
Find
Reply
04-10-2020, 03:44 AM
#8
GunpowderGuy
Unregistered
 
(12-27-2019, 08:19 PM)Helios Wrote: JIT cache is still going to be constantly flushed. Even if you could optimize the saving operation to be absurdly fast and somehow avoid audio stutter from the state being paused for even a fraction of a frame, you'll be plagued with JIT stuttering anyways.


Why is the jit flushed with every save state, is it an optimization ? could it be turned off ?
Reply
04-11-2020, 07:18 AM
#9
Billiard26 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,661
Threads: 8
Joined: Feb 2010
I assume it's flushed because the cache isn't saved because it doesn't need to be, because flushing and letting it rebuild is significantly easier.
Yes, it could be saved to prevent flushing it.

To accomplish rollback the state needs to be saved every single input frame.
Every time input changes a state needs to be loaded and the game needs to be re-emulated for N frames (Where N will be affected by ping time).
And each of these frames needs the state saved to prevent unnecessary re-emulation.
With an optimistic ping of 50ms and the scenario of input changing every frame your PC would need to be capable of emulating the game at 300% speed in the background on top of loading the state 60 times a second and saving it 180 times a second.

Current hardware is not going to handle this.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode