Network code

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Network code

Postby TheOldDragon » Sat Jul 25, 2020 5:57 pm

Bart wrote:Running two instances connected across different machines?

Running two instances on same machine, or on different machines.... same behaviour in all scenarios... :-(

Machine #1: Ryzen 9 3950X / GeForce RTX 2070 / Win 10 - precompiled r803 version linked earlier in this thread. [Windows Firewall off for this test]
Machine #2: Ryzen 5 3600 / Radeon 550XT / Ubuntu 20.0.4 LTS. - built today from latest SVN sources...
Both machines are capable of simultaneously running 4 or more [non-networked] instances @ 60 fps @ 720p resolution, so it's not a CPU/GPU horsepower problem.
LAN connection is via 10GbE local network; both machines directly into a 10GbE switch via 1 meter DAC cables, so I don't think it's a networking problem.. ;-)

When I try two networked instances [same machine or across network], the frame rate lowers to about 40 fps in the initial boot screens, and then drop to low 30s as the game proper starts [and stays in the low 30s, sometimes dropping to low 20s].
It's not stuttering/frame drops per se, the game is actually running twice [or 3x] as slowly; in Scud Race it's obvious during the "3...2...1" countdown at the start, and in the gameplay.... which is basically unplayable/in slo-mo.

And it's not the host machine CPU/GPU getting bogged down... I can run a third, non-networked instance at 60 fps at the same time on the same machine struggling with the two networked instances at 30 fps...

-----------------------------

BTW, wanted to say that I'm really in awe and gratitude for everything you guys have done on this over the years, and would love to help in any way I can. Being able to play Scud Race, arcade perfect at home, is a dream come true - because of your efforts - and networked multiplayer would be the icing on the cake... :-)

I have a clean install of PopOS! 20.04 on the 3950x / RTX 2070 machine, so I'm going to build again from source on that machine and see if anything behaves differently, and I'll report back.

Also, I read Ian's comment above [July 14th] about the 16 ms delay, and see the line [#93] in TCReceive.cpp that "sleeps" the listener thread for 16 ms [not sure if they are related?]
Just to see what happened, and because it was quick, I changed that to 1ms [instead of 16ms] and recompiled, but it didn't seem to make any difference...
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Network code

Postby TheOldDragon » Sat Jul 25, 2020 7:48 pm

PopOS! on the 3950X didn't show anything different:

I tested 2 and 4 local instances. 60 fps when no network link, and ~30fps with network on. [1920x1080 windows on a 4K display]

Images of network linked instances attached. One at start of race, one part way through, and the other after killing instance #3 and #4.

Interesting to note that when I killed instance #3 and #4, the other two jumped back to 60 fps, but had lost their network link.. Was able to finish the race, but no start another without resetting...
Attachments
scud3.jpg
scud3.jpg (227.46 KiB) Viewed 607 times
scud2.jpg
scud2.jpg (240.48 KiB) Viewed 607 times
scud1.jpg
scud1.jpg (240 KiB) Viewed 607 times
Last edited by TheOldDragon on Sat Jul 25, 2020 8:00 pm, edited 1 time in total.
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Network code

Postby Bart » Sat Jul 25, 2020 7:53 pm

And the frame rate is a full 60 fps when running the network build (with -net) as a standalone machine? I didn't write the net code but Model 3 networking works in a ring configuration and the net code might be waiting for the return packet. If it consistently takes longer than a frame, I would expect the frame rate to halve. What is the ping time between your machines?

Also, looks like the attachments weren't uploaded?
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Network code

Postby Bart » Sat Jul 25, 2020 7:55 pm

TheOldDragon wrote:Also, I read Ian's comment above [July 14th] about the 16 ms delay, and see the line [#93] in TCReceive.cpp that "sleeps" the listener thread for 16 ms [not sure if they are related?]
Just to see what happened, and because it was quick, I changed that to 1ms [instead of 16ms] and recompiled, but it didn't seem to make any difference...


Just saw this. 16ms is 1/60th of a second (one frame at 60 Hz). If he is introducing a delay, that would explain it.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Network code

Postby TheOldDragon » Sat Jul 25, 2020 8:14 pm

Bart wrote:And the frame rate is a full 60 fps when running the network build (with -net) as a standalone machine? I didn't write the net code but Model 3 networking works in a ring configuration and the net code might be waiting for the return packet. If it consistently takes longer than a frame, I would expect the frame rate to halve. What is the ping time between your machines?

Also, looks like the attachments weren't uploaded?

I added the attachments later [GIMP and forum knowledge issues.[256kb file size limit]]...

I have to run them without "-net" option flag to run them "standalone" ; If I add the "-net" flag - without the other instances running - then the window does not open to full size and stays black, and I get a stream of "Connecting to <next IP address in ring>" messages in the shell.... standalone, without "-net" flag, they run @ 60 fps.
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Network code

Postby sonic32 » Tue Aug 18, 2020 8:26 am

Hi

I know that the network in Sega Rally 2 is not working yet.
Sega rally 2 was ported to Dreamcast and Sega Model 3 was still up to date when Dreamcast was released, maybe Dreamcast uses the same network connection as Model 3 (Lan) :?:

Just a thought .. :oops:
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Network code

Postby Bart » Tue Aug 18, 2020 12:23 pm

sonic32 wrote:Hi

I know that the network in Sega Rally 2 is not working yet.
Sega rally 2 was ported to Dreamcast and Sega Model 3 was still up to date when Dreamcast was released, maybe Dreamcast uses the same network connection as Model 3 (Lan) :?:

Just a thought .. :oops:


Dreamcast used a modem. It has absolutely no relation to the low-latency ring topology fiber optic link used by Sega arcades.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Network code

Postby kalinium » Tue Sep 15, 2020 10:38 pm

Hi,
Does anyone manage to link two instances with the audio sounding correct?
It might be the frame rate dropping to 30, but I hear every sound twice... any ideas or solution?
Thank you...
kalinium
 
Posts: 8
Joined: Tue Jul 14, 2020 8:15 am

Re: Network code

Postby Bart » Wed Sep 16, 2020 11:25 am

kalinium wrote:Hi,
Does anyone manage to link two instances with the audio sounding correct?
It might be the frame rate dropping to 30, but I hear every sound twice... any ideas or solution?
Thank you...


If you have two instances of Supermodel running, you will hear both instances playing through the speakers. Also, let's keep usage questions to the main forums and off the developer forum, please.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Network code

Postby gareth_iowc » Sun Mar 14, 2021 12:13 pm

today MrThunderwing uploaded this video of daytona2 with 2 linked machines and full FPS.

https://www.youtube.com/watch?v=0BtcIS-KFFI

This is such awesome news!!!!

Who has been working on this? just wondered if there was any more information
gareth_iowc
 
Posts: 37
Joined: Sat Nov 17, 2012 1:02 pm

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron