Thursday 26 June 2014

Blueprints, construction, and tools

I came up with a name! Martian Agora. I feel it's nearly perfect (except that Mars is Roman and Agora is Greek...).

I started my construction system yesterday! If you have a blueprint in your inventory, you can place a new building anywhere you look. It scales and rotates a la "Black & White". Once the blueprint is laid down, orbs appear showing you what work must be done. Right now "work" is just filling in the missing components by clicking on them (if you are carrying the right pieces).

I also chose a wonderful font.



At first you had to have the component selected (1 through 8) to right click an orb. But that was not fun. Construction should feel substantial, like you're really setting something up, but not tedious. Now you can right click the orbs if you just have the right pieces anywhere in your inventory.

Next on the list: tools. Today I made a grease gun, hammer drill, drill, soldering gun, and shovel. I was tempted to call it "space shovel" but I didn't take the plunge. Here's a pile of tools in my game as a celebration:


And the inventory icons I rendered:




I'm toast tonight, so we'll have to wait and see what I'm planning for the tools!

Saturday 21 June 2014

Thunder Bay, satellite dishes, and GUIs

I went to Thunder Bay with my dad recently, and lucky for me most of his friends have a lot of ham radio hardware. Here's two of many photos I took of Ed's satellite dish! Although I have enough Mars models for now, this is a great technical reference for later:


This dish is just right for Mars. It is very functional, yet still cobbled together.

O rly..? Some hobbyists bounce radio signals off the moon, then someone else on Earth receives the reflection. This is called earth-moon-earth communication. Anyone on Earth who can see the moon can potentially catch the signal with another ground satellite dish. Well, that blew my mind.

Anyway, not that it's a very good metric, but I wrote about 500 lines of code today. It was mostly for the GUI system.

GUI..? GUI stands for Graphical User Interface. In a game, that means all the buttons and text and panels that pop up on the screen.

Press "i" to unlock the mouse and view this window.

Click and drag those 24 tubes! Yeah!

You can also click and drag the inventory window.

If  you've never worked on a GUI system before, then know that this involved a ton more work than you realize. I had to make a lot of big decisions and build a flexible set of GUI tools. Also, my object data is read from a csv file for convenience.

What's next?!? Well, I seem to have all the pieces handy for an AWG...

Onward!

Wednesday 11 June 2014

Using real Mars terrain data

This is about how I made my terrain with real Mars data.


south of Coprates Chasma:


To do this you need two basic things: height data, and color/texture data.

Finding help online for planetary data is frustrating! Everyone assumes I know way more about this stuff than I do. After much soul searching, this let me convert the data to a massive png picture. Then gimp converted png to greyscale raw. Then Unity used that data to build a heightmap.

Original heightmap data as png (originally 7000 by 20000 pixels):

Cropped heightmap of near becquerel crater (2049 by 2049 pixels):

What? A heightmap is a picture, like the one above, that gives height information. White means high, black means low. At the top left of this height map there is a mountain.

My terrain is still missing one thing: color/texture. Is it green grass? Is it grey glass? Well, it's red Mars. Here I cheated. I don't think color photos of Mars exist at the same resolution as that height map (1 pixel per meter). So... I took high quality color photos of Mars from here and made the abominable assumption of self-similarity in the terrain of Mars. In other words: lets assume a crater that is 100km wide looks about the same as one the size of you.


Limitations: for now my terrain is max 2km by 2km. And there are steps like you see here. Oh well. One day?

Tuesday 10 June 2014

Mars models: ERV, AWG, weather station and oven

I did a lot of modelling work these past couple days. It will be important having some core structures and machinery to play with as it will make programming core functionality much more fun.

My recent favourite is this earth return vehicle (ERV):



 A weather station. The arms will hold a variety of things later:


This is the atmospheric water generator (AWG). The insides make sense! Tubing connects an evaporator, condenser, compressor, pump, and reservoir.


O rly? Did you know that if you put up a big dome on Mars to capture sunlight, some water moisture rises from the regolith (dirt) into the air? The AWG captures that moisture.

I also made an oven but didn't bother with a render. This is another water strategy for life on Mars: trucks can dump dirt into the oven and it bakes the water out of it.

Mars Project

The past couple years I've needed a major project on the go to be happy. This summer I will be working on a first person early Mars colony simulator built with Unity3D. I just started.

Tangent: I think it's a bad idea to talk about game mechanics and other ideas here before I've done the work to make them happen. Why is it a bad idea? Satisfaction is a currency for motivation, and the satisfaction I'd get from talking about my ideas is stolen from the satisfaction I'd get after completing them. So I'd be lowering the reward of completing my work. I'm going to avoid talking about what I will do and stick to what I have done.

So far I've used Blender to make 3D models for:
  • A hab.
  • An icosphere glass dome.
  • A weather balloon (with a spectacular inflation animation!)
  • And small tech greeble.
My Mars terrain is accurately made with real Mars data. I used heightmaps like this and the color textures here. I will build and test my game using Becquerel Crater. It was difficult accessing planetary data. For some reason I expected NASA and the scientific community to be more organized, modern, and centralized.

I sent a message to NASA asking for them to release their source code/project files for this game. It's built in Unity3D just like my game! I could really use their skybox. I expect no response, or a "no" in six months to a year. Maybe one day I'll get a job making education games like that?

Finally, I've made buttons that beep, and optionally find their closest door.

Zulbanoid begins

This blog is all about motivation. I have found that when working on big projects, it's a good idea to keep a list of what you accomplished that day. At the end of ten hours of programming, maybe you'll feel like all you accomplished that day was the last two hours of work. Sometimes you're so mentally spent you can't remember where your project even was ten hours ago. Instead of being mentally exhausted, the end of the day should be a time to celebrate your progress.

I was writing lists like this already. So why not write them into short blog posts? And here we are.