Thursday 15 September 2016

Martian Agora is Now (Actually) Open Source

While I always talk about releasing my projects open source, here's a bit of irony: I've never actually released Martian Agora on a public website. I've merely given it to people/students/YouTubers when they ask for it!

Since Martian Agora was only my second major Unity3D project, I've always felt the project quality could be greatly improved:

  • There are nearly no code comments.
  • Hardly any tests.
  • I never used inheritance because I didn't properly know how in C#.

So I've waited and waited to one day make those improvements, and that day never came. So screw it, here we go! Enjoy. The version I'm releasing today (September 2016) has these features:

  • A drivable Mars rover.
  • Build structures like turbines, atmospheric water generators, solar panels, batteries, water tanks, etc.
  • Produce, store, and consume resources with those buildings.
  • Inventory system with tools and materials for building.
  • Tools are needed to construct buildings.
  • The virtual reality visor for placing buildings.
  • The beginnings of using PNG files to construct terrain-like meshes. The main scene also uses real Mars terrain data, but I had to input it through Unity's wonky system and smooth it myself.
I foresee continuing this project in the future, especially when I get out of school in a year and start producing more Unity3D videos.

Tuesday 25 August 2015

Mars Society Convention 2015




I just got back from the Mars Society Convention in Washington DC. At first I was anxious about my talk but it went fabulously. There was also an astronaut, NASA people, an author, and many others I got to talk with or ask questions during their panels. To put this in perspective, I would much rather be in a room with these people than a room with Johnny Depp, Lady Gaga, and Beyonce. So these people are celebrities to me, and I really had a great time.

I got to witness some anti-NASA drama first hand, some severe Mars One criticism, talk to a McGill robotics team, witness a signed poster sell at auction for 2550 USD, made some great connections related to playful learning, and see a swarm of teens beg an astronaut for attention before he was able to leave. There are some Youtube videos in this post with the questions I asked various panellists.


My Talk

I've been told my talk went very well! I got some laughs, engaged the audience well, and I'm really happy with the material covered. Unfortunately, the tech people at the conference ran into a lot of trouble, including a complete failure to record my talk. Lucky for me, my darling partner Alexandra managed to record it. She did a great job considering she used a tablet - but tablets suck, and there are many video quality and audio sync issues. The footage is mostly repaired and you can watch it here.

Shy Shy Schullie striking a pose.

Many people approached me after my talk to exchange contact info, and talk about 3D games and Mars. I look forward to see what might come of all that.

My Questions to Panellists

One of the best things about going to the convention is asking questions to panellists. Whereas normally when you watch a pre-recorded talk online, obviously you can't.

Jim Watzin
Jim Watzin is the director of the Mars exploration program at NASA. Just before his talk, Robert Zubrin deeply criticized NASA. So when Jim took the stage, he started with "So... I'm from NASA..?" and got some laughs. After, for questions he was still getting heat because the Mars Society is generally disappointed with NASA. So I asked him what his favourite robot from fiction is, and his favourite robot from history. Here's his reply :)

Art Harman
Art Harman is an advocate for manned space flight. He works in public policy and specializes in national security, science, and foreign relations. Despite his international experience, Alex and I quickly recognized that he was deeply xenophobic. In his talks he made it clear that it was unacceptable for any nation but AMERICA to succeed in space. His strategy for international cooperation in space is summarized as "no". To him, space exploration is a matter of national security and not an international mission for mankind. He said so many fear-mongering and xenophobic things that I was briskly reminded I was not in Canada. The question I asked was designed to stoke the fires so he could bury himself further. It went something like this: "I'm from Canada and I don't care which nation goes to Mars first, so long as somebody does it soon. If it turns out NASA is too far behind, how can NASA best support other nations like China or Russia in going to Mars safer and faster?" Of course, he did not answer adequately because cooperation is not in his vocabulary. Alex tells me Robert Zubrin (founder of the Mars Society) was chuckling as I asked my question. (No video yet?)

A reporter at the convention told me later that Art's opinions were not common.

Space Doctors
Alex asked a space doctor if any astronauts had ever developed serious allergies while in space. Good question! and apparently not. She also asked a "Women and Mars" speaker about how her organization was reaching out internationally.

Harrison Schmitt, Casey Dreier, and Robert Zubrin
I was most nervous when I held the mic to ask a question to a panel of three. There was astronaut and former senator Harrison Schmitt, the Planetary Society director of advocacy Casey Dreier, and aerospace engineer and founder of the Mars Society Robert Zubrin. They had just had a debate on three different approaches on how to best get humans to Mars. I managed to ask this question before my brain fell onto the floor. Unfortunately I didn't get much of an answer, not that I noticed at the time.

Andy Weir
Finally, Andy Weir is the author of The Martian which is being adapted into a movie. He joined the convention through Skype (as he is scared of flying). I got to ask him a literary question about his book.

Weird People

I don't want to sound mean. But on the other side of the spectrum of guests we had a number of very weird people. I won't get too specific but:

  • Alex noticed that one person spoke like Data from Star Trek. Yep! They had good questions though.
  • One person was awkwardly self promotional, spoke to themselves, and offered to sing to Alex and I while a speaker was on stage.
I don't mind getting specific on one guest because they were so rude... it was an overweight old man in a very dirty suit. He clamoured his way 15 minutes late into a small presentation, sat down noisily, and started playing cell phone games with the sound effects on. I asked him to stop.

But you know, part of the magic of this convention is that anyone could buy a ticket and attend. All Mars enthusiasts welcome.

Best Talks

I learned a lot from Holger Isenberg about how digital colour pictures are processed from Mars rovers. This will help me make Martian Agora more visually realistic.

Andrew Geiszler talked about structural engineering on Mars in ways I hadn't thought of before (Earth engineering uses compression, Mars engineering must use tension). I also borrowed from his speaking style for my own talk (awkward, but casual and confident).

Gerald Black did an incredible job of tearing apart NASA's current strategies and projects. Part of the charm was seeing a very polite, older engineer just demolish NASA with facts and reports. I knew NASA was wasteful and misguided but he brought it to a whole new level. Incredible! This was my favourite talk.

Finally, Robert Clark had two talks on propulsion strategies. He had some very original ideas, and I enjoyed the criticism he got later in question period because I really couldn't tell who was in the right.

Mars One

There was this debate between MIT and Bas Lansdorp (founder of MarsOne). The topic was whether MarsOne is feasible. My impression from the debate was that the entirety of Bas' plan is this: "send humans on a one way mission to Mars as cheaply as possible." He has zero technical understanding of anything beyond that. He has zero care for technical details. He's not personally or emotionally invested in any technical decisions. But that doesn't make the plan infeasible, it just makes it ludicrously vague.

The debate should have been: "is Mars One good for the cause of eventually, somehow, sending humans to Mars?" That I truly do not know and wish I had seen it argued. How does a popular but goofy plan like MarsOne impact public opinion?

Finally, Bas had a partner in the debate. He was supposed to offer technical arguments... but sadly he clearly took the opportunity to advertise for the consulting company he works for. He basically didn't mention MarsOne at all and merely spoke of how qualified his company was. Really sad.

A few MarsOne finalists spoke earlier in the event, including Oscar Matthews. He's a good public speaker. We briefly worked together on a Mars rover 3D model, so it was nice meeting him in person.

Survey and Youth

I couldn't help but notice the average age of attendees was... 60? I've reached out to the organizers to offer some ideas on how to engage a younger audience.

Also, I've put together a survey about the convention for attendees. I'm hoping the organizers will get back to me soon and we can send it out to attendees to improve future conventions.

Final Thoughts

The convention was a great experience and I'm very happy I went. However, it was smaller than other conventions I've been to like PyCon and ComicCon. This can be an advantage though. I was able to present to an attentive audience of some twenty five Mars enthusiasts about my playful learning projects. All despite the fact that I'm not tightly affiliated with any institution or company, and I don't have a long public speaking record. But they took a chance with me and I delivered a very good track talk. Maybe next year I'll suffer the fifteen hour train ride and go again :o


Monday 8 June 2015

I'm Speaking at the International Mars Society Convention 2015!

It's been nearly a year since I worked on Martian Agora or updated this blog. I had a busy school year. I bet you thought I moved on from this project! Well I kind of did.

But I'm definitely back now, full swing, because I was accepted to speak at the International Mars Society Convention! It's in August 2015 in Washington DC. Speakers this year include: NASA directors, a former astronaut, authors, a Google VP, and me. I'm super flattered to be on the same speaking schedule as these people. Luckily the education software angle makes my topic really unique: "Inspiring Future Marsonauts with 3D Games Programming"

In my proposal, I think it helped lots when I said I'm a high school technology instructor. It shows I'm not a crazy person and that people trust me with kids. Something I'm usually hard pressed to prove ;)

I've had almost a year to reflect on Martian Agora and improve my skills. I also recently completed an online course about education games. So you can expect more Martian Agora updates this summer because I need to make this project the best that I can. I envision a major refactoring.

A special thanks to Robert Zubrin, the author of this Mars book. I judged it by its cover and bought it on a whim because it sounded neat, and it ended up channelling a lot of my creative energy.

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.