Building a Game at Hack@LRN: Everyone Can Be a Hero!

We wanted to learn something new and have a bit of fun during the day. What would be a better idea, than building a game? So, we decided to put together a side-scroller, 2D shooter game, that relates to Learnosity.

We originally picked Unity as our game engine since it is a popular tool, and there are plenty of beginner tutorials. Due to licensing issues however, we weren’t allowed to use Unity Trial edition for our hackday. We ended up using our second choice, Godot, which is on an open source platform. We used our phones to take pictures then used Photoshop to create character faces, boss faces and background pictures. We used a free version of Spriter to create the character animations. For the rest of the assets (props, other monsters, musics, and sound effects), we relied on free versions we found on the internet.

We started our hackday by narrating a storyline, that went something like this. In the middle of our work day, while everyone was really busy developing apps, our office would come under an attack by aliens. Then one of us would come down along the streets of Wynyard, to fight monsters. Finally defeating the final boss at the Sydney Opera House.

Afterwards, we divided our tasks. Jack was the only one with any experience building a game before. So, he took on the task of wiring up the shooting mechanics, and the rest of us learned game development every day by working on the level design, creating assets, and character animation. In the end, we all worked together. Using Godot to put our assets into the game and learned how to handle transition between scenes. Our biggest challenge was handling merge conflicts. We used git as our version control system, as we were all familiar with it from our day to day jobs, however it seemed Godot didn’t play nice with it. Doing a git pull while Godot was still open apparently, didn’t update the UI properly. We ended up with team members overriding each other’s work. We manage to get around this with good prompt communication to ensure everyone was working on the same version at all times.

Overall, it was a fun and satisfying experience! We learned a lot about game development in an extremely short period of time. 

Team: Jack, John, Michal, Stella
Tool: Godot, Photoshop, Spriter
Source: https://github.com/stellalie-co/godot-hackday

Screenshots

Learnosity office is under attack by invaders. We need your help!
John is the only playable hero at the moment. Only so much you can do in a 12 hour hackday. 
Our hero John must smash his way through, pawning all of the invaders around our office.
Our hero John is fighting the boss dragon Grace. Using lightning attack!
Our hero John climbs a building to get a better shooting position on the dragon boss Grace.
Grace the dragon has been defeated! Our hero John is standing proudly with our office manager Clare in the background cheering 

Gameplay Video

Coming soon!

Recharge your Lightsail application generated by Bitnami with HTTPS and SSL

I started this blog by letting WordPress.com host it for $5 per month. I paid roughly $40 (with a coupon) for a year’s worth of hosting, got myself a free domain, great one-click install, and everything else works right out of the box. Great! or so I thought…

Then, I began to wonder, how can I remove the “Proudly powered by WordPress.com” shown below? Ugh, I can’t, it seems only business accounts, a.k.a $25 per month can do that. Ok, how about adding Google Analytics code? Ugh, you can’t inject anything into the head  tag either. What about promoting content via Adsense? Uhm, nope! Can’t inject that code either! Ok so how do I get around that? I figure, I needed to pay for a business account, so that’s $25 x 12 = a freaking $300 US dollars per year. That’s roughly 415 AUD per year down the drain, mate! Sorry, but nope. I don’t want to pay that much, at least not until I know my blog can generate some constant traffic, and is in need of their security updates, regular backups, optimizations, autoscaling, and other valuable features that these out of the box solutions offer. For now, this blog can work in a shared hosting environment and for that reason I don’t want to pay more than $5 bucks per month. Thank you very much!

Here comes AWS Lightsail

Trying to get over my frustration with WordPress.com’s limited functionality, I began my search. I started to consider other options and stumbled on a $3.50 per month Lightsail application, with a WordPress one click install, powered by Bitnami. I gave it a quick spin, setup the domain names, and it’s seemed quite easy to do. Of course, it came with some DIY configurations that I had to do. I realised that it did not offer HTTPS right out of the box. uh oh… so, here’s some tips if you are like me and want to set these things up.

Why does HTTPS matter? It’s just a one-man blog

There are a few strong reasons, besides the obvious security reasons. Chrome will eventually label all websites without HTTPS as non-secure. You don’t want your visitors to think that your site is not legit right? Check out: https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html

In addition, HTTPS has been used in the Google search ranking algorithm since 2014, and I want my site to be indexed well.

Generating a Let’s Encrypt SSL certificate for your domain

On a serious note, the recommended way to use any serious Lightsail application, is to use the Lightsail load balancer, which costs $18 USD per month. This is basically why I went the hard way. $18×12 = US $216. That’s exactly $298.75 AUD, who’s got the $$ for that??

use https://lightsail.aws.amazon.com/ls/docs/en/articles/create-lightsail-load-balancer-and-attach-lightsail-instances

Let’s Encrypt is a Certificate Authority (CA) that issues free SSL certificates. You can use these SSL certificates to secure traffic to and from your Bitnami application host.

This guide walks you through the process of generating a Let’s Encrypt SSL certificate for your domain, installing, and configuring it to work with your Bitnami application stack.

Follow the very simple instructions here. Thanks to Bitnami for spoon feeding us with this tutorial:

https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/

Redirect your HTTP to HTTPS

Now that you have installed your auto-renew certificate via cron, there’s one more step left to do. That is to redirect your HTTP traffic to HTTPS. 

This WordPress blog is a Lightsail application which is auto-generated by Bitnami. It’s running under Apache 2, so you will need to edit a prefix file and simply add htaccess rules below:

sudo vim /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

If you are lazy like me, simply edit via the Lightsail browser terminal like so:

Then, restart your apps!

sudo /opt/bitnami/ctlscript.sh restart

Voila! Now all HTTP requests will be redirected to HTTPS, now my blog is uhmm… somewhat more secure, and ready for some SEO optimisation 🙂