Space Nerds In Space

Re: Space Nerds In Space

Postby smcameron » 02 Mar 2018, 21:59

Anybody have any DMX lighting hardware?

I'm trying to control such lights from linux, but I do not have any DMX hardware.

If someone would like to test it, there's a program called test_snis_dmx:

{l Code}: {l Select All Code}
scameron@sirius ~/github/space-nerds-in-space $ make test_snis_dmx
  CHECKING for struct termios2... not OK. We will define it ourself.
  COMPILE snis_dmx.c
scameron@sirius ~/github/space-nerds-in-space $ ./test_snis_dmx /dev/null
snis_dmx.c:236: NOTICE!!! This snis_dmx library is COMPLETELY UNTESTED as
snis_dmx.c:238: I currently do not have any hardware I can test with.
snis_dmx.c:240: Do not be surprised if it utterly fails to do what you want.
snis_dmx: ioctl TCGETS2 failed: Inappropriate ioctl for device
Failed to start DMX thread on device '/dev/null', Inappropriate ioctl for device
scameron@sirius ~/github/space-nerds-in-space $


In the example, I told it to test /dev/null, which of course didn't work. If you had some real DMX hardware on a serial device, it would try to blink all the lights at 0.5Hz for 40 seconds. Seeing as how I cannot test it, it's somewhat unlikely that it will actually work, but it is within the realm of possibility.

The eventual goal is to be able to connect events within the game to lighting cues, so that e.g. being hit by enemy fire can trigger strobe flashes, red alert can turn the room lights red, etc.
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 05 Mar 2018, 18:42

From the wreckage of a derelict ship, some disturbing footage was recovered...

https://www.youtube.com/watch?v=woMkFN47U-Q
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 27 Mar 2018, 18:27

Development Update 2018-03-27:

https://www.youtube.com/watch?v=Jzj4CSFYD6s
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby charlie » 27 Mar 2018, 20:42

Cool update but I can barely hear the commentary after the half way point of the video as the music and sound effects drown it out.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2038
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Space Nerds In Space

Postby smcameron » 28 Mar 2018, 01:36

Thanks for the feedback Charlie. I remixed the audio.

https://youtu.be/tWeQyX2jDWY
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 29 Jun 2018, 14:07

Quite some time ago, I added the capability for speech recognition (using pocketsphinx) and some rudimentary Zork-like natural language processing to Space Nerds In Space. However, like a dancing bear, the speech recognition is remarkable mostly in that works at all, not because it works so well. Especially, background noise is a big problem, but also accents, talking too fast, and mumbling slightly will make it not work so well.

The speech recognition is done in a separate process and the text which it produces is fed into the game via a fifo that snis_client monitors. This means the speech recognition can be replaced relatively easily (assuming the existence of an alternative). It occurred to me that if I had an android app which could do speech recognition (should be easy enough, right?) and then forward the recognized text to an arbitrary TCP socket, then I make some little program to forward this text from this TCP socket to the fifo. In fact, I don't even need to make something, I can just use netcat for that. However, I don't really know anything about writing android apps, and it's been almost 20 years since I even tried Java. If I were to do it, there's considerable static friction before I can get moving.

I mentioned this idea to Max Redmond, a member of my local hackerspace (these days, that's HackRVA) and hey presto, now we have an android app that does exactly what I imagined.

It's here:

Source code: https://github.com/Athulus/SpaceNerdsCommunicator
Releases: https://github.com/Athulus/SpaceNerdsCo ... r/releases

To use this with SNIS, find out the IP address of one of the machines running snis_client, then
run this in a terminal:

{l Code}: {l Select All Code}
netcat -lvk -p 8080 > /tmp/snis-natural-language-fifo


Then run the app on your android device, set the IP address, and then you can hit the microphone button and talk. Android will do the speech recognition (and do a much better job of it than pocketsphinx does) and the text will get forwarded to netcat and then into snis_client, and finally to snis_server, where it will be processed. It does not have the "Computer" hot word though.

It occurs to me now that unlike the fifo, the socket is a 2-way communications channel, so it might be worthwhile to set up a special socket for getting the NL text into snis_client and use that instead of or in addition to a fifo so that responses could be sent back to the android device as text (and then maybe text-to-speech). Then you could operate the ship from a phone remotely and at least get the responses from the computer instead of operating completely blind. Not that it would be super useful to try to play the game remotely via voice control without any visible output.

Perhaps a role-play mission where you're stranded on a planet, and you have to bring the unmanned ship into orbit around your planet using voice alone. i.e. "Set a course for planet X", "full speed ahead", "how far to planet X" (repeat until the reported number is small enough), "standard orbit", "beam me up scotty". Well, it's not much of a mission, I suppose.
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 07 Jul 2018, 21:10

Here's a picture of Space Nerds In Space built and running on Windows 10 using the linux subsystem (not that it looks any different than on linux):

Image

Surprisingly straightforward.
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 28 Jul 2018, 02:01

Latest dev update video for Space Nerds In Space, 2018-07-27:
https://www.youtube.com/watch?v=60oUfXtFlI4

youtu.be/60oUfXtFlI4
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby charlie » 02 Aug 2018, 00:55

That network scaling issue was an interesting one, I bet. Was it some kind of loop that should not have been there?
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2038
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Space Nerds In Space

Postby smcameron » 02 Aug 2018, 10:17

You can read about debugging that issue here, where I spend a good deal of time chasing red herrings before figuring it out. But to skip to the "good part"...

In the most general terms, the cause of the problem was "the programmer got confused because there were too many layers of abstraction for him (me) at the moment he wrote that code." More specifically, I knew that some information needed to get to all the clients, so I called a function that sprayed the information to all the clients. However, I was calling this from a place that was already in a per-client context (already being called per client), so for each client, I sprayed the information to each client (that is to say, instead of n times, n^2 times.) I wasn't doing this for *all* the data, but for a subset of data that was particular to NPC ships (of which there are a lot, so not an insignificant amount.) so it's not quite true that the traffic literally scaled as the square of the number of clients, but it is true that it scaled as the square of the number of clients asymptotically -- the more clients there were, the closer to the true square the amount of traffic became. Also, I think it was actually number of clients *per bridge* squared, times number of bridges... but in this particular case, the number of bridges was 1.

The fix was essentially to replace the call to the function which sprayed the data out to all clients with a call to a function that just transmitted to one client. There was also some mutex confusion in there that got fixed, which may or may not have contributed to the problem.

How I found the n^2 problem was, unfortunately, really just by staring at the code and noticing it, rather than by some Sherlockian sequence of deductive steps.
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 16 Aug 2018, 21:12

Dev update 2018-08-16: https://www.youtube.com/watch?v=MwmLa1IOmJg

* Now the lobby IP address can be automatically detected
* New console on Demon screen
* You can control permissible roles for each client from the Demon screen
* Tweakable variables now accessible from the Demon screen
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 09 Sep 2018, 22:44

Dev update for 2018-09-09 -- mostly debugging tools.

https://youtu.be/lq1MvX-4TVE
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 04 Oct 2018, 00:53

Dev update for 2018-10-03

https://www.youtube.com/watch?v=CFBD6WqT14o

* Auto-wrangler system for automatically starting and stopping snis_server processes on demand.
* Importing Oolite models
* Normal mapping
* Ship registration and Bounty system
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby sudoRmRf » 21 Oct 2018, 02:13

In one of your recent update videos you discribed a theoretical MMO use but then stated that this all was not likely as it is hard enough to get 5 people to play let alone many crews. Is there some sort of limitation preventing the use of a public server running SNIS, where my three people crew could meet at my house and interact with another crew somewhere else? Or is it just simply such servers do not exist?
sudoRmRf
 
Posts: 1
Joined: 21 Oct 2018, 02:03

Re: Space Nerds In Space

Postby smcameron » 23 Oct 2018, 01:35

sudoRmRf {l Wrote}:In one of your recent update videos you discribed a theoretical MMO use but then stated that this all was not likely as it is hard enough to get 5 people to play let alone many crews. Is there some sort of limitation preventing the use of a public server running SNIS, where my three people crew could meet at my house and interact with another crew somewhere else? Or is it just simply such servers do not exist?


Technically it can run that way, on a server on the internet with remote crew members, and I have run it that way once or twice just by myself to see how it would perform with a server in New York (a digitalocean droplet) with me in Virginia. It's not a great experience though, the latency is a bit of a problem, although it worked better than I expected -- almost normally, but not quite, occasionally sort of freezing up for a few moments at a time. I didn't try it for very long, or really try to characterize the behavior in any depth -- just ran it for a few minutes out of curiosity. Total bandwidth could be a problem as well, since each client requires approximately 100kbytes / sec, though it varies somewhat depending on how many things are going on in the game, and you could in theory design some Lua script missions to use not very many objects and drastically reduce bandwidth requirements that way.

But basically, the design has always been for a LAN game with everyone in the same room, and for a LAN game with no more than about 20 clients. With those constraints, 100kbytes / sec / client is not a big problem. Over the internet, it's a bit more of a problem.

If you want to try such an experiment yourself to see how it is, here are some instructions.

Note, those instructions are sort of mixed together with instructions about running the game with no lobby, but there's no reason you couldn't also run the lobby on the same host, and run the clients more "normally", which, if you wanted to have multiple solar systems and traverse between them, you must run the lobby server (ssgl_server), since it's part of how that works.

It is also true that "such servers do not exist", at least not to my knowledge (I don't run any.) Nothing's stopping anyone from running such a thing, but I would not advise doing so on any machine that hosts anything valuable, I'm fairly sure any determined attacker could manage to gain shell access via snis_server if they tried (not to say I know of any particular exploit, but I'd just be surprised if there weren't some bug somewhere in there that gave enough of a toehold.)
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby smcameron » 03 Nov 2018, 17:29

Six Years of Space Nerds In Space:

https://youtu.be/RAboPRjI4Vg
smcameron
 
Posts: 231
Joined: 29 Oct 2010, 23:44

Re: Space Nerds In Space

Postby GunChleoc » 06 Nov 2018, 21:11

Thanks, I enjoyed watching that :)
User avatar
GunChleoc
 
Posts: 342
Joined: 20 Sep 2012, 22:45

Who is online

Users browsing this forum: No registered users and 1 guest