Spiral Knights server code in Beta client

Page 1 of 3 123 LastLast
Results 1 to 15 of 38
  1. #1
    Ultimate Member Ness199X is offline
    MemberRank
    Jul 2013 Join Date
    185Posts

    Spiral Knights server code in Beta client

    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: Spiral.7z)
    (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
    but it will crash with an error due to missing classfiles from the public Samskivert library specifically:
    Code:
    com.samskivert.depot.impl.PostgreSQL4Builder
    and
    com.samskivert.depot.impl.PostgreSQLBuilder
    which can be merged in as classfiles without any additional errors relating to them from here:
    http://repo1.maven.org/maven2/com/sa.../depot-1.0.jar

    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
    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:
    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
    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: https://github.com/threerings/narya
    Last edited by Ness199X; 08-08-13 at 11:18 PM.


  2. #2
    Account Inactive sinkillerj is offline
    InactiveRank
    Aug 2013 Join Date
    1Posts

    Re: Spiral Knights server code in Beta client

    I have been playing around with this a little bit, one dependency I found that needs to be added is the redistributable api jar from: Performance and Memory Java Profiler - YourKit Java Profiler

    There are bigger problems however, every "persist" folder is missing, leaving out classes like KnightRepository, ItemRepository, SceneRepository, etc. These are likely in a different jar that was never distributed with spiral. Clearly alot of recoding will need to take place.

    Edit: Found another dependency, other deps can be found here too, so far ive needed cron as well: http://mirrors.ibiblio.org/maven2/co...o-user-1.4.jar
    Last edited by sinkillerj; 25-08-13 at 11:30 PM.

  3. #3
    Ultimate Member Ness199X is offline
    MemberRank
    Jul 2013 Join Date
    185Posts

    Re: Spiral Knights server code in Beta client

    Oh interesting I didnt see those. I'll check them out next time I get on my main machine. I've got a friend who's interested in trying to create a C# (bleh, C#) framework for the server, so I'll see where I can get.

    Edit: Also im fairly sure the 'persist' libraries are part of the database, so I've been trying to see if I can 'ignore' those for now.

  4. #4
    Newbie BigBoyPL is offline
    MemberRank
    Aug 2009 Join Date
    4Posts

    Re: Spiral Knights server code in Beta client

    Guyz I think that we must run server from projectx to get sk working server.
    If you will run presents it's blank server without configuration. Normal Spiral knights server runs in FreeBSD and it uses a lot of databases.
    Even if you will connect client there will be no message. Server don't know which client version allow and which not allow etc. There are no accounts of course so you can't login. I think configuration for spiral knights is projectx folder since you can use narya to run other games and it's blank (no specific game configuration). Our misfortune is that projectx code was never shared ;[.

    @Edit this files are missing only in ProjectXServer:
    import com.threerings.projectx.server.persist.MachIdentRepository;
    import com.threerings.projectx.server.persist.PlayerRepository;
    import com.threerings.projectx.server.persist.ProjectXSceneRepository;
    import com.threerings.projectx.slink.server.SlinkManager;
    import com.threerings.projectx.social.server.SocialManager;
    import com.threerings.projectx.town.server.TownManager;
    import com.threerings.projectx.tx.server.TransactionManager;
    import com.threerings.projectx.uplink.server.UplinkManager;
    import com.threerings.projectx.util.DeploymentConfig;
    import com.threerings.sega.SegaPass;
    import com.threerings.slink.server.SlinkRegistry;
    import com.threerings.underwire.server.SupportManager;
    Last edited by BigBoyPL; 12-11-13 at 02:47 PM.

  5. #5
    Ultimate Member Ness199X is offline
    MemberRank
    Jul 2013 Join Date
    185Posts

    Re: Spiral Knights server code in Beta client

    Quote Originally Posted by BigBoyPL View Post
    Guyz I think that we must run server from projectx to get sk working server.
    If you will run presents it's blank server without configuration. Normal Spiral knights server runs in FreeBSD and it uses a lot of databases.
    Even if you will connect client there will be no message. Server don't know which client version allow and which not allow etc. There are no accounts of course so you can't login. I think configuration for spiral knights is projectx folder since you can use narya to run other games and it's blank (no specific game configuration). Our misfortune is that projectx code was never shared ;[.

    @Edit this files are missing only in ProjectXServer:
    Yeah, I know the main code is in ProjectX, but the configuration library is missing (projectx.projectxsupportmanager) the rest is easy to bypass.

  6. #6
    Newbie BigBoyPL is offline
    MemberRank
    Aug 2009 Join Date
    4Posts

    Re: Spiral Knights server code in Beta client

    Strange cause I've decompilled ProjectXServer and there is no info to import this class. Missing classes are only the ones that I wrote earlier.
    Maybe projectx.projectxsupportmanager is com.threerings.underwire.server.SupportManager and the name was changed because it imports locally.

  7. #7
    Ultimate Member Ness199X is offline
    MemberRank
    Jul 2013 Join Date
    185Posts

    Re: Spiral Knights server code in Beta client

    Quote Originally Posted by BigBoyPL View Post
    Strange cause I've decompilled ProjectXServer and there is no info to import this class. Missing classes are only the ones that I wrote earlier.
    Maybe projectx.projectxsupportmanager is com.threerings.underwire.server.SupportManager and the name was changed because it imports locally.
    It is.

  8. #8
    Newbie asmirwork is offline
    MemberRank
    Jul 2014 Join Date
    2Posts

    Re: Spiral Knights server code in Beta client

    Sorry for the up
    But i have looked the source code of the class file
    and i think it's totally possible to make a localhost server.
    Just need to work on it because i don't understand all the code im not a pro.
    It can be cool a private server is possible but it's complicated.
    So why not try to make a localhost server and try to work more on it for improve it.
    PS: Sorry for the bad english.


    EDIT : I have found something cool

    I have decompile the projectx-pcode
    and in projectx-pcode\com\threerings\presents\client\

    Client.class i have found the use of the port
    DEFAULT_SERVER_PORTS = { 47624 };
    But i can't found where change the hostname.
    Last edited by asmirwork; 19-07-14 at 12:22 AM. Reason: I Found Something

  9. #9
    Newbie Aetheros is offline
    MemberRank
    Dec 2013 Join Date
    1Posts

    Re: Spiral Knights server code in Beta client

    Can anyone find any of the server sources left in the current client?

  10. #10
    Newbie BigBoyPL is offline
    MemberRank
    Aug 2009 Join Date
    4Posts

    Re: Spiral Knights server code in Beta client

    I think sources was only in closed beta, then it was partial deleted in open beta and since game is not in beta there is 0 % server side.
    I think also we are missing all databases, like account etc. and we can't create server without it.
    It's easy to modify client to connect to every server you want but it does nothing when you don't know account that you want to log in ;]

  11. #11
    Registered Meehoweq is offline
    MemberRank
    Aug 2014 Join Date
    12Posts

    Re: Spiral Knights server code in Beta client

    [Sorry. This has been redacted]
    Last edited by Meehoweq; 04-04-21 at 04:12 PM.

  12. #12
    Newbie BigBoyPL is offline
    MemberRank
    Aug 2009 Join Date
    4Posts

    Re: Spiral Knights server code in Beta client

    Hi Meehoweq
    Jak idzie ? / How it's going ?

    I have some progress
    I can run narya server and connect a client to my narya server.
    I've deleted authentication by adding narya classes before auth patch (Smart me :D)
    I can see that I'm connected but this server is not spiral knights server, just empty server so when I will try to logon it will try to logon for ever.

    I have completed missing class list from projectx/server
    com.threerings.projectx.server.AccountActionManager
    import com.threerings.projectx.server.persist.KnightRepository;
    import com.threerings.projectx.server.persist.NameMapRecord;

    com.threerings.projectx.server.KnightManager
    import com.threerings.projectx.craft.server.persist.RecipeRepository;
    import com.threerings.projectx.dungeon.server.persist.DungeonRepository;
    import com.threerings.projectx.dungeon.server.persist.GateProgressRecord;
    import com.threerings.projectx.guild.server.persist.GuildMemberRecord;
    import com.threerings.projectx.guild.server.persist.GuildRepository;
    import com.threerings.projectx.item.server.persist.ItemRepository;
    import com.threerings.projectx.server.persist.KnightCatalogRecord;
    import com.threerings.projectx.server.persist.KnightRecord;
    import com.threerings.projectx.server.persist.KnightRepository;
    import com.threerings.projectx.server.persist.NameMapRecord;
    import com.threerings.projectx.server.persist.PlayerRecord;
    import com.threerings.projectx.server.persist.PlayerRepository;
    import com.threerings.projectx.server.persist.StoredObjective;
    import com.threerings.projectx.social.server.persist.FriendRecord;
    import com.threerings.projectx.social.server.persist.FriendRepository;
    import com.threerings.projectx.uplink.server.persist.UplinkRepository;

    com.threerings.projectx.server.ProjectXClientResolver
    import com.threerings.projectx.server.persist.KnightRecord;
    import com.threerings.projectx.server.persist.KnightRepository;
    import com.threerings.projectx.server.persist.MachIdentRecord;
    import com.threerings.projectx.server.persist.MachIdentRepository;
    import com.threerings.projectx.server.persist.PlayerRecord;
    import com.threerings.projectx.server.persist.PlayerRepository;
    import com.threerings.projectx.uplink.server.persist.UplinkRepository;

    com.threerings.projectx.server.ProjectXEvent
    import com.threerings.panopticon.common.event.EventType;
    import com.threerings.panopticon.common.event.annotations.Event;
    import com.threerings.panopticon.common.event.annotations.Index;

    com.threerings.projectx.server.ProjectXEventLogger
    import com.threerings.panopticon.client.EventLogger;

    com.threerings.projectx.server.ProlectXSceneRegistry
    import com.threerings.projectx.server.persist.ProjectXSceneRepository;
    import com.threerings.projectx.server.persist.SceneNameRecord;

    com.threerings.projectx.server.ProjectXServer
    import com.threerings.projectx.server.persist.MachIdentRepository;
    import com.threerings.projectx.server.persist.PlayerRepository;
    import com.threerings.projectx.server.persist.ProjectXSceneRepository;
    import com.threerings.projectx.slink.server.SlinkManager;
    import com.threerings.sega.SegaPass;
    import com.threerings.slink.server.SlinkRegistry;
    import com.threerings.underwire.server.SupportManager;

    com.threerings.projectx.server.ProjectXSession
    import com.threerings.projectx.server.persist.KnightRepository;
    import com.threerings.projectx.server.persist.MachIdentRepository;
    import com.threerings.projectx.server.persist.PlayerRepository;
    Also you need to add to your code ooo-cron-1.1.jar and ooo-facebook-1.1.jar because this files are used too.

    I think that some part can be bypassed same way like it was done in other game called "Puzzle Pirates"
    Search for ThreeDonuts Puzzle Pirates and you will find tool and source ;]
    I'm not that good in java but if I'm not wrong somebody listened TCP and UDP packets when he is connecting to server and he has emulated this packets in his app.

  13. #13
    Registered Meehoweq is offline
    MemberRank
    Aug 2014 Join Date
    12Posts

    Re: Spiral Knights server code in Beta client

    [Sorry. This has been redacted]
    Last edited by Meehoweq; 04-04-21 at 04:12 PM.

  14. #14
    Registered Meehoweq is offline
    MemberRank
    Aug 2014 Join Date
    12Posts

    Re: Spiral Knights server code in Beta client

    [Sorry. This has been redacted]
    Last edited by Meehoweq; 04-04-21 at 04:12 PM.

  15. #15
    Newbie robertrevolt is offline
    MemberRank
    Dec 2016 Join Date
    1Posts

    Re: Spiral Knights server code in Beta client

    what happend with this sever thing? is there any work?



Page 1 of 3 123 LastLast

Advertisement