[GAME] Space Nerds In Space

edited August 2013 in Space Nerds in Space
Description: Space Nerds In Space is a cooperative multiplayer networked starship simulator for linux inspired by Artemis Bridge Simulator. The idea is you get several of your friends together with their computers in a room with a projector. One computer runs the central server simulation of the game's universe. Each player's computer acts as a station on a simulated starship. For example, there are stations for Navigation, Weapons, Engineering, Communications, Damage Control, and the "Main View" (an out-the-window 3d rendering.) 
(from the SNIS website)

Operating Systems:
Linux $Free - Compile from source code

In development - Source Code Available - Playable - No compiled binaries yet


  • edited August 2013
    Here are some pictures of a test run of Space Nerds in Space on Raspberry Pis I took from earlier this week



  • edited August 2013
    A ship generator has been created for SNIS. It's still a work in progress, and currently creating ships with too many triangles to work in game.
    It's called Ship-Not-Even-Wrong
    Here's the source code: https://github.com/smcameron/opencscad
    Video: http://youtube.com/watch?v=VnyerXljmrQ
  • OpenGL has been added to the Main Screen to help with 3d rendering in recent commits to the source code.
    Unfortunately, this breaks compatibility with devices that use OpenGL ES. A limited client is being worked on for using these devices as stations but not the main screen. You will need a full Open GL compatible system to run as the main screen, such as a PC.
  • Newest Video with 3D updates from the more-coord-fixing branch from GitHub.
  • edited January 2014
  • edited January 2014
    2nd January 2014 update video

  • Have updated how docking works in SNIS:

  • Cool. Looks like it's going to be a little tougher on helm to dock the ship.
  • edited August 2015
    I've added a mining system to Space Nerds In Space:

  • edited August 2015
    First I want to thank you for putting in the time and energy to SNIS! I finally got it running a few days ago and I've been learning the various stations before I bring this to my role playing group.

    This forum seems to be the best source for information about the game unless you know how to read the code from GitHub. Anyway, my question was related to the GM screen and if there was a tutorial on how to run a mission or create missions? I'm also interested in any server tutorials. I can easily start the server from the client screen but is there a way to have it start on the same port each time so I can have remote clients connect through the firewall?

    I know, a lot for a first post, but one last question. Do you have any problems if I make role specific tutorials and post them in YouTube? They would mainly be for the benefit of my role playing group but might be of assistance to others interested in SNIS too.

    Again, thanks for putting this out there for people to play.

  • Hi BigEd, and thanks for giving SNIS a try. It's still a work in progress, as you may have noticed.

    So the GM screen has got some problems. The main one is that it was designed back when the game was still 2D, and now that the game has a proper 3D universe to romp around in, the GM screen needs some work, as it remains fundamentally 2D, unfortunately.

    That being said, I will try to explain a little bit of how to use it. I haven't made a video about it because a lot of the things that it does are sort of experimental hacks (it started life as a debugging screen, really.)

    But, here is a quick guide to the SNIS "DEMON" screen (it's called that because you're sort of like Maxwell's Demon, mucking about in the universe.)

    First thing to know, you can type "help" into the Demon screen's command box to get a reminder.

    Here are the commands you can type into the demon screen's command box:

    SAFEMODE -- TOGGLES SAFE MODE (prevents enemies from attacking)

    So, the "attack" command refers to named groups that you create with the "name" command. The idea is you select some group of ships, give the group a name with the "name" command, select some other group of ships, give them a name, then command one group to attack another. Granted it's a little cumbersome -- like I said, this was really just a debug screen.

    The "clear-all" command will wipe out all the objects from the universe (i.e. in case you want to make your own.)

    "safemode" will prevent computer controlled ships from deciding to attack player controlled ships (if the ships have already begun attacking, safemode will not make them change their mind.) Actually safemode is a toggle. Typing it once turns it on, typing it again turns it off -- there is no indication currently of which mode it's in, but it starts off in the "off" state.

    There is a "captain" button. if you select the captain button, then select a ship with right mouse button, you'll see a big vibrating red circle around it. You can steer and drive the ship with arrow keys, and shoot the ships phasers and torpedoes with the on screen buttons on the left side of the screen. This worked reasonably well in 2D, it really doesn't work at all in 3D.

    The "planet", "starbase", "asteroid", "nebula", "monster" buttons on the left side allow you to place these items into the game ("monster" probably doesn't work or do anything good at the moment.) The idea is you select the button, it turns white, then you use the left mouse button to sprinkle these items into the galaxy. You only get to control 2 axes, the 3rd axis is more or less randomly selected within some band. This band is wide enough that you cannot count on dropping a starbase near a player ship, for example, as it may appear quite a long ways above or below them. This is another item that worked better in 2D than it does in 3D.

    If for example, you use "clear-all", then the buttons above to place various things around the universe how you like, you can then save this configuration with the "enscript" command, which will create a Lua script to recreate this configuration. For example, "enscript blah.lua" will create the file "BLAH.LUA" in share/snis/luascripts with a bunch of commands to add all those objects into the universe in their current positions. It does not save everything (for example, it does not save the mental state of various ships -- that they were in the midst of attacking each other, and that sort of thing -- just their locations.)

    To run a lua script (which must live on the server in share/snis/luascripts, and have an all caps filename like SOMETHING.LUA, type "lua something.lua" into the demon screen command box.

    You can see a few examples of lua scripts in share/snis/luascripts. The game doesn't rely on them too much for ordinary game mechanics, the lua scripts are intended to support creating scenarios. It remains to be seen how well fleshed out this API is, as there hasn't really been much done in the way of providing scenarios. The Lua API is described here in lua-api.txt (here: https://github.com/smcameron/space-nerds-in-space/blob/master/lua-api.txt )

    The identify command, iirc, causes a previously "named" group to flash, so you can tell which ships are part of that named group.

    To move a ship, or group of ships (or other objects), select them (either individually by right clicking on them, or by drawing a rectangle around them by right-click-dragging). Each time you select a ship, it is added to the currently selected ships. Selecting a ship a 2nd time de-selects it. Hitting the "select none" button on the left side of the screen de-selects everything. To move them, middle click and drag. Again, this worked a lot better back when the game was 2D.

    That's about it for the "demon" screen, I guess. But feel free to ask.

    As for starting the server with a fixed port number... hmm. Currently the snis_server portnumber is chosen by this bit of code in snis_server.c

    * choose a random port in the "Dynamic and/or Private" range
    * see http://www.iana.org/assignments/port-numbers
    port = snis_randn(65335 - 49152) + 49151;
    snis_log(SNIS_INFO, "Trying port %d\n", port);
    sprintf(portstr, "%d", port);

    In other words, it is chosen randomly. You could change that port = snis_randn(...) to whatever you want. Now that you mention it, I should provide a way for the player to control that, maybe via a command line switch or environment variable. I made a bug to track this issue:

    If you want to make videos, please, by all means go right ahead. You should probably mention the date when the video is made, as things tend to change over time, and working on this game is kind of my long term hobby at this point. At some time I ought to get around to making the demon screen work in 3D better than it currently does, for example.

    Hope that helps. BTW, another place SNIS discussion occurs is here:

  • Oh, another point.  There are man pages (manual pages).  If you install the game, you can do

    man snis_server
    man snis_client
    man ssgl_server

    Or, if you want to read the man pages without installing, after cloning from github:

    nroff -man < snis_server.6 | more
    nroff -man < snis_client.6 | more
    nroff -man < ssgl/ssgl_server.6 | more

  • There is now a way for the user to specify which port snis_server listens on, and a way to run both snis_client and snis_server without the lobby server process ("ssgl_server").

    See the man page for snis_server and snis_client and the README.


  • Been experimenting with adding "warp gates" into the game which allow players to travel from one snis_server instance to another.

  • As I have been working on making better assets for Space Nerds In Space,
    I have resisted the urge to update the assets in the main repository
    because I don't want to create a lot of churn as I keep dinking around
    with things. Also, at some point, the art assets should probably be
    separated from the code. I've also been thinking about how to
    distribute those assets. I don't have a very good answer for that yet.
    Nevertheless I have created a new repo just for assets. https://github.com/smcameron/space-nerd ... ace-assets

    a recent commit, I have at least separated out the assets that define a
    "solar system" to some extent. These assets are 1) planet cubemap
    textures, 2) central "star" texture, and 3) skybox cubemap textures. I
    have created a simple specification for such a combination of textures
    which now lives in share/snis/solarsystems/xxx/assets.txt where "xxx" is
    the name of the solar system in question. By default, there is a
    "default" solar system, which is the same one that's been in the main
    space-nerds-in-space repository since the beginning. I've created a new
    solarsystem, "tau-scorpii", which is in the new repository,
    space-nerds-in-space-assets. Copying the tau-scorpii directory into
    share/snis/solarsystems on all your SNIS clients and setting
    SNIS_SOLARSYSTEM=tau-scorpii before invoking quickstart (or using the
    --solarsystem option of snis_client) will make it use the new solar

    Here are some pics:




  • Cool. I've been watching your posts on some of the new updates over at the GameDev forums.

    Those screenshots are gorgeous.

    Now, I just have to update my build/package scripts for the new repo so I can get the new assets.
  • I've got normal mapping for planets working now, and also cratered, rocky planets. Some new assets using this capability are in the karado solarsystem in here: https://github.com/smcameron/space-nerds-in-space-assets/tree/master/share/snis/solarsystems/karado




  • Looks great!
  • New update video showing progress on the warp gate system for travelling from one server (solar system) to another that I first showed a proof of concept for back in August of last year. Lots of progress since then, but still quite a long way to go before I am ready to commit it. I have about 30 uncommitted patches in my stack that were necessary for this video. I have got per-solarsystem texture re-loading (mostly) working now, so you can actually tell when you transit from one solar system to the next by noticing that the skybox and planets actually look different. The video also shows off the new normal mapping capabilities for planets.

  • @smcameron have you thought about adding running lights on the ships, stations & jump gates? That way you can see them better on the dark side of the planets.
  • kwadroke said:

    @smcameron have you thought about adding running lights on the ships, stations & jump gates? That way you can see them better on the dark side of the planets.

    Ha, yeah, I thought about it while making this video. The player's ship actually has an emittance texture and the code can even use it. And so there are some lights on that one, but nothing else has such a texture. Problem is, I'm not very good at modelling, most of the models just come out of openscad and are nothing but stl files.

  • Been messing around with some natural language processing types of things...

  • That's awesome. I was beginning to wonder about speech recognition when you were talking about fifo.
  • Has anyone had any luck running SNIS in a VM? I've tried twice on 2 PCs and it segfaults on each.

    Tried on VirtualBox with 3d Accelleration turned on, Debian 8 64Bit, Hosts: Windows 7 & 8.1
  • edited April 2016
    Segfaults how? Can you capture a core file? E.g.:

    $ ulimit -c unlimited
    $ ./quickstart # or however you're trying to start the game
    -- presumably segfault happens, hopefully leaving a core file since ulimit -c unlimited is done
    $ file core # this should tell you which executable died (presumably snis_client, but maybe snis_server)
    $ gdb -c core ./snis_client # or ./snis_server -- or whatever cored
    > bt

    and then let me know what the output of the 'bt' command is.

    possible also try:

    > info threads
    > thread *whichever thread number*
    > bt

    to get backtraces for other threads -- but I think it should pick the right thread by default so long as things aren't too messed up.

  • BTW, if you're itching to try the speech recognition thing... try it first just with pocketsphinx by itself -- you'll probably be somewhat disappointed. It can't recognize "warp drive", for example, and the error rate is quite high. It has no built in support for a trigger word. I simulated the trigger word "computer" in the video by just filtering everything pocketsphinx recognized with my script. The script deleted every line that pocketsphinx output which did not contain the word "computer", and for every line that did contain the word computer, it deleted everything except what came after "computer." Which approximates having a trigger word of "computer". If you try some google speech api, or something like that for the recognizing, you'll probably have better results.

    However, the natural language processing still needs a lot of work to be able to understand that say, "twenty five" means "25". So while you can type in "turn left 10 degrees", and it will work, saying the same thing, even if the recognition works perfectly will probably be like typing in "turn left ten degrees", which the natural language code won't understand (doesn't know that "ten" is 10.)
  • Funny, I tried speech recognition with the google chrome API:
    (With the idea of setting up an example for EE's webserver and javascript interaction)

    Which uses the google servers to process the speech. However (maybe due to my dutch accent) it had a hard time recognizing anything. I tried something sentences like "Computer, set heading to 200", but it produced something useless 70% of the time.
Sign In or Register to comment.