Category: 3D Printing
Nov 12, 2015

The first time I stayed awake until the sun came up was the night I got my color Macintosh IIsi. I was maybe ten or eleven years old, and I’d just gotten a space exploration game called Escape Velocity. It was fascinating in its openness and the range of ways you could play it. Years later in high school, Ambrosia Software released its second sequel, Escape Velocity: Nova, and my friends and I were hooked all over again.

EV Nova screenshotDue to a recent unexpected bit of downtime, I found myself playing EV Nova once again with my friend, and decided it was about time I expanded it a bit by filling a perceived gap from the first game. One of my favorite ships was the Courier, a light freighter able to move quickly between star systems while carrying a reasonable amount of cargo. EV Nova had quick ships and it had freighters, but it didn’t have a quick, small freighter, so I decided to design one by combining the original Courier with EV Nova’s iconic freighter, the IDA Frigate.

Building the Ship

To create my franken-ship, the IDA Courier, I first started in FreeCAD to build a 3D model of what the ship would look like. EV Nova uses 64-frame sprite sheets to display the ship on the screen, and I knew there was no hope of consistently drawing a ship at different angles that many times, so a model would be necessary for rendering.

FreeCAD screenshot

Next, with the model completed, I brought it into Blender so that a texture could be UV mapped onto the CAD model. This process involves “unwrapping” a 3D object onto a 2D plane, filling that 2D plane with artwork, and then re-wrapping it around the object. It’s a rather arduous process, but seemed to be the quickest way to get what I was after at the time. In hindsight, I should have probably imported the ship as multiple objects and then applied a texture to each.

With the texture mapped onto the ship, it was time to render the scene, position lights to match how a ship in EV Nova is normally lit, and then take 64 screenshots of the ship rotated by increments of 5.625 degrees.

Blender screenshot

Next, I used EVNEW to open EV Nova’s data files and get an example sprite sheet out for a ship. With this in GIMP, I simply pasted each of the screenshots over the existing ship and then applied a number of filters and tweaked the brightness, contrast, and color levels until the art style matched up nicely.

Graphic Resources

EV Nova uses a number of graphic resources to render a ship. In addition to the initial 24-bit bitmap sprite sheet, a 2-bit black and white bitmap mask is necessary to determine which pixels of the sprite sheet are recognized. This is called the “rleD.” The mask can be loaded in as a 24-bit bitmap so export settings don’t need to be adjusted frequently, and EVNEW will flatten it out to the necessary 2-bit format. Next, a grayscale bitmap and accompanying 2-bit mask are needed, which in most cases determine the rleD’s opacity per pixel (black opaque, white transparent). This is called the “rle8.” The ship sprite’s rle8 is going to follow slightly different rules for whatever reason (maybe it’s used to display ionization?), so just be sure it matches with the rle8s of other ships. Once these rleD and rle8 resources are in, two additional sets will need to be made for the ship’s blinking lights and thrust.

Example of an rleD image and mask

An rleD image and mask

Example of an rle8 image and mask

An rle8 image and mask

target pict exampleNext, a number of “pict” resources are needed for the ship’s shipyard image, detail image, and targeting computer image. These are also 24-bit bitmaps, and their sizes are best found by just exporting the resources from another ship and then editing in GIMP. To find these images, check the “ship” resource for an existing ship, which should include the IDs of the corresponding pict resources.

description pict example

Data Resources

Lastly, the ship needs a “ship” resource to provide ship stats, a “shan” resource to describe how the sprite sheets should be interpreted, and two “desc” resources for in-game text when you’re shopping for the ship or attempting to hire it as an escort.

Example of a ship resource

Again, these resources are best created by copying them from a similar existing ship and then updating their IDs to a number that EV Nova doesn’t use. The ID of the ship resource should match the ID of the shan resource, and the ship resource dialog will generate appropriate IDs for the rleD, rle8, pict, and desc resources based on its own ID. One exception is that the ship detail image is user-defined within the desc resource.

Example of a desc resource

Testing the Ship

With all of the resources in place and with their IDs correct, EVNEW will save the plugin out to a .rez file that can be placed in the Nova Plug-ins folder of your EV Nova install. If the ship doesn’t show up in the game, I would recommend building a debuglog (place a file called debuglog.txt in the main EV Nova folder, then launch and quit the game) to see if anything is throwing errors, and then check your ship resource against others to ensure that you haven’t got availability bits or a high tech level blocking your ship’s availability.

in-game screenshot of resource testing

Creating your Own EV Nova Plugins

While this has by no means been a comprehensive walkthrough of how to create a ship, it should get you moving in the right direction should you want to enjoy a bit of nostalgia and expand the game. Resources like the EV Nova Bible and EVNEW should prove invaluable, and the Nova Reference Plus is great if you need information on existing game data. Development for EV Nova is a bit of a lost art with little information to be found in Google searches; however, I would be happy to answer any questions.

Also, feel free to download the IDA Courier plugin as an example for your own plugin creation. In addition to two variants of the ship, it contains seven ship-specific outfits and makes for a good example of how to create special items for sale in the outfitters.

Sep 10, 2015

I was recently commissioned to build a machine that would perform a very interesting and unusual task: Count how many times a wire had been wound around a ring by measuring its electrical properties. This task was a relatively involved one, as it included a ground-up design of the circuitry, making choices about component prices and their compatibility, and creating a fully 3D-printable casing that the machine could be built into. After months of designing, prototyping, and testing, though, the Sidewinder transformer tester achieves accuracy of 99.7% or above in estimating the number of turns within its calibrated range–or in simpler terms, it may be off by one if you’re measuring 100-2000 turns, or off by a couple from 2000-5000. Not bad when it could be off by considerably more and still be useful, and is making measurements on the order of thousandths and ten-thousandths of a volt.

Transformer Tester

Using the transformer tester

To use the transformer tester, you attach its clips to the ends of your wire and run its probe through the center of the transformer, then hook it back into the machine. Press the measure button, and twenty seconds later it will show a number. During that short pause, the tester examines the transformer it’s connected to by ramping up its supply voltage and measuring how much is induced on the probe. Once it finds an adequate number that won’t cremate the transformer but also provides suitably high induction, it takes a weighted average of samples at that voltage, then proceeds to take additional equivalent samples from the most similar windings of a standard transformer housed inside the machine. At this point it generates an answer based on simple transformer calculations, adjusts that answer based on the properties it noticed at its current voltage on the standard transformer, and then adjusts the answer once more based on a linear interpolation of pre-verified tests of other transformers with similar properties. This final number is then shown to the end user.

If the user is winding a batch of precision transformers, a rocker switch on the back enables what’s called “golden standard mode.” Say, for example, the machine reported 744 turns on the first transformer in the batch, but the operator knows that his or her transformer has precisely 745. By pressing up once on the rocker, the machine records an offset between the answer it noted for the 745T and what the answer should really be. It is then zeroed in to precisely identifying transformers with 745 turns, and the rest of the batch can be wound quickly with much less attention to counting.

Components

transformer tester openThe heart of the transformer tester is an Arduino Uno (actually a cheap Chinese clone of one to keep costs at a bare minimum), and in hindsight, I definitely should have gone with an Arduino Mega instead. GPIO real estate is completely used up, to the point where the rocker switch on the back of the machine shares its inputs with the measure button on the front such that if you press the button, the machine sees that the rocker was activated both ways at once and knows you hit measure. Electrical capacity could be better, as it’s having to drive two 24-bit analog-to-digital converters on SPI, a color serial display, and twelve 5V relays that are often activated four at a time. The 2 kilobytes of SRAM are maxed, to the point where words are abbreviated in the machine’s console-like debugging mode in order to free up bytes here and there. Still, the Uno delivers and holds stable, able to take measurement after measurement accurately and without complaint.

transformer tester modelI won’t go into great detail on the machine’s other specifics since this is one of my rare projects that is not licensed for open source, but the power system consists of a custom transformer delivering five levels of AC voltage, a wall power adapter providing higher DC voltage to a pair of AC to DC RMS chips, and a 2A cell phone charger providing 5V power to the Arduino and its peripherals. It only accepts 110V power; however, I assume since it’s for a transformer manufacturer, they can get that sorted out when necessary. The display is the fantastically durable and simple-to-use Digole Serial Display Adapter, and the buttons are standard Amazon fare, with a car window switch serving as the rocker for golden standard mode.

Price and value

Total cost of all components and filament in the machine is a hair under $100, which I am extremely proud of considering other transformer testers run in the tens of thousands and don’t perform tests anything like this. A ratio of windings is great, but it’s practically useless to the factory worker who is just manually counting off turns to the next tap. This machine provides a quick test with simple results anyone can understand before the transformer ever makes it to quality control, meaning fewer transformers get scrapped or torn down after passing through the expensive tester run by trained technicians.

transformer tester assembled

What’s not cheap or particularly easy, though, is the labor in building one of these. The parts when printed on a reasonably mid-tier 3D printer take a solid 65 hours to complete, and skilled assembly can run close to fourteen hours due to all of the soldering, harness building, and wire routing. Luckily, most everything in the machine could be printed onto a single board if necessary, greatly reducing these barriers for future models.

All in all, it’s a pretty neat little piece of hardware.

Jan 24, 2015

I’ve recently been attempting to enable a 3D printer to make parts out of nylon 618, and I immediately ran into the issue that the parts tend to fail to adhere or, when they do adhere, warp off the bed midway through printing. One of the common bits of wisdom with printing nylon is to […]

Continue reading...
May 9, 2014

I had a blast building a 3D printer, but since its completion it has mostly sat idle. Turns out the fun for me is in the build process, and actually using it for anything isn’t quite so entertaining. I was very happy, then, to find a file on Thingiverse that I actually wanted to print! […]

Continue reading...
Fork me on GitHub