Aliens From Outer Space - Alpha Release

After a long time of no news here I’m happy to show you my work of the last few weekends. I’m working on my first 2D cross platform mobile game. After using Unity3D and the Unreal Engine I decided to give the open source Game Engine called Godot a try. I’ll write a separate post about Godot because today I want to show the alpha version of my first mobile game AFOS - Aliens From Outer Space for Android and iOS.

The game itself is very simple (because it’s a first project and I want to fail often to get better) so there’s not big story. You’re moving a small ball -The Sheriff- and you have to shoot as much alienships as you can within 45 seconds. Each hit will generate some coins and you have to collect them to get your score. But be careful. If you don’t collect them, the aliens will steal them. So be fast.

Sounds easy - it is. But let’s talk about technology.

The software

First of all I’m using Blender for all the main 2D assets like the foreground mountains, the characer itself, spaceships and some static items like the radio or the barrels. I switched from ZBrush sculpting to Blender after I found Dynamic Topology Sculpting (Dyntopo) in Blender. For the background images like the mountains or the clouds I started with Photoshop but switched to Krita later, because it’s much faster and really great for painting with a tablet. All images within the game are a little bit cartoonish - I created a simple shader for Cycles and used the freestyle render engine, too to get a small outline. For simple shapes like the HUD or GUI buttons I used Inkscape.

The game

I learned Godot. And currently it’s not easy because there’s not much great documentation out there but Godot is very powerful. There are a few YouTube videos but many many things can be checkout out by try and error. Compiling the latest Git revision brings very useful editor improvements like scene tabs or toolbox alignment (upcoming version 1.2). Custom events (signals) in GDScript help to build a more maintainable architecture.

In my game there is only one main scene - the western level with some interactive elements in it. There is the radio which plays some background music (can be changed when shooting on it) and the windmill, which damages the alienships and generates some coins. This version has a single weapon only, a revolver. More items are planned for the upcoming alpha release within the next weekends.

Coming soon

I’ll extend the game with some features before publishing the first beta version and the feature-freeze. Multiple weapons, more interactive environment tools and a better tutorial system are on my todo list. I want to say thank you to my alpha testers which gave great and useful feedback. But there are still some weeks left until the first release for Android and iOS.

Non-interactive Git Clone

When you’re building your app dynamically with Docker for example, you have to get your code from somewhere. This could be a Git repository from GitHub or GitLab but when you create your image all the servers are untrusted - they’re not part of your know_hosts.
I create my key pair (GitLab project read only auth) for Docker and add them within the image build script. But when Docker tries to clone my repo the build process will exit (non-zero), because StrictHostKeyChecking=ask is default

c6418477bdb6 ~ # git clone
Cloning into 'myProject'...
The authenticity of host ' (' can't be established.
Are you sure you want to continue connecting (yes/no)?

Of course I want to continue. But my automated Docker image build process don’t know that.

Let’s fail

I found a blog entry where this method was preferred

# Please, never do that!!
$ echo -e "Host\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config

Candy internet. The next thing I found was to get and save the server public keys automatically with ssh-keyscan

# Dude? No!!
$ ssh-keyscan >> ~/.ssh/known_hosts

This was a solution on Stack Overflow and it’s horrible as well!!! When somebody hacked your favorite DNS server you maybe get the public keys from hackers private server. And I think there are many more great tips out there.

The solution

If you want to automate your git-clone then you have to generate the known_hosts file MANUALLY on your machine, check the fingerprint and the public key and after this, add the file to your project repo and add it together with your project public- and private key pair in the Dockerfile to your docker image.

And never ever auto-accept any keys!!!

Bye Xfce, Welcome LXQt

After a long long time working with Xfce I switched to LXQt today. The first reason I’m using the new Qt based DE is that I want to learn Qt. I want to extend my desktop, write own small applications to get into it and because I really really like fast and flexible DEs I give LXQt a try. While KDE is powerful, fat and a little bit slow sometimes, LXQt is like Xfce - a lightweight desktop environment. It’s a merge of LXDE-Qt and the Razor-qt project and there are many active developers. Within the next weeks I’ll write something about my new desktop, show some tricks and maybe my first Qt application.

Speedup Docker Gentoo Image Build

When you’re using my Gentoo Docker Base Image or maybe other Gentoo based base images it’s always recommended to use a separate dedicated server to build your custom Docker images because it needs some time and much of your available resources some memory to compile the packages. To speedup the build process it’s better to use all the CPU-power of this build machine. To do this, add a line to your Dockerfile which will add the number of CPUs of the current machine to your MAKEOPTS in /etc/portage/make.conf

FROM rndevfx/gentoo-stage3-amd64-nomultilib

RUN echo "MAKEOPTS=\"-j$(cat /proc/cpuinfo | grep processor | wc -l)\"" >> /etc/portage/make.conf

RUN emerge-webrsync
RUN emerge ...

That’s it. If you want you can use the nproc command as well. It’s part of GNU Coreutils and so it’s available within a stage3 archive. It looks a little bit easier if you want to set CPUs + 1.

RUN echo "MAKEOPTS=\"-j$(expr $(nproc) + 1)\"" >> /etc/portage/make.conf

Happy compiling.

Hello, World!

Yeah, works. Back in 1974 the book The C Programming Language… err… I think you know what I mean. But we’re not in C neither in B. Currently this blog is not a real C application but under the hood it’s C, C++ and JavaScript. Yes, it’s JavaScript. An io.js (originally based on Node.js) powered blog engine called Hexo. Running within a Docker container. And Docker in running within a virtual machine powered by Gentoo. This is the current setup. Within the next weeks I’ll post some great news about Linux, Open Source, various (multimedia) software and - of course - my own projects here so be sure you subscribed to the RSS-Feed or follow me on Google+.