DEVS: Are you interested in a brand-new client?

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: DEVS: Are you interested in a brand-new client?

Postby boshaw » Sun Feb 13, 2011 4:35 am

Monkeytofu wrote:Java client is annoying too because Java itself doesn't know how to give you the right driver and you have to go download it from third party websites making it a bitch for a lot of people running 64 bit to play.


use a 64-bit web browser and it'll let you download the 64bit java set
User avatar
boshaw
 
Posts: 1590
Joined: Tue Jun 01, 2010 10:22 pm

Re: DEVS: Are you interested in a brand-new client?

Postby themendios » Sun Feb 13, 2011 7:14 am

Oddity wrote:Status report, OP.


Still running back through all the netcode since that's the majority of my effort, the sprite rendering will be trivial in comparison.

Question for loftar - is the auth server moltke.seatribe.se or havenandearth.com? I found most of the definitions of stuff I want but I'm not even sure what the auth server is since it's a System.getproperty and I'm not certain how you're setting it and without that I can't 'find usage' to figure out what you're setting. Also why are there 2 certs, authsrv and ressrv?

I don't want to start trying to hit the server until I feel like I have a pretty damn good grasp on the netcode since it's rude to just throw my hacky half-client at it for testing.

Also had a fun idea, make an ASCII text-render mode like DF (which I never played for more than 10 minutes) just for kicks.

EDIT: Also am I correct when I see that the minimap is not rendered on the fly but rather collected from the server? If so, why? Doesn't that add unnecessary load? Further if so: any problems with me rendering it on the fly?
themendios
 
Posts: 49
Joined: Mon Feb 07, 2011 6:32 pm

Re: DEVS: Are you interested in a brand-new client?

Postby loftar » Sun Feb 13, 2011 7:24 am

themendios wrote:Question for loftar - is the auth server moltke.seatribe.se or havenandearth.com? I found most of the definitions of stuff I want but I'm not even sure what the auth server is since it's a System.getproperty and I'm not certain how you're setting it and without that I can't 'find usage' to figure out what you're setting.

See Bootstrap.java:
Code: Select all
String authserver = (Config.authserv == null)?address:Config.authserv;

"address" is the address of the game server. If no auth server is explicitly specified in the Config, the game server is used by default.
(Reasonably, it should always be explicit in Config, but I only added that variable to Config as of late, and it was a rushed thing.)

themendios wrote:Also why are there 2 certs, authsrv and ressrv?

authsrv.crt is for the auth server, and ressrv.crt is for the HTTP server serving resources. The latter is protected with SSL as well since resources can contain arbitrary Java code, and thus it would be bad to have someone MITM the resource server and send malicious code to clients.

themendios wrote:EDIT: Also am I correct when I see that the minimap is not rendered on the fly but rather collected from the server? If so, why? Doesn't that add unnecessary load?

Mostly because it uses the same system as Cartography, which is able to save historical maps as well, but also to be able to render objects like trees and houses on the minimap beyond the cut-off distance. Either way, it's just a little bit of HTTP traffic. The server hardly notices it.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: DEVS: Are you interested in a brand-new client?

Postby themendios » Sun Feb 13, 2011 7:31 am

loftar wrote:See Bootstrap.java:
Code: Select all
String authserver = (Config.authserv == null)?address:Config.authserv;

"address" is the address of the game server. If no auth server is explicitly specified in the Config, the game server is used by default.
(Reasonably, it should always be explicit in Config, but I only added that variable to Config as of late, and it was a rushed thing.)

No I got that far, what i'm asking is what is the actual address Config.authserv by default? I found all the references to it and your (I'm guessing) test with the localhost but I need the actual address haha - all I'm finding are references to change it but if nothing changes it and it's not in arg[] what is the default value, moltke.seatribe.se?

I'll probably have questions on the 2nd part but I'm still digesting the rest.
themendios
 
Posts: 49
Joined: Mon Feb 07, 2011 6:32 pm

Re: DEVS: Are you interested in a brand-new client?

Postby themendios » Sun Feb 13, 2011 8:57 am

Ugh this SSL code is not trivial. Luckily I already had an HTTP code bit laying around.

I just wanna make sure I'm even hitting the right address getting these SSL errors :(
themendios
 
Posts: 49
Joined: Mon Feb 07, 2011 6:32 pm

Re: DEVS: Are you interested in a brand-new client?

Postby loftar » Sun Feb 13, 2011 9:16 am

themendios wrote:No I got that far, what i'm asking is what is the actual address Config.authserv by default?

Config.authserv is null by default.

The "address" variable itself is what is given on the command-line; that is, moltke.seatribe.se.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: DEVS: Are you interested in a brand-new client?

Postby themendios » Sun Feb 13, 2011 9:23 am

loftar wrote:
themendios wrote:No I got that far, what i'm asking is what is the actual address Config.authserv by default?

Config.authserv is null by default.

The "address" variable itself is what is given on the command-line; that is, moltke.seatribe.se.

Thanks!
themendios
 
Posts: 49
Joined: Mon Feb 07, 2011 6:32 pm

Re: DEVS: Are you interested in a brand-new client?

Postby themendios » Sun Feb 13, 2011 9:54 am

Okay I need a little help understanding your auth process sorry! Shouldn't need hand-holding once I get past this part, I don't know why it's taking so much effort, probably because I'm not incredibly comfortable with SSL and am afraid I'm messing that part up.

If I have the SSL set up and handshake complete (according to reflection), if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right? Then eventually get a token etc.

I'm sending successfully but then never get anything back, not even the 2-byte header. I don't know what I'm not getting on your code I've been through it 20 times.
themendios
 
Posts: 49
Joined: Mon Feb 07, 2011 6:32 pm

Re: DEVS: Are you interested in a brand-new client?

Postby loftar » Sun Feb 13, 2011 10:09 am

themendios wrote:if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right?

Generally, the protocol consists of a series of records, each of which follows the same format -- [type (uint8)][length (uint8)][data (length bytes)]. In responses from the server, the "type" field is the return value, where 0 normally indicates success and 1 indicates an error. So yes, you're right.

If I were to guess at what you're doing wrong, you need to flush the SSL stream after writing your message. Your SSL library is probably buffering the data, waiting to fill up an entire SSL record.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: DEVS: Are you interested in a brand-new client?

Postby marvi » Sun Feb 13, 2011 10:27 am

themendios wrote:Okay I need a little help understanding your auth process sorry! Shouldn't need hand-holding once I get past this part, I don't know why it's taking so much effort, probably because I'm not incredibly comfortable with SSL and am afraid I'm messing that part up.

If I have the SSL set up and handshake complete (according to reflection), if I understand your code correctly I should send a [0][length of username][username utf-8] byte array and get back a 2-byte header that starts with [0] right? Then eventually get a token etc.

I'm sending successfully but then never get anything back, not even the 2-byte header. I don't know what I'm not getting on your code I've been through it 20 times.


Some time ago, having the same issue I [almost] blindly rewrote original Java code. :]

Here the authentication code snippet which works for me: link. Hope this helps.
marvi
 
Posts: 138
Joined: Thu Feb 18, 2010 3:41 pm

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot], PetalBot [Bot] and 0 guests