Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releases? #7

Open
hmlendea opened this issue Dec 28, 2019 · 35 comments
Open

Releases? #7

hmlendea opened this issue Dec 28, 2019 · 35 comments

Comments

@hmlendea
Copy link

Are you planning to publish builds using GitHub's releases feature?

I'm not having access to my development machine right now as I'm away with just my pleb laptop, but I was curious to check out this project and see what it's capable of.

If you do, please include builds for linux/linux-x64 and linux-arm/linux-arm64 , if it is compatible with those.

@HelloKitty
Copy link
Owner

Hello @hmlendea I'm not actively developing this project but the master branch should have a complete functional working RS317 C# client.

I haven't published builds because I'd prefer to setup some auto-build rather than do releases manually.

There are two client implementations. One might work with the mono runtime on Linux but it depends on Winforms/GDI so I'm not 100% sure, it should maybe work on monoforms though. The other is the OpenTK/OpenGL version, not sure it that'll work on Linux as I haven't tried. OpenTK doesn't officially support .NET Core yet either.

They might work on Linux though, and could with some effort if they don't for some reason I'd imagine.

@optimus-code
Copy link

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

@JChalka
Copy link

JChalka commented May 12, 2020

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

Also looking for this as well, currently getting this error

DefaultWebSocketClient failed to send message. Reason: System.NullReferenceException: Object reference not set to an instance of an object

@JChalka
Copy link

JChalka commented May 12, 2020

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html

Always scan for virus etc. like from places like VirusTotal.com

Originally posted by @ghost in #2 (comment)

try checking that out, another (now deleted) user had been able to use No-Doze it seems

@optimus-code
Copy link

optimus-code commented May 12, 2020

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html

Always scan for virus etc. like from places like VirusTotal.com

Originally posted by @ghost in #2 (comment)

try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)

I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.

The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.

I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

@JChalka
Copy link

JChalka commented May 12, 2020

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html
Always scan for virus etc. like from places like VirusTotal.com
Originally posted by @ghost in #2 (comment)
try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)

I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.

The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.

I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

hmm could you by chance upload a fork?

trying again with the fresh source on WF this time instead of Unity, and I get when this attempting to press the Login button 'DefaultWebSocketClient failed to send message. Reason: System.ObjectDisposedException: Cannot access a disposed object.'

seems something isn't being declared somewhere in what I have and I can't pinpoint the exact cause, so the client fails to send anything

@optimus-code
Copy link

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html
Always scan for virus etc. like from places like VirusTotal.com
Originally posted by @ghost in #2 (comment)
try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)
I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.
The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.
I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

hmm could you by chance upload a fork?

trying again with the fresh source on WF this time instead of Unity, and I get when this attempting to press the Login button 'DefaultWebSocketClient failed to send message. Reason: System.ObjectDisposedException: Cannot access a disposed object.'

seems something isn't being declared somewhere in what I have and I can't pinpoint the exact cause, so the client fails to send anything

I encounter that too, I've only been able to get past that when I run the Rs317.Server.WebSocket.Proxy project with a self-signed PFX (You can use OpenSSL to generate one).

Then use the .Net Developer Console to run dotnet Rs317.Server.WebSocket.Proxy.dll. The socket no longer gets disposed and I can see data being sent but I never get further than that.

12/05/2020 10:57:31 PM [Info] Server started at wss://0.0.0.0:43595 (actual port 43595)
Open! Id: f374c765-09c7-4b09-a65a-3c0a738f6387
Client Sent Bytes: 2
Server Sent Bytes: 17
Client Sent Bytes: 78

I tried luna-rs web server but it will not receive a connection, I wrote a bit of code to convert the PFX into Luna format toml files to no avail. I've not made any particular code changes so you should be able to get to this point.

@JChalka
Copy link

JChalka commented May 12, 2020

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html
Always scan for virus etc. like from places like VirusTotal.com
Originally posted by @ghost in #2 (comment)
try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)
I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.
The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.
I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

hmm could you by chance upload a fork?
trying again with the fresh source on WF this time instead of Unity, and I get when this attempting to press the Login button 'DefaultWebSocketClient failed to send message. Reason: System.ObjectDisposedException: Cannot access a disposed object.'
seems something isn't being declared somewhere in what I have and I can't pinpoint the exact cause, so the client fails to send anything

I encounter that too, I've only been able to get past that when I run the Rs317.Server.WebSocket.Proxy project with a self-signed PFX (You can use OpenSSL to generate one).

Then use the .Net Developer Console to run dotnet Rs317.Server.WebSocket.Proxy.dll. The socket no longer gets disposed and I can see data being sent but I never get further than that.

12/05/2020 10:57:31 PM [Info] Server started at wss://0.0.0.0:43595 (actual port 43595)
Open! Id: f374c765-09c7-4b09-a65a-3c0a738f6387
Client Sent Bytes: 2
Server Sent Bytes: 17
Client Sent Bytes: 78

I tried luna-rs web server but it will not receive a connection, I wrote a bit of code to convert the PFX into Luna format toml files to no avail. I've not made any particular code changes so you should be able to get to this point.

Appreciate it! Gonna take a bit of a break (been at this since 6am, 6pm now!) get back to working on this in a bit

@JChalka
Copy link

JChalka commented May 12, 2020

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html
Always scan for virus etc. like from places like VirusTotal.com
Originally posted by @ghost in #2 (comment)
try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)
I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.
The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.
I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

hmm could you by chance upload a fork?
trying again with the fresh source on WF this time instead of Unity, and I get when this attempting to press the Login button 'DefaultWebSocketClient failed to send message. Reason: System.ObjectDisposedException: Cannot access a disposed object.'
seems something isn't being declared somewhere in what I have and I can't pinpoint the exact cause, so the client fails to send anything

I encounter that too, I've only been able to get past that when I run the Rs317.Server.WebSocket.Proxy project with a self-signed PFX (You can use OpenSSL to generate one).

Then use the .Net Developer Console to run dotnet Rs317.Server.WebSocket.Proxy.dll. The socket no longer gets disposed and I can see data being sent but I never get further than that.

12/05/2020 10:57:31 PM [Info] Server started at wss://0.0.0.0:43595 (actual port 43595)
Open! Id: f374c765-09c7-4b09-a65a-3c0a738f6387
Client Sent Bytes: 2
Server Sent Bytes: 17
Client Sent Bytes: 78

I tried luna-rs web server but it will not receive a connection, I wrote a bit of code to convert the PFX into Luna format toml files to no avail. I've not made any particular code changes so you should be able to get to this point.

In Unity the error ends up being DefaultWebSocketClient failed to send message. Reason: System.NullReferenceException: Object reference not set to an instance of an object
at System.Net.WebSockets.WebSocketHandle.SendAsync (System.ArraySegment1[T] buffer, System.Net.WebSockets.WebSocketMessageType messageType, System.Boolean endOfMessage, System.Threading.CancellationToken cancellationToken) [0x00000] in <ae22a4e8f83c41d69684ae7f557133d9>:0 at System.Net.WebSockets.ClientWebSocket.SendAsync (System.ArraySegment1[T] buffer, System.Net.WebSockets.WebSocketMessageType messageType, System.Boolean endOfMessage, System.Threading.CancellationToken cancellationToken) [0x00006] in :0
at Rs317.Sharp.DefaultWebSocketClient+d__27.MoveNext () [0x00018] in C:\Users\Public\Documents\Unity Projects\317 Unity Runescape\Assets\Rs317.Library.Client.WebSockets\Clients\DefaultWebSocketClient.cs:88

@optimus-code
Copy link

My error is definitley client-side as it doesn't even register on a test server

Hi, sorry to bump this issue but I couldn't think of an appropriate way of contacting you. Is there a specific server build/repo you have used successfully with this client? I have tried several different repos so far with no luck.

This is a place to source the No-Doze server.
https://www.rune-server.ee/runescape-development/rs2-server/downloads/683176-various-old-rs2-sources.html
Always scan for virus etc. like from places like VirusTotal.com
Originally posted by @ghost in #2 (comment)
try checking that out, another (now deleted) user had been able to use No-Doze it seems

I have had varying success with a variety of servers, I noticed there was a WebSocket program to redirect socket data from the client on PORT NUMBER + 1, to PORT NUMBER, it requires a PFX format SSL certificate so I spent a few hours trying to get a server to work (This was particularly fun because many servers just use the unencrypted and raw modulus and exponent.)
I managed to get it working with the SSL redirection, I ran a C# 317 server and received communication as evidenced by a breakpoint on the server code being hit, but either that server had issues or there is an incompatibility between that and this client.
The problem is also trying to find a vanilla-ish server to ensure it's not a qwirk of that particular server repo that is causing the issue.
I have a particular interest in getting a C# Client + Server working in combination as I think it holds a lot of promise and I have some ideas I'd love to test out, but I'm not a fan of the Java development environment, i've already been down the custom Java repo route; it's not particularly fun.

hmm could you by chance upload a fork?
trying again with the fresh source on WF this time instead of Unity, and I get when this attempting to press the Login button 'DefaultWebSocketClient failed to send message. Reason: System.ObjectDisposedException: Cannot access a disposed object.'
seems something isn't being declared somewhere in what I have and I can't pinpoint the exact cause, so the client fails to send anything

I encounter that too, I've only been able to get past that when I run the Rs317.Server.WebSocket.Proxy project with a self-signed PFX (You can use OpenSSL to generate one).
Then use the .Net Developer Console to run dotnet Rs317.Server.WebSocket.Proxy.dll. The socket no longer gets disposed and I can see data being sent but I never get further than that.

12/05/2020 10:57:31 PM [Info] Server started at wss://0.0.0.0:43595 (actual port 43595)
Open! Id: f374c765-09c7-4b09-a65a-3c0a738f6387
Client Sent Bytes: 2
Server Sent Bytes: 17
Client Sent Bytes: 78

I tried luna-rs web server but it will not receive a connection, I wrote a bit of code to convert the PFX into Luna format toml files to no avail. I've not made any particular code changes so you should be able to get to this point.

In Unity the error ends up being DefaultWebSocketClient failed to send message. Reason: System.NullReferenceException: Object reference not set to an instance of an object
at System.Net.WebSockets.WebSocketHandle.SendAsync (System.ArraySegment1[T] buffer, System.Net.WebSockets.WebSocketMessageType messageType, System.Boolean endOfMessage, System.Threading.CancellationToken cancellationToken) [0x00000] in <ae22a4e8f83c41d69684ae7f557133d9>:0 at System.Net.WebSockets.ClientWebSocket.SendAsync (System.ArraySegment1[T] buffer, System.Net.WebSockets.WebSocketMessageType messageType, System.Boolean endOfMessage, System.Threading.CancellationToken cancellationToken) [0x00006] in :0
at Rs317.Sharp.DefaultWebSocketClient+d__27.MoveNext () [0x00018] in C:\Users\Public\Documents\Unity Projects\317 Unity Runescape\Assets\Rs317.Library.Client.WebSockets\Clients\DefaultWebSocketClient.cs:88

Its the socket being disposed before it can proceed with other calls. This is just because there is no endpoint to connect to. Load up the Proxy and you'll see that error disappear. I am now at the issue where the encryption algorithms are different so it fails to decrypt the login packet. But that means it is hitting the server fine, I just need to find a compatible server.

@optimus-code
Copy link

I've had some more success with a Repo called cscape, it's MIT license and can be found https://github.com/SSStormy/cscape.

I could not get it working with their built in encryption algorithms so I implemented the WebSocketServer from Fleck which Rs317 uses for the proxy and disabled the cscape encryption so it uses Fleck and the PFX (Advantage of messing with a C# server. I now get "Unexpected server response, please try using a different world." on the client itself, no exceptions.

Proxy log:

Client Sent Bytes: 2
Server Sent Bytes: 256
Client Sent Bytes: 78
Server Sent Bytes: 256

My modified cscape shows the following output:

[0.000906] Starting server...
[0.376788] Overwrote config with the one from disk.
[0.378263] Main loop is live.
05/12/2020 23:53:32 [Info] Server started at wss://0.0.0.0:43594 (actual port 43594)
[13.578955] Invalid login magic: 35
[122.248679] Sending Entity GC message

I'll have to look into more but it's some progress.

@JChalka
Copy link

JChalka commented May 13, 2020

I've had some more success with a Repo called cscape, it's MIT license and can be found https://github.com/SSStormy/cscape.

I could not get it working with their built in encryption algorithms so I implemented the WebSocketServer from Fleck which Rs317 uses for the proxy and disabled the cscape encryption so it uses Fleck and the PFX (Advantage of messing with a C# server. I now get "Unexpected server response, please try using a different world." on the client itself, no exceptions.

Proxy log:

Client Sent Bytes: 2
Server Sent Bytes: 256
Client Sent Bytes: 78
Server Sent Bytes: 256

My modified cscape shows the following output:

[0.000906] Starting server...
[0.376788] Overwrote config with the one from disk.
[0.378263] Main loop is live.
05/12/2020 23:53:32 [Info] Server started at wss://0.0.0.0:43594 (actual port 43594)
[13.578955] Invalid login magic: 35
[122.248679] Sending Entity GC message

I'll have to look into more but it's some progress.

Was able to login using Asteria3.0, setting: public static final boolean DECODE_RSA = false; in NetworkConstants (com.asteria.net) https://github.com/lare96/asteria-3.0

Server log:

INFO: Initializing the Bootstrap...
May 12, 2020 7:51:22 PM org.codehaus.groovy.vmplugin.v8.IndyInterface fromCache
INFO: The Bootstrap has been initialized with 19 plugins!
May 12, 2020 7:51:22 PM com.asteria.Server main
INFO: The Bootstrap has been bound, Asteria 3.0 is now online!
May 12, 2020 8:00:54 PM com.asteria.game.character.player.Player create
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] has logged in.
May 12, 2020 8:01:08 PM com.asteria.net.codec.MessageDecoder message
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] unhandled upstream message [opcode= 3, size= 1]
May 12, 2020 8:01:21 PM com.asteria.net.codec.MessageDecoder message
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] unhandled upstream message [opcode= 3, size= 1]
May 12, 2020 8:01:34 PM com.asteria.net.codec.MessageDecoder message
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] unhandled upstream message [opcode= 3, size= 1]
May 12, 2020 8:01:43 PM com.asteria.net.codec.MessageDecoder message
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] unhandled upstream message [opcode= 3, size= 1]
May 12, 2020 8:01:53 PM com.asteria.net.codec.MessageDecoder message
INFO: PLAYER[username= test, host= 127.0.0.1, rights= DEVELOPER] unhandled upstream message [opcode= 3, size= 1]

Client Log:

RS2 user client - release #317 using Rs317.Sharp by Glader
Loading.
Connecting to Server: 127.0.0.1:43595
Opened WebSocket.
Connecting to Server: 127.0.0.1:43595
Opened WebSocket.
Region: 386:405
Interface Link: SideBar: 3917 InterfaceId: 1
Interface Link: SideBar: 638 InterfaceId: 2
Interface Link: SideBar: 3213 InterfaceId: 3
Interface Link: SideBar: 1644 InterfaceId: 4
Interface Link: SideBar: 5608 InterfaceId: 5
Interface Link: SideBar: 1151 InterfaceId: 6
Interface Link: SideBar: 5065 InterfaceId: 8
Interface Link: SideBar: 5715 InterfaceId: 9
Interface Link: SideBar: 2449 InterfaceId: 10
Interface Link: SideBar: 904 InterfaceId: 11
Interface Link: SideBar: 147 InterfaceId: 12
Interface Link: SideBar: 962 InterfaceId: 13
Interface Link: SideBar: 2423 InterfaceId: 0
Region: 386:405
Interface Link: SideBar: 5855 InterfaceId: 0
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.
Error: Encountered error rendering tile. Index was outside the bounds of the array.

every now and then I'll get a 'Client network idle timeout.'

also, character does not load into the client, but does load on the character select/customize screen so that's funny

image

Edit: hmm so WF works alright, beside index out of bounds & character models, even with the Proxy running I still get the same ol' Unity errors though. Have tried changing IP/Offsets to make sure everything is supposed to work like it should, nada
Seems like it fails when it goes to open the socket, and since it never opens it there isn't much of a connection really possible to be made
image

@JChalka
Copy link

JChalka commented May 14, 2020

gonna mess around with https://github.com/sta/websocket-sharp#websocket-client
sometime tonight or tomorrow possibly, see if I can use a different way of opening the socket and go from there

@HelloKitty
Copy link
Owner

Hey guys, you do not need to use Websockets for the Unity3D client. That's only required for WebGL build. You can use normal TCP socket implementation for the standalone Unity3D build.

@HelloKitty
Copy link
Owner

Oh, I found the issue @Joeyjoe9876 @optimus-code . I may have pushed some test code to force the Unity3D editor to appear as a WebGL client always. For testing purposes. Let me make a push to correct this. It may make your lives abit better.

@HelloKitty
Copy link
Owner

Pull up to this commit, and I think things will work a lot better for you guys in Unity3D: df59caf

@HelloKitty
Copy link
Owner

HelloKitty commented May 16, 2020

As you can see, it's working fine a default 317 server called Shards Revolution in Unity3D over normal TCP sockets. You guys are quite dedicated to attempt to go through the hellish process of setting up the demo websocket proxy, TLS and deal with basically the WebGL version. Sorry to make you guys go through that.

image

@JChalka
Copy link

JChalka commented May 16, 2020

Much appreciated!
I'll get to messing around with it some in a bit :)

@optimus-code
Copy link

As you can see, it's working fine a default 317 server called Shards Revolution in Unity3D over normal TCP sockets. You guys are quite dedicated to attempt to go through the hellish process of setting up the demo websocket proxy, TLS and deal with basically the WebGL version. Sorry to make you guys go through that.

image

Thanks for the info! And don't worry haha I am just glad to see there is a C# port out there and that's thanks to you porting 317 Refactor, I am looking forward to getting stuck in.

Sorry I am not familiar with Shards Revolution, do you have a link?

Also, do you have any plans to port a C# server or make an existing one compatible? If you are I would be willing to help, I have around 15 years experience in C#, not a lot of in Java but the offer is there if you plan on it.

Thanks

@HelloKitty
Copy link
Owner

@optimus-code I considered it but could never really decide on an existing 317 server. I couldn't find a "best" implementation to port. I consider writing one from scratch and even replacing the 317 protocol/networking entirely. Never really committed to any decision though.

Here is shards, nothing works lol. It's an old unmaintained project that I only picked for testing. https://www.rune-server.ee/runescape-development/rs2-server/downloads/100621-shard-revolutions-standard-edition.html

What are your thoughts on a 317 opensource server worth porting to C#?

@JChalka
Copy link

JChalka commented May 17, 2020

reporting back,
image
rs317.library.client/Sprite.cs
I had commented out this line in previous attempts and forgot about it, but it seems I'm missing an assembly somewhere and wasn't sure which

@HelloKitty
Copy link
Owner

@Joeyjoe9876 That's an extension method defined in SixLabors.ImageSharp. What version are you referencing? Let me see what happens if I update this dependency. Maybe the extension method is gone.

@JChalka
Copy link

JChalka commented May 17, 2020

@Joeyjoe9876 That's an extension method defined in SixLabors.ImageSharp. What version are you referencing? Let me see what happens if I update this dependency. Maybe the extension method is gone.

yeah it was probably removed, I'm using the latest pull to build from

@HelloKitty
Copy link
Owner

It should be available in SixLabors.ImageSharp 1.0.0-beta0006 via NuGet.

@HelloKitty
Copy link
Owner

Try cleaning solution and running a nuget restore. Ensure you have <PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0006" /> in the csproj file for Rs317.Library.Client

@optimus-code
Copy link

@optimus-code I considered it but could never really decide on an existing 317 server. I couldn't find a "best" implementation to port. I consider writing one from scratch and even replacing the 317 protocol/networking entirely. Never really committed to any decision though.

Here is shards, nothing works lol. It's an old unmaintained project that I only picked for testing. https://www.rune-server.ee/runescape-development/rs2-server/downloads/100621-shard-revolutions-standard-edition.html

What are your thoughts on a 317 opensource server worth porting to C#?

I can appreciate that, there are tons of server bases but a lot of them are in a mess. From what I have seen Luna-RS seems quite mature but I've not tested it in-depth. It is still actively maintained too:

https://github.com/luna-rs/luna

I haven't been able to get it working with this client yet but will be trying again soon. I did share a C# 317 server codebase called cscape which I did actually get connecting once I disabled encryption, but then reached errors due to packets differences between this client and that server.

The reason I am so passionate about this is because I know the language features and rich library of frameworks available for .NET (And it's ease of debugging, portability etc) would make for a solid server base, and it's my language of choice so i'm biased.

My goals really are to have a stable client server combination, that can serve as a great base for a true C# refactoring where you actually take advantage of .NET libraries and C# language features to improve efficiency, use NoSQL database, add a scripting language, the world is your oyster. As you'd have C# client and server you could use something like Lidgren Network Library which would make the network layer a lot easier to manage and extend, and probably make it more reliable.

@JChalka
Copy link

JChalka commented May 17, 2020

image

Seems like the last roadblock I need to pass 😂
guessing this is along the same lines as before, assembly it's trying to reference is missing System.Drawing.Color

@optimus-code
Copy link

image

Seems like the last roadblock I need to pass 😂
guessing this is along the same lines as before, assembly it's trying to reference is missing System.Drawing.Color

If you hover over that little Lightbulb with the red X and click the down arrow it will suggest a fix (Add the reference for you)

@JChalka
Copy link

JChalka commented May 17, 2020

hehe it's suggestions don't contain Color.FromArgb() at all (Using Unity.Engine & Sixlabors.ImageSharp), tried that :)

using System.Drawing.Color.FromArgb(....
get namespace "Color" could not be found in System.Drawing yada yada, almost there 😂
(Using the latest Nuget pull in the current project)

@optimus-code
Copy link

If it's in .NET Standard you could try referencing the dll from the package https://www.nuget.org/packages/System.Drawing.Common/ unless you already have that referenced?

@HelloKitty
Copy link
Owner

HelloKitty commented May 17, 2020

@optimus-code Do you happen to know why Luna doesn't work? This project implements the 317 protocol normally, just without packet encryption. Yea my impression was that most were incomplete or not worth porting, due to the quality of the codebase.

Yea I think C#/.NET has a lot of potential, especially combined with Unity3D. I think similarly, which was the reason I ported this to begin with! I did try my best to utilize existing libraries in .NET where possible, instead of directly copying the Java source. Very little was directly replaceable though. Was able to replace the Bzip compression though!

I do not recommend Lidgren, that's an RUDP library. Just use the async TCP library in .NET. It's a better networking library than Lidgren is for most things, WoW and RS are both TCP and they worked fine imo.

@Joeyjoe9876 Please do a fresh clone of the repo. These problems should not occur if you run a solution rebuild/nuget restore. All these dependencies should be restored as they're defined in the csproj as nuget dependencies.

If you're just trying to drop this project into Unity3D it won't work. You must import the built assemblies/dll to Unity3D.

@optimus-code
Copy link

@optimus-code Do you happen to know why Luna doesn't work? This project implements the 317 protocol normally, just without packet encryption. Yea my impression was that most were incomplete or not worth porting, due to the quality of the codebase.

Yea I think C#/.NET has a lot of potential, especially combined with Unity3D. I think similarly, which was the reason I ported this to begin with! I did try my best to utilize existing libraries in .NET where possible, instead of directly copying the Java source. Very little was directly replaceable though. Was able to replace the Bzip compression though!

I do not recommend Lidgren, that's an RUDP library. Just use the async TCP library in .NET. It's a better networking library than Lidgren is for most things, WoW and RS are both TCP and they worked fine imo.

@Joeyjoe9876 Please do a fresh clone of the repo. These problems should not occur if you run a solution rebuild/nuget restore. All these dependencies should be restored as they're defined in the csproj as nuget dependencies.

If you're just trying to drop this project into Unity3D it won't work. You must import the built assemblies/dll to Unity3D.

I can't get it to connect on the WinForms project without trying to use the WebSocket proxy (Despite making sure portoffset is 0 and the ports are correct). When connecting to the WebSocket proxy it will then communicate with the server but fail because luna has custom RSA keys that the client has to use (I'm assuming this is why it gets no further).

Yeah sorry my bad I forgot RS was TCP.

@HelloKitty
Copy link
Owner

@optimus-code Sorry agaim, the Winforms client should not be using the Websocket implementation. I added this to test/debug the Websocket implementation, since that was very difficult to do when it was running in WebGL build. Let me make a push to correct this, which will restore normal TCP sockets for the WF implementation again.

@HelloKitty
Copy link
Owner

d602877 corrects this.

@HelloKitty
Copy link
Owner

I can communicate abit better if you join this Discord. I guess it can be the C# Runescape Discord lol. https://discord.gg/7NGCbkQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants