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 MrThunderwing » Tue Jun 23, 2020 5:52 am

I've heard from Ian there's a new network build that no longer has messed up graphics on the Beginner Day stage of Scud Race. Would somebody mind uploading a version of it here please? Thanks in advance!
User avatar
MrThunderwing
 
Posts: 702
Joined: Fri Sep 02, 2011 11:31 am
Location: Bristol, UK


Re: Network code

Postby gareth_iowc » Wed Jul 01, 2020 12:17 am

Is there anything us the community can do to help? hardware funding etc?
gareth_iowc
 
Posts: 37
Joined: Sat Nov 17, 2012 1:02 pm

Re: Network code

Postby MrThunderwing » Sat Jul 04, 2020 4:39 am

MrThunderwing wrote:I've heard from Ian there's a new network build that no longer has messed up graphics on the Beginner Day stage of Scud Race. Would somebody mind uploading a version of it here please? Thanks in advance!


If anyone's interested you can get this version from here: viewtopic.php?f=3&t=1206&start=640#p17152
User avatar
MrThunderwing
 
Posts: 702
Joined: Fri Sep 02, 2011 11:31 am
Location: Bristol, UK

Re: Network code

Postby njz3 » Sat Jul 04, 2020 10:50 am

MrThunderwing wrote:
MrThunderwing wrote:I've heard from Ian there's a new network build that no longer has messed up graphics on the Beginner Day stage of Scud Race. Would somebody mind uploading a version of it here please? Thanks in advance!


If anyone's interested you can get this version from here: http://www.supermodel3.com/Forum/viewto ... 640#p17152


Just tried it on LeMans 24: it works great with the right music tempo. The reverb effect seems a bit too pronounced compared to real hardware, as already reported.
njz3
 
Posts: 23
Joined: Mon Mar 30, 2020 7:04 am
Location: France

Re: Network code

Postby Ian » Tue Jul 14, 2020 2:33 pm

I did a bit of profiling with the network code to see where the slowness is coming from. Because on my pc in single threaded mode I still get 60fps and in network mode with 2 machines it's half that. Anyway what is happening is the network code is waiting 16ms for the receive the data. This 1 frame wait halves the frame rate to around 30fps. I haven't dug deep enough into the code but maybe if the network code, if the cpu core is time spliced up a bit more it might send early enough. Either that or run asynchronously in another thread.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Network code [working on Linux?]

Postby TheOldDragon » Sat Jul 25, 2020 11:39 am

Is the Network code Windows only? I'm unable to get it working on Linux....
Ubuntu 20.04 LTS - x64, fully updated
Ryzen 5 3600 CPU, Radeon 5500 XT "Navi" GPU, open source AMD drivers

Note: Networking if working correctly [but slowly] for me on Win 10 with two instances [using the pre-compiled r803 version linked above].

Linux / Scud Race Plus:

I just built from source [today] on Ubuntu 20.04 LTS, and Scud Race Plus works perfectly in "Single" mode.

However, when I enable "EmulateNet" and set two instances to "Master and "Slave" I get stuck at the the:
"Cancelled Network Board Not Present" screen.
I'm running with:
"./supermodel ./Roms/scudplus.zip -res=1920,1080 -show-fps -quad-rendering -wide-screen -no-threads"

Is the code non-functional on Linux, or do I need to modify the Makefile and/or modify some of the code?
I'm happy to start digging, but don't want to waste my time if it's known to be incomplete/non-functional...
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Network code [working on Linux?]

Postby Bart » Sat Jul 25, 2020 12:29 pm

TheOldDragon wrote:"./supermodel ./Roms/scudplus.zip -res=1920,1080 -show-fps -quad-rendering -wide-screen -no-threads"


Try adding -net.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Network code [working on Linux?]

Postby TheOldDragon » Sat Jul 25, 2020 1:13 pm

Bart wrote:
TheOldDragon wrote:"./supermodel ./Roms/scudplus.zip -res=1920,1080 -show-fps -quad-rendering -wide-screen -no-threads"


Try adding -net.


Thanks for the quick reply.
UPDATED
That was it.... plus user error; I hadn't set the compile options correctly...

Just retried compiling with:
Code: Select all
make clean
make NET_BOARD=1


Now network works...thanks again.

Note: In networked mode, the frame rate drops to ~31 fps [from locked 60.0 fps], same as windows...
TheOldDragon
 
Posts: 62
Joined: Sat May 30, 2020 5:39 am

Re: Network code

Postby Bart » Sat Jul 25, 2020 3:04 pm

Running two instances connected across different machines?
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron