Wednesday, 20 August 2014

Book Review: The Martian

The Martian by Andy Weir is the fictional story of Mark Watney who is accidentally abandoned on Mars. Space exploration and engineering principles are used in clever ways to build a non-stop thrilling plot, but sadly character development was trivial. Overall a very enjoyable science fiction read. This review has no spoilers.



Who should read this book?

Anyone who enjoys tales about realistic space exploration with a focus on engineering. The science talk is sometimes detailed, but generally the language is easy and accessible.

The Good
The equipment, catastrophes, plans, calculations, and flight trajectories all seemed to make sense scientifically. Given the ambitious content, this is actually a huge achievement for the author. So bravo!

The protagonist Mark Watney comes up with a lot of clever survival ideas and his inventive use of all his resources was really interesting. The language was playful, funny, and easy to read. Finally, the book does a good job switching between mission logs, personal logs, text chat, and traditional novel prose.

The Bad
Oddly, Mark Watney would say things like "according to my boring math". I understand the author is trying to connect with a wider audience, but this was unbelievable to me. We have a world class astronaut and mechanical engineer saying math is boring. The head of public relations at NASA also showed disdain for the "nerds" and "geeks". Again, unbelievable. It felt like the dumb and stereotyped opinions of the masses were sneaking into the wrong characters.

Unfortunately, there was little mention of the training and personal history of any characters. The motivations, fears, and personal desires of characters were also never explored or explained. And every single character essentially performed their roles ideally. Aside from internal NASA affairs, events on Earth were rarely described, and when they were it was extremely vague. This felt like a huge missed opportunity to me. To enjoy the book more, often I had to imagine by myself what NASA and Earth would be thinking as certain events in the book occur.

When a good book ends usually you are a little (or a lot) sad that the characters you've grown to love have ended with that last page of the book. Not so with "The Martian". I put down the book and thought "well that was neat".


Summary
This book is a great science adventure novel about exploring the frontier. Although there is little character development, the writing is witty as Mark Watney turns out to be quite the comedian. You won't walk away from the book feeling inspired, but it is a thrilling read.

Thursday, 7 August 2014

Book Review: On to Mars

On to Mars: Colonizing a New World compiled by Robert Zubrin and Frank Crossman had a huge variety of content that varied wildly in its quality. It is a collection of papers about many aspects of Mars exploration: engineering, business, law, finance, spirituality, public outreach, science, and ethics.


Who should read this book?
If you are interested in Martian engineering, public outreach, space exploration business and law, or exobiology I recommend just reading those sections and skipping the rest.

The Good
There were generally two kinds of articles.

  1. Interesting, informative, and well researched papers.
  2. Papers I could have written myself by just bullshitting how I felt Mars exploration relates to philosophy, spirituality, or general technology.

This section is about the first type. As a rule, any technical paper with actual calculations, charts, or graphics were worthwhile. The propulsion, power, and colony design articles were great.

"First on Mars Should Own It" by Ron Pisaturo was perhaps the only philosophy paper worth reading. It presents the notion that the first human to set foot on Mars for a year and return should own the planet. I recommend this article highly because at first the idea sounds absurd but Pisaturo effectively guides us through all the good that would happen as a result. Along the way he justifies the immense importance of private property. Unfortunately the paper concludes with a hamfisted capitalism masturbation, but overall it is very worthwhile.

"The Race to Settle Mars: Is the Public Ready?" is some great work done by Peter Perrine where he collected public opinions on Mars exploration. He interviewed people in laundromats, parents at swim lessons, swimming instructors, and senator's offices. The responses are all there, and well worth a read.

"Terraforming and Human Ecologies on Mars" by Robert Zubrin also had a ton of surprises. I now feel very well equipped to talk about biomatter exchange between Earth, Mars, and solar systems.

The Bad
Perhaps half the papers are not worth reading under any circumstance. The articles on the human hand, Mars IT, theology, and distant future legal frameworks for Mars were particularly worthless. Most finance papers also seemed worthless, though I'm not knowledgeable enough to say for sure.

I was particularly surprised to see four articles written by reverends. From an atheist's perspective, it is delusional in the extreme to think that a blood soaked book from bronze age Palestine could give us any insight into the science and ethics of space exploration. Unsurprisingly, the theology papers were less about Mars and more about promoting spirituality and creationist theory, including the now thoroughly debunked "bacterial flagellum" as an example of irreducible complexity.

I see some utility in gathering support from religious communities for Mars exploration. But I think it's asking a lot for religious people to have faith in a scientific endeavor because a reverend says so.

Summary
This is a generally good collection of articles that I learned a lot from. Even though the standards of the editors may have been too low, it is clear that every author cared about Mars exploration and wanted to contribute what they could. Even the articles whose content I do not recommend were well written. A reader will have a good experience by picking and choosing which topics interest them most.

Wednesday, 6 August 2014

The Ride of the Rover

I'm at my third iteration for the colony design system and I'm still not happy with it! I was getting sad so I decided to try something completely new and fun. Introducing, the Mars rover! I am shocked how well this turned out. It only took me five hours or so, and hardly any planning. The 3D model is temporary and thus hideous. Here it is!


Like always, I've made the code flexible so it should work with vehicles that have any number of wheels. And now that I think of it, in any configuration too... Hmmmm!

Linear algebra is not just for school
I had to whip out my knowledge of linear algebra, friction, dampening coefficients, torque, and kinematics. As always Unity3D was a great help. For example: I didn't have to code my own 3D vector projection function: it already existed. Always ask yourself whether you are writing code that already exists. Re-using code is faster for you, clearer for other programmers who read your code, probably faster for the computer, and far less likely to have errors and bad fringe cases.

Each wheel applies an upwards force to the rover, parallel to "up" on the rover, linearly proportional to how compressed the suspension is for that wheel. If it is fully compressed, it applies 100% of its force.

Each wheel applies an extra friction force proportional to how much the vehicle movement is sideways - but only if that wheel is touching the floor. That force can potentially make the vehicle roll over. Rollovers are critical to gameplay because they are a very real and serious concern. I needed a rover that will flip if you're reckless. It opens up all kinds of fun things like damage to the rover, and getting a jack to flip it back.

Gizmos
You may notice a green or red glow inside the tires. Those are Unity "Gizmos". They are helpful things that appear in the 3D world, but not in the final game.

    void OnDrawGizmos()
    {
        if (wheels == null)
            return;

        foreach (Wheel wheel in wheels)
        {
            if (wheel.IsTouchingSomething())
                Gizmos.color = Color.green;
            else
                Gizmos.color = Color.red;
            Gizmos.DrawSphere(wheel.transform.position, 0.2f);
        }
    }

Test scene
The first scene in the video helped me debug. I just had to press play to see four cases on the same slope:

  1. Rover upright.
  2. Rover aligned to slope.
  3. Sideways rover upright.
  4. Sideways rover aligned to slope.

I strongly suggest setting up a "test scene" for cases like this. It consumes far too much time manually driving around to find issues - and it's impossible to reproduce exactly the same event.

Ugly rover?
So how about that ugly rover? That model (made in 5 minutes) is temporary because it's possible I will be getting help! Oscar Mathews who is a "nuclear engineer at Norfolk Naval Shipyard and a LCDR select flight test engineer and Mission Commander for the Navy Reserve as an officer" has offered to help. He is learning blender and produced these drawings for us to collaborate:

They also serve as good evidence that he has technical and artistic skill. So I eagerly await attaching my rover scripts to his beautiful rover!

Mars Colony Challenger
In my quest to learn all things Mars, I've found a Mars colonization game called Mars Colony Challenger. While I sympathize with how much work must have gone into it, it didn't rate very well and there are clearly some major gameplay issues. Still, I watched a couple hours of gameplay videos with commentary and learned a ton about how people experienced the game. I have a very good idea of what that game is missing and I intend to move Martian Agora in that direction.

Friday, 1 August 2014

Airlocks and a Modular Base




I faced a couple design challenges and it took some trial and error getting things right (or rather, acceptable). My first iteration of the base was butt ugly. The "Martian cement" on the outside of the base that protects from radiation was nearly the same shade as the terrain and it just looked like shit, literally. Now it's painted white!

I probably won't be able to keep up the quality I've enjoyed so far with my 3D modelling. There is so much to do and I am no artist. Maybe sometime in the future I can team up with a competent artist. My colony is boxy - but I'm more interested in making it do things than making it look nicer.

The colony is generated procedurally. Consider that the game was an empty field before I started. The code to create that base is something like this:

Create hallway at 0,0
Create room at -1,1
Create airlock at 1,3

Furthermore, the pieces you see at the end of the video should be a nice way to show a gradual construction process during gameplay. And the sections of room that are like slices of pie will allow me to re-use room designs. And since the "outside" is a separate model from the "inside", different insulation is a possibility.

Airlock
As usual I didn't program just an airlock. I kept the door, doorknob, and mouse-hover-highlight code as re-usable as possible. Like the colony, the first airlock was ugly as hell so I remodelled it.

Sound
The sounds are free so long as I give credit. I am sort of keeping track of that.

As for music, I am considering the original Starcraft soundtrack! But that's only an option if I never make a penny on this game. That's a possibility.

My friend Alex also knows a band that have already made a lot of music that really suits my game.

NASA
Here's some exciting news in space propulsion research.