Skip to content

rardiol/space-nerds-in-space

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a multiplayer networked spaceship bridge simulator game
inspired by another game called "Artemis Spaceship Bridge Simulator"
It's not really close to finished, but it's more or less playable
at this point.

If you would like to help work on this project, see CONTRIBUTING.md

-----------------------------------------
IF YOU ARE IN A HURRY TO TRY OUT THE GAME

Step 0: Build the game from source. (or alternately, see instructions
         for building debian package, way down below)

     0.1: Install needed prerequisites

	apt-get install build-essential
	apt-get install portaudio19-dev
	apt-get install libvorbis-dev
	apt-get install libgtk2.0-dev
	apt-get install git
	apt-get install stgit
	apt-get install openscad
		(or get it from http://www.openscad.org/downloads.html)
	apt-get install libgtkglext1-dev
	apt-get install liblua5.2-dev
	apt-get install libglew1.5-dev
	apt-get install libsdl2-2.0-0 # version may differ for your distro
	apt-get install libsdl2-dev # version may differ for your distro
	apt-get install libttspico-utils # for text to speech

     0.2: Download the game source and build it.
	git clone https://github.com/smcameron/space-nerds-in-space.git
	cd space-nerds-in-space
	make
	(wait for it to compile... Openscad might take its sweet time.)

Step 1: run "./quickstart" or "./nolobby-quickstart".

The "quickstart" script will start both a client process with all stations enabled
and server process on a single computer.  This is generally how I run the game when
developing as it is the easiest.   It may take awhile to start up depending on how
fast your computer is.  Once the game starts up (you should see a space scene), use
the function keys "F1", "F2", etc. to switch between the various stations on your client.

Step 2.  Press F4, then turn on power to systems in the ship

Initially, your ship has no power, all systems are turned off.  So press F4 to go to
the Engineering station and click with the mouse on the square with a "1" in it.
This button is "preset 1" and it will turn on power to almost all of the systems on
the ship.  You can also adjust the sliders for power and coolant to each system
individually if you want, but for now, Preset 1 gets things going quickly.

Step 3. Press F2, then give it some gas

Once you've powered up the ship's systems, press F2 to go to the Navigation station.
Click on the throttle slider on the upper right hand to give the ship's engines some
gas and get things moving.  From here, you can use the arrow keys (or AWSD keys) to
yaw the ship left and right, pitch it up and down. Additionally Q and E roll left and
right, respectively.

Step 4.  Press F8 and look out the main viewscreen

Press F8 to go to the main viewscreen.  The keys to control the ship's movement
also work on this screen just as they do on the navigation screen.

Step 5.  Press F3 and Fire the weapons.

Press F3 to go to the weapons screen.  The arrow keys or the mouse control where
the guns point.  Left and right mouse buttons fire phasers and torpedoes.  Do not
anger the local law enforcement.

Step 5. For Speech Recognition, see speech/README
-----------------------------------------

Longer more technical instructions for multi-computer setup follow:

There are three parts.

The first part, ssgl (super simple game lobby) is licensed under the MIT
"expat" license (see ssgl/LICENSE).  Ssgl is a generic lobby library which
contains nothing that is specific to Space Nerds In Space (except that, as far
as I know, Space Nerds In Space is the sole user of ssgl -- probably because I
wrote it to enable Space Nerds In Space.) 

The 2nd and 3rd parts are the client and server portions of Space Nerds In
Space.  They are licensed together under the GNU GPL v. 2 or (at your option)
later versions.

1. ssgl/ssgl_server is the game lobby.  "ssgl" stands for "super simple game
lobby".  (There is a github project, "ssgl", but the code in here is more up to
date than that.)  This does matchmaking between snis_client and snis_server
processes.  It does not do NAT punchthrough, so it's a LAN only thing.  It can
use, but does not require the following lines in /etc/services:

gamelobby	2419/tcp
gamelobby	2419/udp

If those lines are missing from /etc/services, port 2419 will be assumed.

2.  snis_server:  This is the Space Nerds In Space game server.  This runs the
simulation of the space-nerds-in-space universe.  There are two threads per
client, one to read, and one to write.  The simulation, runs, and periodically
changed state is dumped out to all the client writer threads, and by this means
the clients are updated.   The reader threads gather inputs from the clients
and these inputs are fed into the simulation.

3. snis_client:  There can be many instances of this.  The plan is there should
be one instance per "station" on each "starship".  These process receive input
from the snis_server process and display this data in whatever form is suitable
for whichever starship station is being provided (e.g. navigation, weapons,
communication, engineering, science, etc.)  (Currently any instance of
snis_client can do any of the available functions to whatever degree they are
implemented (As of Nov 2012, mostly not implemented.))

The snis_client programs need not run on the same server as the snis_server nor
on the same server as each other, and the ssgl_server may run on yet another
system.

The sequence to run this thing is:

a) start snis_client (several instances, one per bridge station per team)
b) From *one* of the clients, start the lobby server, and a game server.
c) For each client, select the role.  Selecting no roles is the same as
   selecting all roles.
d) Connect the clients to the lobby, and then from there connect to the
   game server.  Each client should use the ship name and password for
   the team they are on (this is just something the players make up and
   agree upon.  There should be one shipname/password combo for each
   "team", or starship, in the simulation.

2) press function keys f1,f2,f3,f4,f5,f6, etc. on each client to switch between
   the roles that station fulfills.

------

How to run the game without a lobby server (without ssgl_server).  This may
be useful for getting through firewalls, etc., not that I expect the game plays
very well over the internet -- it is a LAN game, fundamentally.

Starting the server:
export SNISSERVERNOLOBBY=1
export SNISSERVERPORT=12345 # or whatever port number you want to use
./snis_server a b c d

Note, you still have to give snis_server 4 arguments -- all pertaining to the lobby
server, but since SNISSERVERNOLOBBY is set, it won't do anything with those args.
(I should clean up the argument handling of snis_server some day.)

Starting the clients:
export SERVERPORT=12345 # or whatever port number you chose above
export SERVERHOST=X.X.X.X # put the IP address where your snis_server is running here
./snis_client $ASPECT_RATIO --nolobby --serverport 12345 --serverhost "$SERVERHOST" --fullscreen --starship "$shipname" --pw "$password"

Note that "localhost", 127.0.0.1, etc generally will not work for the SERVERHOST.
This is because the game attempts to figure out which interface an internet bound
packet would exit, and listens on *that* interface for incoming connections and
not on *all* interfaces.  127.0.0.1 is on the loopback interface, and internet bound
packets do not exit on the looback interface, so the game does not listen for connections
on 127.0.0.1.  So if you're running the server on the same host as the client, you need
to set SERVERHOST to the real IP address of the host (e.g. examine output of "ifconfig -a")

------
INSTRUCTIONS FOR BUILDING DEBIAN PACKAGE

(These instructions are from Iván Sánchez Ortega. I have not tried them myself. -- steve):

	How to build the Debian package by yourself, short version:

	  sudo apt-get install dpkg-dev debhelper devscripts
	  cd /place/where/you/cloned/space-nerds-in-space
	  dpkg-buildpackage

	If something is wrong (e.g. missing build dependency), look at the output of
	dpkg-buildpackage. If the build is successful, the .deb will be located at
	/place/where/you/cloned/space-nerds-in-space/../snis-version.deb

	In order to get the Git commit messages into the Debian changelog (and bump
	versions), look at git-buildpackage and git-dch. A handy command that will dump
	the commit hash in shorthand, with the subject content, is:
	`git log --pretty=format:"  * %h %s"`

*Note: I have doubts that just essentially dumping "git log --oneline" output into
       the Debian changelog is really the right thing to do, though I might
       be wrong. -- steve

------
That's about all the instructions I have for now.

Logfiles:  by default, /dev/null is used as a log file.

Some environment variables can cause some network related logging:

	export SNIS_SERVER_LOGFILE=snis-log.txt
	export SSGL_LOGFILE=my-ssgl-log.txt

Some other environment variables influence the level of logging:

	export SSGL_LOG_LEVEL=0
	export SNIS_LOG_LEVEL=0

lower values means more logging (yes, that's backwards and I should fix it.)

-- steve

About

gtk/linux opengl open source multi-player networked spaceship bridge simulator. See http://smcameron.github.io/space-nerds-in-space

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.0%
  • Perl 2.9%
  • OpenSCAD 1.6%
  • HLSL 1.6%
  • GLSL 1.4%
  • Java 1.4%
  • Other 3.1%