1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion SharpStar - Proxy server with support for C#, Python, Javascript, and Lua plugins

Discussion in 'Multiplayer' started by Mitch528, Feb 8, 2014.

  1. Underbalanced

    Underbalanced Phantasmal Quasar

    The important thing is we are testing to help before sb gets busier.
     
  2. Underbalanced

    Underbalanced Phantasmal Quasar


    I had lag complaints while the wrapper was used, but after non. With 4-6 people. Could not pin point it though.
     
  3. Blaze9

    Blaze9 Subatomic Cosmonaut

    Definitely would be amazing to have PEX style perms...

    Edit: This is probably the fourth time I have asked for a great peice of work... I want to make it clear that I would help code if I wasn't incredibly busy right now. :)
     
  4. Underbalanced

    Underbalanced Phantasmal Quasar

    Yup. I am going to start working on chat plugin this weekend. To push all chat to wrapper vice sb server.

    Then can create other plugins for chat abilities. Not sure if ill build it all in one or make extensions. But im almost done learning c#. Then ill analyze how starrypy 3.4 handles the chat since the wrapper handles all chat and never sends it to the server.
     
  5. ArchGaden

    ArchGaden Big Damn Hero

    I attached the source for my chat bypass plugin if you want to take a look. It works great in my local testing, but I'm sure there are bugs with it and it could definitely use some cleanup.

    It doesn't do a whole lot yet, but here is what it does do:
    -Bypass starbound chat so that chat never touches the starbound server
    -Block's /nick because I can't support that and I hate /nick anyway (nightmare for rule enforcement)
    -Throttles chat to 1 message per second
    -Passes through commands so they can still work

    It could be easily modified to support appending name color tags and such based on permission levels. My access control plugin strips special characters out of player names (so no color codes). If you're going to append titles to names, you'll definitely want to kill special characters so that people can't fake the titles. I can post some code snippets for stripping special characters if you like, but that is pretty basic stuff anyway.
     

    Attached Files:

  6. Underbalanced

    Underbalanced Phantasmal Quasar

    That well help. Thank you.
     
  7. Underbalanced

    Underbalanced Phantasmal Quasar

    I analyzed the ChatPlugin. I know that some others are using modified versions of starrybound now and not this. I tested the server with this wrapper and the modified starrybound. Big difference on more then 4 players Starrybound was smooth. I am not good or even know much c# yet, all these options. Must decide what to do with myself.


    EDIT:
    Java seems more logical, for support to both OS's, without much requirment installs and what not.
    Minecrafts large Plugin Community is JavaBased, more potential plugin makers.

    Just saying. It shouldnt be hard to take the bukkit infastructure concept and take the framework.
     
    Last edited: Apr 15, 2014
  8. teihoo

    teihoo Ketchup Robot

    So do I :)
     
    Underbalanced likes this.
  9. ArchGaden

    ArchGaden Big Damn Hero

    Updated my chat bypass plugin. I added support for whispering using,

    /w Player Message
    /w "Player Name" Message
    Also /msg works instead of /w

    Starbound's whisper system doesn't handle player names with spaces in it... which has been a bad issue. Of course, if some idiot puts quotes in their name, they deserve never to be talked to privately.
     

    Attached Files:

  10. Blaze9

    Blaze9 Subatomic Cosmonaut

    Hmm, never heard of a Java wrapper before........ :zzz:
     
  11. Underbalanced

    Underbalanced Phantasmal Quasar

    Minecrafts are all in Java. Anyhow I start working this weekend. I changed my college courses to Java, they only had one C#, but they have a very advanced line of programming in Java (About 5 classes, Plus supporting classes) (I work full time, but do one-two classes at a time courtesy of free school from work) . Ill Start at home tonight with tutorials and then the classes starts in June. My goal is to have a plan by this weekend on the style. If I will open the server through the wrapper or have it run separate. Initially I will be just making it all pass through the wrapper and then add the plug-in capabilities, in which the plug-ins can modify the behavior of the wrapper. To be determined. But that’s a Gist, Java has a lot of tutorials on this subject and type of programming any how to help get me started.
     
    Last edited: Apr 16, 2014
  12. ArchGaden

    ArchGaden Big Damn Hero

    Minecraft's mod community goes with java because minecraft was written in java. Java has the 'advantage' of being almost trivial to decompile... so you can open up minecraft, look at it's code, and even change it if you like. By writting the plugins in java, they can tie in rather directly with minecraft, allowing them to be quite powerful, affecting the game on the most fundamental levels. We can't do that with Starbound though, so there is no need to stick with java. Java has a host of disadvantages... for one, being an interpreted language, it isn't very fast compared to most others. If you're going to choose your wrapper/plugin language purely on merit, you won't choose Java. A lot of people favor Java though because it's what they know from school. I expect Notch picked Java for that very reason. He certainly had no clue what Minecraft was going to become when he started... it was more of a quick and dirty 'make it because I can' type game that struck gold. Fortunately he has a very open stance to modding. Most game devs would have jumped off the Java ship to protect their source code as soon as a whiff of profit came their way. The ability to decompile java so easily is often seen as a major disadvantage. In any case, there is no compelling reason to use Java for anything starbound related other than 'It's what I know'.

    I like C#, it's fast, easy, and very cross platform. .NET isn't cross platform though, so we have to resort to Mono for Sharpstar, sadly. I can deal with any language though. If it's unfamiliar, I just have to learn some new syntax.
     
  13. Underbalanced

    Underbalanced Phantasmal Quasar


    Yes so we are using Java for the cross platform, it isnt obscure as C# when compiled. If peformance becomes an issue we will look at it. But I see no one else providing cross platform support solution that will work smoothly across systems, that do not require a slew of requirments in setup. Additionally I do not think Peformance will be an issue. You gave a host of disadvantages, but no advantages. That is ok. I am not going to argue this anymore. I will just do it for my server to start before releasing it. Then I will decided if I should share. Maybe I do not need to give my nay sayers or competetors an edge.
     
  14. Mitch528

    Mitch528 Big Damn Hero

    I'm not sure what you mean by C# being more obscure when compiled. Java is compiled into Java bytecode, whereas C# is compiled into MSIL (also a type of bytecode). You're right. Java is probably the better choice in terms of cross-platform, but only because more servers have Java already installed for one reason or another. However, the C# language is a lot better than Java in my opinion. There are advantages and disadvantages to both languages. There isn't really a "slew of requirements" for using .NET on Linux. All you need is Mono, which isn't that hard to setup. There is no need for arguing. We all here are trying to contribute for the good of the Starbound community (at least I hope so).
     
  15. ArchGaden

    ArchGaden Big Damn Hero

    Ah, I didn't mean to come off as java hating. Every language has advantages and disadvantages. Mainly I wanted to make sure you weren't stuck with a 'minecraft did it, so it must be the right way' mentality. Minecraft did quite a lot wrong throughout it's development. The early days of minecraft servers were about as frustrating as our days here are... Fortunately the fans fixed things up to make multiplayer workable and Notch hired on some reasonable developers later (like the entire bukkit team) to get things fixed up.

    It looks like we're going to have to do the same thing with Starbound. The devs aren't fixing the server... so we'll have to do it ourselves and hopefully they'll pitch in and help us out when they realize that the multiplayer game is their life-blood. Working together as best we can... in Java, C#, or whatever will be the best thing for everyone.

    Now, if only we could decompile Starbound so easily to learn what makes it tick... I still need a way to limit selectively limit what modded items can do... particularly when it comes to capping the amount of JSON data passed up in the item.
     
  16. Underbalanced

    Underbalanced Phantasmal Quasar

    People here are afraid of something they cannot decompile and understand. The .Exe... I was going to make c# plug-in, but then the performance of SharpStar has had unpinnable issues claimed by my players as well as another server mentioned the same problems. Without it the players stopped complaining lag. Someone approached me about using a modified Starrybound client. But that does not have Mod Support. So I evaluated the whole situation and the attempts so far on wrappers before selecting Java. I picked Java not because of minecraft, just that it is the long standing example. I know it’s not the same, I have already evaluated bukkit code several times.



    Also Java we could make a client that uses starbound but could implement mod syncing and other features. Would be easy for end users to use.
     
  17. ArchGaden

    ArchGaden Big Damn Hero

    That always irks me. A java program may not have an exe, but it can still do just as much damage as any random exe. Also people could download the sharpstar source (or the source for any of the other wrappers) and compile it for themselves. Visual Studio 2013 Express is free. All you have to do is download that, open the project, and compile.

    I'm still on the fence for SharpStar performance. I've run one major test, so I can't judge yet. Sharpstar has been very easy to use and write plugins for. If there is a problem with Sharpstar's performance...well... its still early in Sharpstar's life, I expect we'll get it fixed. In any case, good luck writing your own java wrapper. The more approaches we try, the more likely we are to find something that works well!
     
  18. Mitch528

    Mitch528 Big Damn Hero

    C# can also be easily decompiled, and the syntax is very similar to Java, so that's not really an issue. I believe I've discovered the SharpStar performance issues. The issue (I believe) is that the buffer size was way to small when reading from the client. However, increasing the buffer size revealed issues with the Packet reader. So I'm currently working on fixing that.

    I don't see why you wouldn't also be able to do it in C#.
     
  19. Underbalanced

    Underbalanced Phantasmal Quasar

    Well get that any programming can be bad and hidden. Im one of the proponents that was mad at chucklefishes reddit saying exes are bad. Ok mitch thats good. Have you thought about looking at starrybound design for peformance comparisons.
     
  20. Mitch528

    Mitch528 Big Damn Hero

    Yeah, I've looked at Starrybound's code. It's a real mess and written pretty poorly. For one thing, they don't dispose of unmanaged resources, so that's a memory leak right there. Also, they write all the code for the server/client reading in one huge class, which is really bad design.

    Edit:

    Another thing that irritates me about Starrybound's code is they don't follow the C# coding/naming conventions (e.g they use camelCase instead of PascalCase for their method names).
     
    Last edited: Apr 16, 2014

Share This Page