SPNIS as a LARP-Tool

We are thinking about a Sci-Fi LARP, happening mainly in a spaceship.

We were looking in some bridgesims for running the brigde - and SNIS looks promising.

Now we are looking for a contact for questions regarding the impelantaion of the brigdesim in a .. shipsim... so to say.

Who can i talk to?


  • smcameron is the main develover, but if you like you can also just talk about your project here a bit, as other forum members might give you hints too, and your setup + ideas might be interesting for others as well.
  • edited May 2017
    Hi DaGregor, your project sounds interesting. I'm the guy that made Space Nerds In Space. I'd be happy to answer whatever questions I can.

    You should be able to find my email address on my github profile if you'd like to email me (you may have to log in to github to see that, I'm not sure.) Or we can chat here.
  • Since I was asked, i'll explain what we have in mind here - and contact smcameron.

    We are planning a Dieselpunk¹-Styled Space-LARP. People will interact on a spaceship. And if you want to make a spaceship fly, you need a bridgesim. Space nerds in Space came to our attention because of it's 80's styled optics (which fits way better into Dieselpunk Aesthetics than the other bridgesims)and, frankly, because it'S 3D. :)

    We don't want the "flying through space" a main part in our LARP, just an important one... the main part will be interactions between the characters of the LARP. A little bit like Stargate Universe, where the story happens a lot between people, because of the ship.

    Since it is a LARP, we want to have people actually do stuff. We will of course build a bridge. A Sickbay. A place for the people to eat an sleep.
    And, then it starts to get complicated. We would like to have an actual engine room, where people can fix things once they are broken. Just today i thought it would be nice to have people handle torpedoes to put them into tubes (similar to Star Trek: Enterprise) - but long things in a hole, and the machine does the rest. Just to give people a physical representation for the things you do in the "normal" game by clicking on the screen.

    And then we need help. Is it -in principle- possible to externalize such actions to the real world and put feedback into the simulation?

    Like: Players fix a broken pipe, a gamemaster does something on a networked device, an suddenly the System works again.

    Right now we are in the early stages of planning, nobody has more than one flight hour in SNIS, but we have a lot of questions.

    ¹Think of: Iron Sky, Sky Captain and the World of Tomorrow
  • I think most of what you want to do is possible... though will take some work. I had already planned at one time to build some physical modules to interact with the game, but those plans got shelved when I ended up moving across the country for a new job a couple years ago. However, some of the infrastructure to support such things exists already -- but is probably not complete.

    Here's a little video from a long time ago showing torpedoes being fired via a toggle switch -- that's about as far as I got for actual physical components.

    There is a little C program in the space nerds code, device-io-sample-1.c which is about 64 lines of code.


    It reads in from the keyboard an opcode and a value, and sends it into SNIS through a mechanism meant specifically for external controls. So, for the toggle switch torpedo demo, I used an arduino, and a little c program on the computer to read from the arduino's serial port (emulated serial port via USB, actually -- but from the program's persective, looks like a serial port). When the program receives data from the arduino over the serial port indicating the toggle switch is turned off or on, it then sent an opcode to snis via the snis_device_io_send() function to tell snis to fire the torpedoes.

    So, the data flow looks like this:

    toggle-switch --> arduino --> serial port --> your-device-io-program -> snis_client -> network -> snis_server.

    For your application, as you have described it, you would have to make your-device-io-program to interface with your devices (i.e. your manual torpedo tubes or whatever) and send opcodes to snis_client.

    You would also have to write the code on the arduino (or whatever) to poll the toggle switch and write to the serial port on the arduino -- or however you want to implement that part. I do not seem to have the code I used for the arduino for that toggle switch lying around anymore, unfortunately, nor the code to read from the serial port and send the opcode to snis_client. Oh well. They were pretty trivial, as I recall.

    There are probably some additional things which need changing in SNIS. For example, since nobody is using this device io code, it's quite possible (very likely even) that some of it doesn't work right anymore, and it is certainly incomplete, in that there are things which you probably cannot do via the device opcodes which you should be able to do (I can fix those as they come up.)

    Also, if you wanted to build something like physical gauges or indicators, there would need to be, in addition to a way to get external device inputs into snis_client, some way to get information out of snis_client and into the devices. I do not think I have done anything along those lines yet, but it was something that I once at least thought about. But, since all the information is on the screen, it's maybe not strictly necessary, unless for example, you wanted motorized faders to control engineering and wanted the faders to move the the right place automatically, or something along those lines.

    Another thing which concerns me a little bit is that once somebody builds hardware that depends on how the game works, then that kind of freezes the game -- if I decide I don't like the way something works, or want to add some stuff, etc. I risk breaking someone's hardware. So you should try to make your hardware somewhat generic and re-programmable to be able to accomodate such changes.

    On to the specifics. If you look here


    this defines the API for sending opcodes into snis_client from external devices. As it stands now, each opcode is 1 byte, and each opcode takes a 1 byte value along with it (which, depending on the opcode, it might ignore.) So for example to set the maneuvering power to 50% on the engineering screen, you would do:

    snis_device_io_send(con, DEVIO_OPCODE_ENG_PWR_MANEUVERING, 128);

    (128 because 128 is ~50% of 255).

    Some specific things you mention would require some changes. For example, you mention manually loading torpedoes. A long time ago, I had buttons for manually loading torpedoes, but players found this annoying, so I made the torpedoes autoload. I'd need to make some changes to allow autoloading to be turned off... if I recall correctly the autoloading works by essentially automatically pushing the buttons (which aren't displayed anymore) so some of that infrastructure is already there. So I think the changes needed would be small for that specific example.

    As a first step, I'd suggest trying to recreate the toggle-switch torpedo thing. Once you can do that, I think it will be clearer how to proceed. Let me know if you have any more questions.

  • Oh yeah, there is a Lua API to the server side of the game as well, so you can tailor your LARP experience with that. The Lua API is described here: http://github.com/smcameron/space-nerds-in-space/blob/master/lua-api.txt and there are a few example Lua scripts in here: http://github.com/smcameron/space-nerds-in-space/tree/master/share/snis/luascripts
  • Another thing occurs to me.

    I suppose for what you're trying to do, the damage control screen in SNIS with the little virtual robot probably doesn't make that much sense. You may wish to build some physical representation with the various systems and modules represented by physical devices that your players could interact with. The Lua API has functions get_player_damage() and set_player_damage that allow getting and setting the damage to the various systems on the ship. You could write a lua script to mediate between your physical devices and the damage on the ship to allow physical actions by the players to "repair" the various systems of the ship.
  • I made an error previously. I wrote "each opcode is 1 byte, and each opcode takes a 1 byte value along with it". That's not correct. The opcode and value are both unsigned shorts (16 bit unsigned numbers.)

    So, my previous example to set the maneuvering power to 50% should have been:

    snis_device_io_send(con, DEVIO_OPCODE_ENG_PWR_MANEUVERING, 32768);

    (32768 because 32768 is half the largest value representable as an unsigned 16 bit integer.)

    I have just tried out the device-io-sample-1 program, and if you type "6 32768" into it, it does set the maneuvering power to 50%.
Sign In or Register to comment.