- Joined
- Jul 29, 2013
- Messages
- 186
- Reaction score
- 78
I have had the Spiral Knights beta client on my hard drive for years, because of an old thread on here discussing potential server code within it. Recently I chose to delve into it myself and see what there was to find, and it would appear that 90-95% of the server code does in fact reside within. While i do have a decent feel for Java, I don't have a good enough grasp to take advantage of this, so I thought I'd post it on here for others to see.
Here's what I've found:
(Here's the beta client for those who don't have it:
(note: I logged the current client to figure out the launch args for it, and adjusted them for the beta client. They are
1. De-compiling the code I found that the main class for the server resides at com.threerings.projectx.server.ProjectXServer. It can be launched with:
but it will crash with an error due to missing classfiles from the public Samskivert library specifically:
which can be merged in as classfiles without any additional errors relating to them from here:
2. Once they are added the server will get to init, but it will fail with the error
Going through the dependencies for the main server class it would appear that this is the only missing classfile for the server project that isn't included in the beta client. It should be a simple matter to create a workaround for this... but that is beyond the scope of my abilities. In posting this I hope that someone may be able to find how to get a working server up and running.
Edit - Further exploration has shown that by editing the deployment.properties file in code/config.jar to have the server location be localhost, starting the client, then running:
creates a server which will accept incoming connections from the client, but cannot proceed from there. Perhaps this acts like a login sub-server for the game?
Edit 2: PresentsServer appears to be part of the open source Narya library that Threerings uses:
Here's what I've found:
(Here's the beta client for those who don't have it:
You must be registered to see links
)(note: I logged the current client to figure out the launch args for it, and adjusted them for the beta client. They are
Code:
java.exe -classpath F:\spiral\.\code\config.jar;F:\spiral\.\code\projectx-config.jar;F:\spiral\.\code\projectx-pcode.jar;F:\spiral\.\code\lwjgl.jar;F:\spiral\.\code\lwjgl_util.jar;F:\spiral\.\code\jinput.jar;F:\spiral\.\code\jutils.jar;F:\spiral\.\code\jshortcut.jar;F:\spiral\.\code\commons-beanutils.jar;F:\spiral\.\code\commons-digester.jar;F:\spiral\.\code\commons-logging.jar -Dcom.threerings.getdown=true -Xmx256M -XX:+AggressiveOpts -XX:SoftRefLRUPolicyMSPerMB=10 -Djava.library.path=F:\spiral\./native -Dorg.lwjgl.util.NoChecks=true -Dsun.java2d.d3d=false -Dappdir=F:\spiral\. -Dresource_dir=F:\spiral\./rsrc -Xmx512M com.threerings.projectx.client.ProjectXApp
1. De-compiling the code I found that the main class for the server resides at com.threerings.projectx.server.ProjectXServer. It can be launched with:
Code:
java.exe -classpath F:\spiral\.\code\config.jar;F:\spiral\.\code\projectx-config.jar;F:\spiral\.\code\projectx-pcode.jar;F:\spiral\.\code\lwjgl.jar;F:\spiral\.\code\lwjgl_util.jar;F:\spiral\.\code\jinput.jar;F:\spiral\.\code\jutils.jar;F:\spiral\.\code\jshortcut.jar;F:\spiral\.\code\commons-beanutils.jar;F:\spiral\.\code\commons-digester.jar;F:\spiral\.\code\commons-logging.jar -Dcom.threerings.getdown=true -Xmx256M -XX:+AggressiveOpts -XX:SoftRefLRUPolicyMSPerMB=10 -Djava.library.path=F:\spiral\./native -Dorg.lwjgl.util.NoChecks=true -Dsun.java2d.d3d=false -Dappdir=F:\spiral\. -Dresource_dir=F:\spiral\./rsrc -Xmx512M com.threerings.projectx.server.ProjectXServer
Code:
com.samskivert.depot.impl.PostgreSQL4Builder
and
com.samskivert.depot.impl.PostgreSQLBuilder
You must be registered to see links
2. Once they are added the server will get to init, but it will fail with the error
Code:
WARNING com.threerings.projectx: Server initialization failed. java.lang.NoClassDefFoundError: Lcom/threerings/projectx/server/ProjextXSupportManager
Edit - Further exploration has shown that by editing the deployment.properties file in code/config.jar to have the server location be localhost, starting the client, then running:
Code:
java.exe -classpath F:\spiral\.\code\config.jar;F:\spiral\.\code\projectx-config.jar;F:\spiral\.\code\projectx-pcode.jar;F:\spiral\.\code\lwjgl.jar;F:\spiral\.\code\lwjgl_util.jar;F:\spiral\.\code\jinput.jar;F:\spiral\.\code\jutils.jar;F:\spiral\.\code\jshortcut.jar;F:\spiral\.\code\commons-beanutils.jar;F:\spiral\.\code\commons-digester.jar;F:\spiral\.\code\commons-logging.jar -Dcom.threerings.getdown=true -Xmx256M -XX:+AggressiveOpts -XX:SoftRefLRUPolicyMSPerMB=10 -Djava.library.path=F:\spiral\./native -Dorg.lwjgl.util.NoChecks=true -Dsun.java2d.d3d=false -Dappdir=F:\spiral\. -Dresource_dir=F:\spiral\./rsrc -Xmx512M com.threerings.presents.server.PresentsServer
Edit 2: PresentsServer appears to be part of the open source Narya library that Threerings uses:
You must be registered to see links
Last edited: