Blog

Game Dev Things I wish I knew

Today I want to talk to you about 4 things I wish I knew as an aspiring independent game developer.

The first is Start Small.

Separate skill from ambition and make sure the project is the right size for you. Game design is hard, and no one gets it right the first time around.

Starting small allows you to fail fast. You will know what works and what doesn’t really quickly if your scope is small. We learn from our mistakes, so small quick mistakes provide small quick lessons.

As you get better and more experienced you can increase the size of the projects.

I made this mistake early on. I wanted to build an epic RPG with every feature you can imagine. In the end there were way too many problems to solve in too little time and I got bored, and abandoned the project. Don’t let that happen to you.

I would recommend looking at another game and trying to copy a mechanic. If it’s your first game, I would recommend just trying and creating a clone of an existing game like Tetris and putting a twist on it… like instead of blocks, maybe cats fall from the top.. who knows. experiment, that’s what small projects allow you to do.

The second point to consider is to use a gameengine. There are many amazing free engines out today that take way the heavy lifting such as Unity and Godot. Don’t get hung up on the coding, and learn just enough to get the feature working.

I’ve been guilty of this one when I first started. As a programmer, I naturally wanted to write things from scratch. Early on I spent more time programming a game engine than a game. And since it was my first time, the game engine sucked and the game play was nowhere to be found.

So, you have to ask yourself, “Am I making a game or a game engine?”

Time spent on working on engine features is time not spent on making a game. Remember, the player is ultimately playing a game, not the engine.

The third point is the COMPLETE THE PROJECT!

The most important skill to have is to be able to COMPLETE A PROJECT. This sounds like an obvious one but it needs to be said.

A large number of games started by new game developers don’t get completed.

This usually happens because of the previous points mentioned.

Either you’ll start a project and get bored of it and move on to the next idea or quit altogether.

Finally you’ll want to release and repeat.

The game is not truly done until it’s in the players hand.

Revel in your accomplishments! Take the feedback and learn from it. Try not to take anything personal, but know not all feedback is good feedback. This is the time to reflect and start planning for your next project. What went right, what went wrong? Knowing that you can complete a project, use that experience to work on the next game. You will know what you’re capable of use that knowledge for the next game.

Also know that your first few games will likely be bad. That’s OK! Game design is hard and is a skill that can only be learned from doing… So, continue making games and you’ll surely continue improving.

Raspberry Pi WordPress Blog with Docker

Ever wanted to quickly get a wordpress blog up and running on your Raspberry Pi? Well here’s how you can do it!

Prerequisite:

Raspberry Pi – https://amzn.to/36i6T5P*Amazon Affiliate Link*

This assumes you have a raspberry pi with Raspbian installed.

Install docker and docker compose

sudo apt-get install docker.io docker-compose

create a place for the blog to live

mkdir blog
cd blog

Create the following 3 files using your favourite text editor

docker-compose.yml

version: '3'
services:
    wordpress:
        container_name: wordpress
        image: wordpress
        volumes:
            - '/home/pi/blog/html:/var/www/html'
        ports:
            - '80:80'
        env_file:
            - blog_env
    mysql:
        container_name: mysql
        image: hypriot/rpi-mysql
        volumes:
            - '/home/pi/blog/data:/var/lib/mysql'
        env_file:
            - mysql_env
    redis:
        image: redis
        container_name: redis
volumes:
    mysql: null
    wordpress: null

mysql_env

MYSQL_ROOT_PASSWORD=secret
MYSQL_DATABASE=blog
MYSQL_USER=blog_user
MYSQL_PASSWORD=blogSecret

blog_env

WORDPRESS_DB_HOST=mysql
WORDPRESS_DB_USER=blog_user
WORDPRESS_DB_PASSWORD=blogSecret
WORDPRESS_DB_NAME=blog

Finally, run the following command to launch the blog:

sudo docker-compose up -d --build

Getting gunicorn + flask working in Docker on Windows 10

I was attempting to write a flask python app and have it containerized on Windows but going to localhost:5000 resulted in an empty response.

FROM python:3
...

WORKDIR /opt/famdo/src
CMD ["gunicorn", "-b",  "127.0.0.1:8000", "wsgi:app"]

EXPOSE 8000

The above Dockerfile works perfectly fine in Linux if you hit localhost:8000 from the host. From windows it doesn’t work. The solution is simple!

FROM python:3
...
WORKDIR /opt/famdo/src
CMD ["gunicorn", "-b",  "0.0.0.0:8000", "wsgi:app"]

EXPOSE 8000

Bind to 0.0.0.0 instead of 127.0.0.1 and voila! You can now hit that endpoint via localhost in windows.