FlyThrough.Space: Alpha Release

I’ve been sitting on this project for way too long. Doomed the project by not soliciting feedback early enough. Failed to heed the warnings of Agile. Kept coming up with reasons not to tell anyone about it, promising that I’d make it public after I added just one more feature. But I think there’s enough that people will be at least intrigued. Or annoyed. The point is that they’ll feel something. I’d be interested to hear any feedback on what’s there and which planned features you’d find most compelling or what would make you likelier to make a mod.

TL;DR: Code Here:

Play Here:

Neat Features:

  • It’s written in Vanilla ES6, only depends on one library (the Babylonjs engine) which is included, so you can hack away on it to your heart’s content without setting up any sort of development environment. Just open up the files, edit them, and host them (locally)
  • 2.5d perspective in a full 3d engine with 2d sprites for planets and projectiles, and a 2d overlay on top.
  • EV/Endless-Sky-esque with the ability to trade cargo, purchase a new ship, add weapons, and do battle in asteroids-style high-stakes space combat. Arrow keys to move, left control to shoot. The default weapon may run out of ammo though!
  • Visible weapons on ships. It’s a capability, even if I haven’t added bones to most of the ship models to take advantage of it. If done right I expect it will be super immersive.
  • Original, handcrafted (unfinished) universe to explore. For all of you fans of non-procedural-generated worlds.
  • Open architecture allowing for radical gameplay changes and a totally data-driven model.
  • Press ‘Escape’ to see the star map (bug: drag it around if it does not show up right away). Select a system, exit the map, and press ‘J’ to jump to that star system. You can only see explored systems and systems linked to them, which won’t be very many at first, but there’re lots out there to explore.
  • Press ‘L’ to select a nearby planet and ‘L’ again to land
  • press ‘`’ to select the nearest other ship
  • Select “open contracts” after landing for random cargo missions

Planned Features (don’t count your features before they ship):

  • More missions/storylines.
  • Save and restore game. I’ve got it set up to save and load from local storage, just need a menu to select your save. I didn’t set out to make a roguelike.
  • Secondary weapons. Right now when you pull the trigger, everything goes off at once. Also a prerequisite for stuff like carried ships.
  • Beam-based weapons. Need to add a beam collider to the collision system. Explored adding a real physics system but they’re mostly overkill for this type of game; writing a beam/circle collision system may change that. It would also let me implement anti-tunneling for projectiles (collide a line segment between the previous position and the current position.)
  • Decide what to do with ai leading. You can switch leading on and off with querystring ?ai_leading=basic which will make the AI try to lead its shots. But it uses a basic approximation so it still misses a lot.
  • Turrets. Getting the math, blender export/in-engine-use toolchain set up to make visible turrets on ships has proven frustrating. Some of the code is there but it would take a not insignificant amount of work to finish. Which is probably why I keep putting off…
  • Starfield. Will have to probably do this by hand with star sprites.
  • Nice ship models with textures! I’ve been cranking out kinda lousy models as programmer art (thinking that the final art will maybe have different constraints – visible turrets being a big one), but someday it would be cool to put some more effort into it. Hampered by the fact that I mostly work on this on a train so I don’t usually have room to use a mouse.
  • Sound. There isn’t any. I just haven’t gotten around to it, I can’t imagine it’ll be too hard to throw in there.
  • Escorts/Carried Ships. The AI and collision systems are set up for it, and some recent refactoring has probably opened the door to it. Just takes some doing.
  • Board/Plunder/Capture-this just needs some doing, but shouldn’t be a huge technical hurdle.
  • Demanding tribute/galactic conquest/planetary destruction – would require a bit of additional work, but not much. Unclear to me if this is a feature people really want.
  • Zoom in / out: Just needs the controls rigged up to do this, but it’d be kinda cool (right?)
  • The GUI could definitely look a lot nicer, and the code could probably be cleaner. I’m not a graphic designer.

I plan to keep hacking away on it at the slow-but-mostly-steady pace that you can see from the (lengthy) commit history. If you want to play a complete game now, this isn’t for you. But if you’ve always wanted to hack on an EV clone but the other ones where too intimidating or weren’t 3d enough, maybe this is your ticket. Will definitely check out any Pull Requests (or, for that matter, emailed diffs) that come my way, and I’ll try and do a walk-through of major interesting bits in the code in future blog posts. If you’re still reading this far down, you are the target audience! Let me know what features you would like to see most, what would make this project compelling for you to use/fork, or what utterly repulses you about it. I’m all ears.

Atomic PI emulation setup notes

I mostly game on PC, but at one point I set up a retropi for emulated console multiplayer. Mario Kart ran pretty well (sprites and all!) but BattleTanx wasn’t performing. That’s the N64 game that I probably played the most of, and it’s cracking good multiplayer, even at the 9FPS that the Pi could manage. That was sort of the experience I was after though, so I went looking for something a bit more powerful.

Enter Digital Loggers. There was a kickstarter for a board called the Atomic Pi. It’s about the size of two Raspberry Pis and has an Intel Atom processor rather than the Pi’s ARM core. It’s still smaller than any one of the various consoles I plan to emulate on it, which is a nice bonus.

For this setup I got the Atomic PI with the small breakout board that provides a (more or less) standard adapter plug. I’m using this power brick and this multi USB hub (because there is only one USB port on the board.) It comes with a soldered-in EPROM you can boot from and write an OS to, but OSs on the eprom are painfully slow so I would recommend installing your OS to a MicroSD card like you would with a RasPi. I’m using Lubuntu, and it’s performing pretty well considering the big screen it’s on, I’m sure your favorite lightweight distro will also do well. You’ll want something that ships with a desktop for emulation though

Back to Battletanx: To get it running in Mupen64Plus (which you can install with apt along with a barebones GUI for opening ROMs and managing settings) with Rice video you need only change the config in one way:

ScreenUpdateSetting = 7

There are some glitches (the button that makes the flame tank fire sideways and makes the FLP-E tank flip get stuck) but it’s mostly playable. And Mario Kart still runs great.

A gem: Multiverse In Review

Multiverse In Review is the type of treatment that makes reading a bunch of background story for a tabletop game worth it. Source by source, the author is examining every available piece of Fluff in (and out of) the Magic: The Gathering cannon, with (so far) an emphasis on the type of sources that most fans never would have seen, especially in the pre-internet “before time”.

The most fascinating bits are the insights into how the story evolved, and what hidden information those changes reveal. I find these big shared universes very fascinating, and would love to see a similar treatment of, say, the Warhammer 40k setting. A good example, if you want a horizontal slice, would be these three articles on the conception of the Antiquities story the Antiquities comics and the Jeff Grub novel that slots the story into the modern (ish) cannon. Every article is a good read if you’re into that sort of thing.

SYLP is dead, long live SYLP, or “The Shipyard Liberation Project” hasn’t been updated in years. This is mostly because I haven’t had anything to add to it-I think I got every last graphic I could, contacted everyone who’s email address still worked, etc. I’d also all but run out of space for my SDF account (I even had to host the 3d models from Ares on my own site.) Somewhere along the line, I lost access to my SDF account, but by then I was using Unix every day so I didn’t really miss it.

Fast-forward to now, I’ve realized that the fine folks at the Internet Archive have a sweet upload utility that allows you to upload whatever files you want, and (critically) add metadata to them so that some sort of context can be preserved. So I’ve uploaded those files to the archive, you can enjoy them here. That puts out the “what if SDF deletes my account” fire, but some stuff remains:

  • Files with appropriate licenses ended up on OpenGameArt rather than on SDF because I figured more people would see/use it. They ought to be mirrored on the archive.
  • Someone from the Ambrosia forums kindly ripped the graphics from a TC called “The Novel One.” I’ve got the graphics somewhere, but I haven’t been able to find the thread.
  • The “Open Source TC” had some assets at some point, and the notion was that anyone could take it and run with it. I’ve never run across a copy of it (it was hosted on DropBox of all places)
  • The list of missing shipyards on the SDF site still stands – if anyone out there has any of those graphics, I’d love to see them!

Estes and Escape Velocity’s Rocket Design

I first noticed while thumbing through old Estes ephemera on this site  when I saw it staring me in the face:

Snippet from the 1990 estes catalog
1990 Estes Catalog

Estes is a company that has, for a great many years, built and sold flying model rockets-as in, you build them, stick a solid fuel engine in the back, and launch it into the sky. It’s a good hobby for someone who’s a fan of spaceships. The same camp where I learned the art of model rocketry was where I found out about Escape Velocity, which brings us back to the point. If you’re an Escape Velocity or EV Nova fan, you probably recognize that as fictional space pirate “escort Frigate” the Atinoda Kestrel.

A diagram of the Kestrel, with labels for flavor
The Kestrel

Probably the most iconic ship from that game, it made its way into EV Nova as a post-game bonus option and NAEV as its poster-ship. Matt Burch, author of Escape Velocity, had this to say in an Ambrosia Times interview:

Ambrosia Times: […] Is it true that some of the graphics in EV are the result of a model rocketry hobby?

Matt Burch: Well, I used to build model rockets when I was little, and a couple of the ship designs in EV are loosely based on my memories of some of my favorite Estes kits.

That confirms my suspicions. So, which other ships are based on Estes rockets?

From the 1990 catalog, we’ve got these two:

Cropped catalog page of an oddly configured two-finned rocket
Estes Star Seeker

EV graphic from
EV’s Executive Transport

Clipping from Estes catalog
Estes Strike Fighter

EV graphic of the lightning
EV’s Lightning Fighter

I’d seen the Rebel Cruiser described as having “babylon 5 roots” but I think its lineage is very clear from this:

Screen from a 90s Estes catalog
Estes Starseeker

Screen from EV
EV’s Rebel Cruiser

I’m less sure about the Clipper (which I think is the astro blaster.) The configuration is the same (two back-swept wings with giant winglets and canards in the front.)

Astro Blaster from the 92 catalogue
Estes Astro Blaster

Screen from Escape Velocity
Clipper from Escape Velocity

There are two possibilities for the Manta, and I’m not sure which one it really is, despite it sharing the name with one of the rockets. Maybe a combination of both:

Clipping from estes catalog
Estes Delta Clipper from 1986

Manta from 1994 Estes Catalog
Estes Manta (’94)

Screenshot from EV
EV’s Manta

So, several of the ships in EV share more than a passing resemblance to Estes rockets. There may be others that I’ve missed, or other sources of inspiration. I’d love to hear about them!

Making a model for FlyThroughSpace part 2: Export

Note: This post is way out of date, expect a new one soonish.

Apply the mirror modifier

Hit apply on your mirror modifier. Be careful: further changes will not conserve our precious symmetry! I advise that from this point forward you refrain from saving your work, or at least save it in a separate file.

Rotate the model

We’re going to do the rotation using hotkeys. This makes it easier since you’ll need to do this for every model.

'R' (rotate) '9' '0' (ninty degrees) 'X' (along the Y axis) 'CTRL'+'A' (Apply)

Then another transform:

'R180Y' 'CTRL' + A


Next you need to install the babylonjs exporter. There are instructions here. Then export the scene. .babylon is a JSON format, so you can now hand-edit anything you’d like into it, such as the proper texture file. Note that on my machine the exporter crashes Blender but does do the export.

Making a model for FlyThrough.Space

Ever wanted to make a 3d vehicle model?

What follows is an extremely minimal (and probably very wrong) blender tutorial. I’m mostly posting this so that I do not forget, but I know that there’s an audience out there that just wants to use Blender to do quick modelling tasks, and this is the shortest path I’ve found to achieve that goal. This post explains how to make and texture the model. A subsequent post will explain the aspects that are specific to BabylonJS (and, thus, FlyThroughSpace)

Step 1: Bilateral Symmetry

Most scifi spaceships are bilaterally symmetrical, at least from the outside. I won’t get into for the rationale for this (if nothing else, cars and airplanes count.) And though there are Notable Exceptions, even those generally start from a symmetrical base with variations on each side.

We don’t want to have to recreate every change by hand, so we’re going to set up our blender object to automatically mirror our changes along the X axis.

Switch the “active data to display and edit” tab on the right to Modifiers (Wrench icon)

Now, add a modifier of the type “mirror” by opening the “Add Modifier” dropdown and selecting “Mirror”

One thing I notice here is that it offers up what I think is the equivalent Python code so that you don’t need to do this task in the GUI. A laudable goal.

Now select the following options and don’t hit apply.

Axis: Y, Options: Merge, Clipping, Vertex Groups

What follows is my least favourite step, because I’m 100% sure I’m doing it wrong. Your cube is half-repeated, because it was already symmetrical and repeated along the Y axis. You need to get rid of the real part overlapping with the mirror part. What I do is go to edit mode, set the selection mode to face, and then slide the face out of the mirrored side, then delete it. I encourage finding a more reliable method and leave it as an exercise to the reader.

At the end of this step, you should have half of a cube mirrored to make a full cube.

Half a cube reflected into a full cube

Step 2: Make your spaceship

I won’t claim to be an expert in actually using the modeling tools in Blender. When I first tried my hand at making 3d objects, it was in Lightwave, when your basic tools where Extrude and Slice, so that’s what I usually use to achieve the shapes I’m looking for. There are probably far better tutorials on how to actually model in blender out there, so feel free to consult some of those. I’ll be here, extruding faces and sliding edges around until you’re back.

Not especially spaceship-y yet

Some subdivision and the knife tool go a long way

You can press ‘K’ to select the knife too, drag it around to add vertices and edges in the middle of faces. You can delete troublesome vertices and re-close your mesh by selecting three vertices and hitting ‘F’ for a new face. I won’t pretend to be an especially good modeler. Here are the results:

Step 3: Paint on a texture

Use the circle select in edit mode (faces) to select every face. You’ll need to rotate the model between uses of the select tool to get all of them. Now in “shading/UVs” press “unwrap” and select “Smart UV Project.” Now you can switch your bottom window to “UV Editor” mode and scale it up a bit (icon in the bottom left)

Now make a material for it, set the view mode to texture or material, and load up some random texture to paint on.

ugly tiger looking thing

Well, that wasn’t very good. There used to be a way to just paint a single color and I was going to sort of airbrush it up, but I can’t find it anymore (leave a comment if you know where it is!) If you _must_ work with solid colors, you can texture paint from solid colored textures I guess.

If you haven’t saved your work before, do save it now and do not keep saving it after this step! We’re going to do some destructive editing in order to export for BabylonJS