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 CommandStar: Real-Time Chat, Online Players, and Server Status

Discussion in 'Multiplayer' started by Seriallos, Dec 15, 2013.

  1. Seriallos

    Seriallos Space Penguin Leader

    CommandStar is the best community tool for your players. Real-time (updates in the browser without needing to reload the page) information about your server in a simple, modern website. It's also super easy to install, runs like a charm, and has shown itself to be pretty damn stable.

    >> Live Demo: http://commandstar.munshot.com:8080/ <<

    This is connected to a public Starbound server at commandstar.munshot.com if you want to see it real-time yourself

    Current Release: 0.1.6 - https://github.com/seriallos/commandstar/releases/tag/v0.1.6

    Features so far:

    • Real-time list of players on the server
    • Real-time game chat
    • Real-time active solar systems
    • Server Totals
      • Worlds Explored
      • Total Unique Players
    • Basic server status monitoring (disabled by default due to socket leak in Starbound server)
    • Supports custom CSS to apply your own style.
    • Responsive design - works great on phones/tablets
    • Relay game chat to IRC or HipChat
    • Tested on Win7, Ubuntu 12.04, and OS X 10.9
    To play around, you can join the Starbound server at commandstar.munshot.com and test it out (be aware the demo is running on a small VPS so performance in-game will probably be pretty bad).

    To play around with CommandStar on your server, check out the GitHub repo:

    GitHub Repo: https://github.com/seriallos/commandstar

    Tech Details
    • NodeJS / CoffeeScript
    • WebSockets/socket.io used to push events to the web browser
    • Super basic Bootstrap theme for the website itself.
    • CommandStar runs as its own process on your server and monitors the server log in near real-time (+/- 200ms or so)
    Caveats

    Still very early in development but works pretty well so far. Check it out and let me know what you think!

    Please report bugs on the GitHub issues page! Makes it easier to track and you'll get notifications on bug updates!


    [​IMG]
     
    Last edited: Dec 31, 2013
  2. unleashurgeek

    unleashurgeek Space Spelunker

    Wow I really like this. Nice use of Node.js
     
    Seriallos likes this.
  3. Shirou

    Shirou Aquatic Astronaut

    Nice indeed would be nice to include more thing like server status and version etc... And for windows aswell :)
     
  4. Seriallos

    Seriallos Space Penguin Leader

    I'm doing some Windows testing right now. Doesn't look like it should be too hard, just have to figure out some configuration issues.
     
  5. Shirou

    Shirou Aquatic Astronaut

    Awe
    Awesome! Will you be able to add things like Online/Offline status, Server version etc aswell?
     
  6. Seriallos

    Seriallos Space Penguin Leader

    I think server version should be pretty straightforward. I'll have to dig into server status for Windows - haven't done process monitoring on Windows so I can't promise anything.
     
  7. Shirou

    Shirou Aquatic Astronaut

    Np, looking forward to see some of your work :)
     
  8. TheOtherDrew

    TheOtherDrew Big Damn Hero

    Just a thought for your small VPS. I have a small VPS myself, I got rid of most lag on this tiny machine by placing the assets folder in /dev/shm/ (Ramdisk) and symlinking to the Starbound/assets folder. Maybe you want to give it a shot. My server is running very stable now.
     
  9. Ripe

    Ripe Space Hobo

    You should be able to test if the server is online by using node's net module.

    Code:
    var net = require('net');
    
    exports.testServer = function (callback) {
        var socket = net.createConnection(21025, 'localhost');
    
        socket.on('error', function (error) {
            callback(false);
            socket.destroy();
        });
    
        socket.on('connect', function () {
            callback(true);
            socket.destroy();
        });
    };
    
    Usage:
    Code:
    var starbound = require('starbound');
    
    starbound.testServer(function (online) {
        console.log('Is server online:', online);
    });
    
     
    unleashurgeek likes this.
  10. bkg

    bkg Subatomic Cosmonaut

    Real Nice. Great Work :)
     
  11. Seriallos

    Seriallos Space Penguin Leader

    Yeah, demo server crashed because it ran out of memory! I didn't think people would hop on the server and play for a while so I wasn't really trying to set it up to handle long play sessions. I'll see if there's anything I can do to make it a bit better.
     
  12. Seriallos

    Seriallos Space Penguin Leader

    I will check this out. Definitely seems like a more flexible approach that should work on Windows, OS X, and Linux. Thanks!
     
  13. Seriallos

    Seriallos Space Penguin Leader

    Server version is now available as detected in the main log file. You can see it in the left column on the demo site at http://commandstar.munshot.com:8080/.
     
  14. Shirou

    Shirou Aquatic Astronaut

    Nice job dude! that looks awesome so far.
     
  15. Seriallos

    Seriallos Space Penguin Leader

    Server status now shows up on the page and I'm using Ripe's socket suggestion which should work on Windows. I may have time to test and write up docs for running on Windows later tonight.
     
  16. Seriallos

    Seriallos Space Penguin Leader

    Hmm, unfortunately it looks like the Starbound server never release sockets, at least on Linux. Eventually my server monitor causes the starbound server to crash due to too many open files. We'll see if I can reuse sockets or if I need to figure something else out.
     
  17. Seriallos

    Seriallos Space Penguin Leader

    Experiemental Windows support is in place!

    Instructions to install on Windows are on the GitHub page: https://github.com/seriallos/commandstar#installation

    Getting the website to show up to friends outside of your own network is something I'm not very familiar with so it may require a bit of work.
     
    DankBud likes this.
  18. greglgomez

    greglgomez Scruffy Nerf-Herder

    Looking good dude! Love what you've done. Gonna give this a go later!
     
  19. MajorCyto

    MajorCyto Phantasmal Quasar

    This is what i get on NPM install, on Ubuntu.

    Code:
    npm ERR! Couldn't read dependencies.
    
    npm ERR! Error: No 'name' field found in package.json
    npm ERR!    at /usr/share/npm/lib/utils/read-json.js:253:13
    npm ERR!    at /usr/share/npm/lib/utils/read-json.js:166:33
    npm ERR!    at P (/usr/share/npm/lib/utils/read-json.js:142:41)
    npm ERR!    at /usr/share/npm/lib/utils/read-json.js:108:7
    npm ERR!    at [object Object].<anonymous> (fs.js:115:5)
    npm ERR!    at [object Object].emit (events.js:64:17)
    npm ERR!    at afterRead (fs.js:1117:12)
    npm ERR!    at Object.wrapper [as oncomplete] (fs.js:254:17)
    npm ERR! You may report this log at:
    npm ERR!    <http://bugs.debian.org/npm>
    npm ERR! or use
    npm ERR!    reportbug --attach /root/commandstar/npm-debug.log npm
    npm ERR!
    npm ERR! System Linux 3.2.0-56-generic
    npm ERR! command "node" "/usr/bin/npm" "install"
    npm ERR! cwd /root/commandstar
    npm ERR! node -v v0.6.12
    npm ERR! npm -v 1.1.4
    npm ERR! message No 'name' field found in package.json
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR!    /root/commandstar/npm-debug.log
    npm not ok
    
     
  20. malobre

    malobre Orbital Explorer

    Very great work ;)
    I installed it on my VPS and it works well :D
     

Share This Page