We met up with Stephen Cameron and Jeremy Van Grinsven, creators of Space Nerds in Space on FreeNode to talk about space simulators, nerds, lasers, and programming from the ground up games for Linux the old school way.
Paul Brown: Thanks for coming.
Jeremy Van Grinsven: Hello!
Stephen Cameron: Hello Space Nerds!
PB: Exactly: Space Nerds. As I heard of you guys thanks to SNiS (Space Nerds in Space), shall we talk about that first?
SC: Alright, sure, where should we begin?
PB: At the beginning. How long has the project been going?
SC: I began in 2010, but I only worked on it for a couple months. I started working on it about a month after I heard about Artemis Bridge Simulator.
PB: When did you start with the big push?
SC: It took me a month or so to work up the guts to begin on such an ambitious project. I began working on the network code. And I got a little lobby server sort of working, but after a couple months of working on that, I kind of lost steam for about 2 years.
PB: What made you get back onto the project? Something or someone must have motivated you.
SC: Then, in November of 2012, a guy that hung around TX/RX, (the hackerspace in Houston) named Chris Ertel invited me to some “hackathon” thing at a place called Platform Houston that was just opening up (not sure if they’re still around or what). So I said, sure, why not. Then I had to think of something to work on, and I remembered that I had begun working on SNiS, so I thought, ok, I’ll work on that.
And so in those two days (it was on a Saturday and Sunday) I got it to the point that you could drive and shoot, which as everyone knows are the two most important activities of a starship captain.
PB: Hah hah! Absolutely! Was this kind of an individual project or did other participants help out?
SC: It was just an individual project. In fact I did most of it at home, because when I was at platform Houston for just about 3 or 4 hours, it was too noisy to think.
JVG: At this point it was all Steve’s work.
PB: When did you come into it, Jeremy?
JVG: Following the initial push I kinda “guided” it, as in Steve would come in every week and tell us about what he had done and I would give feedback.
SC: Yeah. The game was mostly two dimensional in the beginning. And at some point I put a kind of wireframe 3D out the window view into it. But because it was mostly a 2D game, it looked like all the spaceships were skating around on an ice rink.
JVG: This went on for quite some time until I told him what I wanted him to do, at which point he said “send me a patch”.
SC: Yeah, I was really surprised after saying “send me a patch” a bunch of times to actually get a patch! What was the first patch?
JVG: I had been pushing for full 3D movement for a long time. It was clear that if you couldn’t drive in 3D, the game would never be 3D. I cant remember if I tackled some of the nagging issues with the 3D wireframe render first…
SC: Just looked in git… first patches from Jeremy was a bunch of bug fixes of uninitialized variables.
PB: The view was 3D but you couldn’t actually drive around in 3D?
SC: Correct, you were on a flat plane, so kind of like driving a car around.
JVG: The world was fake 3D, stuff could fly at different fixed levels, but you always drove in 2D.
SC: I did put some of the asteroids above and below, but you couldn’t interact with them.
PB: A lot of the stuff in the game seems to be built from the ground up.
SC: Yeah, even the fonts are home-made.
PB: As opposed to using “engines” which seems to be the trend in 3D games nowadays.
SC: I did use GTK (because it’s what I knew) and then OpenGL was added in later. When I began, I never supposed that it would end up being an OpenGL type game, I figured it would be all line drawing and nothing else.
JVG: Learning how to do OpenGL was part of the fun. None of the engines would have satisfied the opensourcing.
SC: Also, I’m not a huge C++ fan — Jeremy doesn’t seem to mind it — but because games fit pretty well into an object-oriented mindset, all the libraries are C++ anyway. Try finding a C game engine.
PB: Aren’t there any open source engines like, I don’t know, Ogre, that may have been useful?
SC: I looked at Ogre briefly, but again… C++, not my fave.
JVG: Steve never saw a programming problem he didn’t want to code himself.
SC: Reinventing the wheel feels easier than understanding someone else’s weird wheel. NIH (Not Invented Here) syndrome, I guess.
JVG: That is the only way to explain a game, drawn only with lines using a home built software 3D render.
PB: Do you remember anything particularly challenging, that had you scratching your head for longer than usual?
JVG: There were many corner cases in the software wireframe render that would randomly throw triangles on the screen.
SC: Well, figuring out how to use quaternions took a long time, and debugging the renderer took a long time. We had tons of problems with the renderer that mostly originated with trying to extend the original 2D coordinate system to 3D. Jeremy finally cracked it after one or two failed attempts on my part.
PB: What’s a “quaternion”?
SC: Quaternions… they are to 3D programming as flux capacitors are to time travel … they make it possible. Quaternions essentially code a rotation or orientation into 4 numbers in a way that makes arbitrary rotations convenient without running into weird corner cases that you get if you try to use euler angles and rotation matrices.
PB: I’ll pretend I understood that. Let’s crack on.
A lot of what you see in the game is procedurally generated. Are you thinking of adding more procedurally generated elements, I don’t know, like cities down on the surface of the planets?
SC: Yeah. Right now, clouds are on my mind. But I haven’t done any coding on clouds.
PB: Clouds for Earth-like planets, I assume.
SC: Right. All of the procedural generation stuff is done offline, not in the game. Mainly because it’s too slow. So I am not completely happy with the Earth-like planets right now. There are some artifacts of the methods by which they are made — it’s done by making a spherical heightfield — you can see, for example, things at the same elevation tend to have the same color which makes rings.
JVG: Most of the procedural stuff came from Steve needing a project to present at his monthly recreational computer club meetings.
SC: Well, it wasn’t really “my” meeting. I just instigated it. We used to have a “computer science” meeting at the hackerspace in Houston, but it kind of fizzled out.
PB: Has this anything to do with TX/RX?
SC: Yeah, this was at TX/RX. The CS meeting fizzled out because it was too much like homework. So a couple years after it fizzled, I tried to resurrect it in a more stable non-fizzly form, which was the recreational computer programming group, emphasis on recreational.
JVG: A nice byproduct was presentations and monthly write ups on stuff done for that club.
SC: So the meeting would be on the 2nd Sunday of the month, and come the 2nd Saturday of the month, being the instigator. I would think, “Huh, I guess I better do something for tomorrow…” and so I would scramble to code something up. The gas giant program came into being that way.
PB: You hacked together a program to texture gas giant planets in an evening?
SC: No, not even close, more like a couple months work. But it began as a small thing I wrote in a about a 12 hour period on a Saturday in April 2014. It was written in Processing, and it was a 2D dimensional, very fake fluid dynamics thing. I tinkered with it some more after that before moving on to the 3D C implementation of gaseous-giganticus over the next couple months or so. The writeup for the Recreational Computer Programming meetup in April 2014.
PB: How long have you guys been programming?
SC: Since 1983 maybe? I got a TI99/4a for christmas about then, and started learning BASIC.
PB: So BASIC and, let me guess, Assembler if you wanted anything to run at decent speed?
SC: No, I never learned Assembler. The TI was a weird little computer and it did not have the “poke” command in basic, which essentially locked you out of doing the weird machine code tricks all the other home computers of that era would do. The thing only had 16k, surprising that you could do anything with it.
PB: What about you Jeremy?
JVG: I have been programming since I was 10 years old or so, but this is the first and only game I worked on.
PB: What did you start of with?
JVG: I started making a prime number generator on a TI Model 12. I was just always good at programming, seemed natural to make a career out of it
SC: I am actually curious what Jeremy programmed as a kid if not games though… ha.
PB: That is an interesting question. Why wouldn’t a kid try to program a game? Care to enlighten us, Jeremy?
JVG: I don’t really know. Steve always programmed games but never played them, I always played but never tried to build my own.
SC: I remember in high school I was trying to make a game called Big Shots In Space, which was mostly like Ultima III, but with spaceships. So, you could run around on the planets, and this looked very much like Ultima III and there were dungeons, and then you could get into a space ship and fly to another, very similar planet with more towns and dungeons.
PB: Big shots in Space. You come up with the best names for your games. Let’s get back to SNiS a sec since I have a few more questions regarding game play.
SC: As for the names, nowadays my algorithm is: Google it, and if there are more than zero hits, pick a new name.
JVG: SNiS was fake title at the start.
SC: Yeah, that’s right, I’d forgotten that it was just a placeholder. Everybody liked the name though, so I kept it.
PB: You’re Kidding! SNiS is an excellent name!
SC: Well, I hope this doesn’t hurt anybody’s feelings, but the name came to me after seeing a video of some people playing Artemis on YouTube.
PB: Now we’re back on to SNiS, let me ask you for the benefit of the readers, what roles can the team members play on the game?
SC: So the stations are: Navigation, Weapons, Engineering, Damage Control, Science, Comms, and then the “demon” screen (aka Game Master station).
PB: I want to get onto the Game master station in a sec. But, I think you read this on Reddit too, Stephen, but there was this guy who said he loved the idea, but had not friends to play with. It sounded like a very “forever alone” kind of thing to say… Is there any way to play single player?
JVG: A real challenge of SNiS is having a place and enough people to play it.
SC: Yeah, getting a group to play is tough. It’s not only do you have friends, but do you have 5 or 6 computers all in the same room, networked, with a big projector?
JVG: We were able to host a few play sessions at TX/RX labs to get some playtesting and feedback.
SC: There really isn’t a way to play single player. Jeremy has threatened to add a “fighter” mode from time to time, and there was even a super-rough prototype mashing up the Navigation screen with… something. I forget now. Or did I imagine that?
JVG: Coming up with stuff to make the game “fun” was hard.
SC: Yes, that has been and remains a challenge. And since you can’t play the game single player, it’s hard to even evaluate what’s fun.
JVG: I still want a fighter mode, just to give more people stuff to do on a single team and it also lets Game Master regain some lost ability when we switched to 3D.
PB: A fighter mode would be kind of cool, right? I know it detracts from the main point of the game, i.e., to simulate a bridge. But it would make sense, thinking of how similar the game looks to what you’d see on Battlestar Galactica re-imagined…
SC: I recently saw a video of the game Quintet, which is a similar kind of idea, and it has really come a long way. It appears like it might have a single player method of playing.
JVG: Many of the ideas in game are a mashup of movies and other games. Fighter mode would would allow for more Battlestar style fights. SNiS came from the idea of Artemis, but neither of us had ever played it until just recently.
SC: I also had the idea to add a Real Time Strategy (à la Starcraft) into the game — I even coded up a new station — “admiral” station or something — where you could give orders to NPC ships and stations and all that kind of crap, but I kind of stopped working on that because I wasn’t sure it was a good idea. Never committed it to github, but I still have the patches lying around.
JVG: Many promising, but not done, concepts in the game. The robot repair station could do so much more.
SC: But, getting an RTS right is pretty hard by itself, so cramming a crappy half-baked RTS into SNiS might not be a good idea.
JVG: Making a top notch AI for the enemies is really hard.
SC: That is true. They still don’t know how to fly around planets very well.
JVG: You can have more than one player controlled ship at a time, but then you need even more people. Which came back to fighters, if you have one crew and a few others doing fighters it would get around needing good AI. Or playing against a Game Master.
SC: Yeah. But, it likely will become a free-for-all fragfest too.
JVG: It is a game about blowing stuff up at its core. Hard to get around the fragfest.
SC: Yeah, that is true. Once, after work, we had a session with 11 laptops, and people took it upon themselves to make their own ships, and it devolved pretty rapidly, but was kind of hilarious too.
PB: Maybe you need a more subtle goal. Something like the Ur Quan Masters, or, you know, Star Trek.
SC: It’s possible to create some scenarios and such with Lua scripts, and there are a few examples in the game, but nothing very substantial.
PB: I wanted to get on to that. So, how does the Game Master station work, then?
SC: So the Game Master station began life as a debugging screen.
JVG: We never really saw the main purpose of this style games until we played Artemis with some new people. It was 10% flying a ship and the rest was role playing.
SC: It also has not really been converted over from the 2D heritage of the game — it is still pretty much 2D.
PB: So, I am stationed as a Game Master… What can I do?
JVG: I don’t think it was a Game Master screen until I decided to just start throwing enemies on the screen to mess with the crew during a play test.
SC: On the Game Master screen, you can do a few things. You can add a variety of objects into the game (ships, planets, nebula, asteroids, etc.) and you can invoke Lua scripts to kick off scenarios, or do whatever you program the Lua scripts to do.
JVG: Early on the main thing you could do was fire faster than the real ships could, so I was able to put a lot of pressure on the crew.
SC: Well, I always had it in mind as kind of a Game Master screen — hence why it had the ability to do those things. Also, you can order NPC ships around from the Game Master screen, tell them to attack this or that thing, although the way you do that is rather arcane.
PB: Which would be…
JVG: Select some ships, make an attack group, tell the group to attack some other target.
PB: Have you got any sample Lua scripts readers can look at?
JVG: Turns out making a Game Master screen in full 3D is also hard.
SC: Right, but it’s something like you select the group of ships with the mouse, give them a name somehow (by typing something into the box on the Game Master screen) and then you can type something like “x attack y” which makes group “x” attack group “y” where x and y are previously named groups of objects. Something absurd that I now forget exactly how it works.
PB: I see, but the view is 2D? How does that work in a 3D universe?
SC: Yeah, making the Game Master screen 3D is something that needs doing, but I’m not even sure how it should look. The game “Void Destroyer” might be one I should look at for inspiration because I think it has some similar functionality.
JVG: It kinda works as the universe if fully 3D, but it is much wider and longer than thick
PB: So it’s not like a cube or sphere. Got it.
SC: But it still can be the case you drop a station right on top of the ship, and it turns out to be a million miles above the ship.
PB: Let’s wrap up SNiS with future plans. What are your plans for the game?
SC: Good question.
PB: And what would you need to carry them out?
SC: Lately, the things I’ve been working on — or rather, playing with — are space monsters and making the planets look better, adding atmospheres and thinking about how to make clouds better. These two things are mostly aesthetic, in that they do not by themselves change the game very much, make it significantly more (or less) fun, just details.
PB: You seem to be slightly obsessed with tentacles…
SC: I wouldn’t go that far.
PB: There’s a space squid in SNiS and another in WWVI (Word War VI).
SC: Well, no there isn’t. It’s not committed.
JVG: There has been a squid monster in every game you wrote!
SC: Both of them. Haha! So, the squid monster in Word War VI was a cool thing that I lucked into (don’t remember why I put that in, other than I thought it looked cool).
PB: Would you like other people coming in and helping out?
JVG: Patches are always welcome.
SC: Well, sure other people can help, but it is a steep learning curve (provided they pass checkpatch.pl. Most people aren’t too keen to dig into a Linux game programmed in C.
PB: Now, why would that be?
SC: They either drank the C++ koolaid, or else they’re wanting to use Java, Python or C# instead. There was actually an attempt by someone to re-write SNiS in C#.
JVG: SNiS is about making the entire game, not just plugging into an engine
PB: It was a rhetoric question, guys.
JVG: If your goal is to make the best looking game, you wouldn’t do what we did.
SC: The style of the code is superficially very much like the style of Linux kernel code. I borrowed the checkpatch.pl script from the kernel, tweaked it slightly, and use that to (mostly) enforce style.
PB: So, conceivably, a competent C programmer should not have much of a problem…
SC: Sure. Jeremy jumped into the waters, so others could as well.
PB: Let’s talk about other games on Linux. Are you avid gamers at all?
JVG: I play other games on windows…
SC: Not really. I am more into making the computer do cool stuff than I am into playing games.
PB: Ok, but you’ll both have an opinion on the following, I’m sure: Gaming on Linux has changed a lot over the last couple of years or so.
SC: Steam is a big thing, right?
PB: It is. But not only that. GOG also has a growing catalogue of games that work on Linux.
SC: Huh. Didn’t know that.
PB: But hardly any of them are free software.
JVG: Hardly any games are on any platform.
SC: Right. Despite making my living as a programmer, I have an aversion to paying for software. The business side of being a game programmer is just brutal. I would not want to attempt to make a living programming games.
PB: I know, but it’s kind of pity, right? I mean kids could learn from games they enjoy if they were freed after a reasonable time, or if there were a stronger community of free game programmers.
SC: There is a small community, but, very small. Freegamedev.net for example.
JVG: Games are a hard thing in open source. Programmers are used to the concept, but music and art… that is foreign.
SC: Making games is also pretty hard (though it’s gotten easier especially in the last 5 years) and it is also hard to get more than one person to work on a free game because anybody that is able to work on a free game is also very likely to have their own ideas, and so why would they work on another person’s baby?
JVG: We had one other guy contribute some 3D models, the main player ship for example, but most of the rest is us making textures and Steve making all the sound. For SNiS it worked since we both went to TX/RX every Friday and could talk shop about game ideas.
SC: Most of the sound. Some things are from freesound.org (though the default licensing there makes things tricky).
PB: That is why I think engines are popular.
JVG: Building your own OpenGL engine is just crazy. I know since I did it.
SC: It’s a lot of fun though. And, you can (in theory) do things however you want. I’ve seen people complaining for example, that the physics in Unity doesn’t suit their game in this or that way, and they’re just kind of stuck with it.
PB: Which brings me to other “fun projects” you guys work on… Jeremy, Stephen seems slightly obsessed with tentacles, but you seem insanely obsessed with lasers. Where did that come from?
JVG: If you knew how to make a laser projector, wouldn’t you?
PB: Oh yes! No question.
JVG: I work as a programmer, always did plenty of stuff on a computer. In recent years I tried to do more projects that are real world. Laser projector has a very physical part and then needed software to actually use it. Good mix.
SC: Yeah, that’s where I fall down, I don’t do nearly as many physical “real” projects as Jeremy does. Too lazy.
PB: What else (apart from SNiS and lasers) are you working on… or want to work on?
JVG: Going to a hackerspace is a good start. Not only are there people who have experience with many things, it is a motivator to actually make progress. If we didn’t do the play testing at the lab I doubt there would have been as much SNiS progress.
SC: We lucked out in Houston. By the time we left, TX/Rx had become quite an amazing place.
JVG: Not many other places where you can run into a guy coding a 3D game using all lines, on Linux, in C.
SC: Or a guy building a laser projector.
PB: And that then used your other game (WWVI) on a laser zoetrope…
SC: (Guys’ done his homework I see.)
JVG: I sucked at the art part of most projects, so WWVI was a perfect place to get some vector animations.
SC: Yeah, that was one thing about the laser projector: there just isn’t all that much material to project with it.
PB: Old school-type games, like WWVI, or the original Asteroids and Moonlander…
JVG: Steve did make a laser projector only game.
SC: Didn’t you get MAME to use the laser projector?
JVG: Possibly the only game more obscure than SNiS.
PB: What game was that?
JVG: Laser Lander. And Laser Mazer.
SC: There was Laser Lander, which at least was playable, and then a 3D maze game Mazers and Lasers that had no goal, wasn’t finished, but, you could walk around the maze, like in that ancient DOS game wizardry. They’re on my github account.
JVG: I made a projector and have to give Steve a lot of credit for trying to find something to do with it.
SC: I think I made Laser Lander on one of my desperate pre-Recreational-Computer-Programming Saturdays.
PB: What do you guys do when not coding games or playing around with lasers? I can’t imagine that either thing puts food on the table.
JVG: We both work at Google now.
SC: For many years I worked for HP doing Linux drivers for their RAID controllers, but I’ve been at Google since the beginning of the year.
PB: Why am I not surprised?
SC: I don’t know. I am surprised.
PB: Google is kind of famous for recruiting atypical talent, or so I have heard. Can you say what you do at Google?
SC: Site Reliability Engineering (SRE) basically, when things fall over, we try to prop them back up again.
JVG: … And then engineer it so it doesn’t fall over in the same way again.
SC: That is the idea.
JVG: There is always a way for stuff to fail in new and exciting ways.
PB: So that was amazing. Thanks for the chat. See you guys around and thanks a lot for your time.
JVG: No problem. Bye