The beginning of this year marked the end of my masters degree and I was unable to get a lot of programming done. I did however manage to make some workflow improvements that have been on my todo list since the very beginning and even wrote some gameplay code!

Since the beginning of the project, I have always wanted to be able to make quick releases. As I venture into the gameplay territory, its more important than ever to be able to easily distribute the game by just sharing a link and have anyone download and play the game. Granted, I could achieve that by just putting up builds of the game on something like Google Drive, Dropbox etc. but I felt I needed to do a better job. Ideally I should just press a button and somehow a new and updated build should appear on the website. My game is small enough, making this rather trivial to implement with a few lines of python. But I soon discovered there is a better way. Enter Github Actions.

It allows you to write a list of steps which can be run on one or more runners. Runners can be either windows, linux or macos based and come with a list of software pre-installed e.g. python, visual studio build tools and others. These can be used to run arbitrary actions like test-suits or in my case, the lua build scripts used for compiling the game triggered by various events. Here’s the action I use:

name: Compile and Push to Itch

      - master

    runs-on: windows-latest
    - uses: actions/checkout@v1
        ref: master
    - uses: warrenbuckley/Setup-MSBuild@v1
    - name: Compile Release
      working-directory: build
      run: |
        ..\tools\genie.exe vs2019
        msbuild vs2019\Symmetry.sln -p:Configuration=Release
    - env:
      name: Upload to Itch
      run: |
        curl -L -o
        7z e
        .\butler.exe push bin bluerriq/symmetry:windows-prealpha --userversion-file bin/version.txt

I configured it such that whenever there is a new commit pushed on the master branch, the latest version of the code is checked out and compiled. Once the code is compiled, it is pushed to the proper channel on my account. Now whenever I need to push a new build to itch merge from dev into master, push it to github and a new build appears on Itch. Not exactly as simple as pressing a button but it comes quite close. I could just wrap these steps up into a script and just call that but it seems rather pointless as I am bound to use these commands anyway to update the master branch. The fact that it also generates a new build is just cherry on top.

On the gameplay side, I added proper first person movement. The player is no long a floating head and is affected by gravity and can collide with scene geometry. The collision is estimated using Axis Aligned Bounding Boxes(AABB) which I feel is good enough for this project. I had ODE integrated into the game but ripped it out in favour of simple brute-force ray/bounding-volume collision detection. A physics engine seems a bit excessive for my needs.

I also added the first enemy type to the game – A Turret! Not very exciting I admit, but I needed to introduce some element of challenge into the game.

All these variables to keep track of, just for a floating monkey head(placeholder for turret mesh)!

The AI for the turret is based on five states. Idle/Default, Alert, Acquire Target and Attack. On idle, the turret scans directly infront of it. If the player is spotted, it moves to Alert state in which it scans for the player. Once the player is spotted, the turret moves to Attack state and attacks the player. If the player changes their position, the turret moves to Acquire Target state in which it follows the player if possible. If the player is not found it goes back to Alert state where the turret starts scanning for possible player positions. If the player cannot be found after a certain time period, the turret moves back to Idle state and only scans directly ahead.

Now I only have to implement Win/Lose conditions and then I’ll have every thing I need to create working levels that can be played from start to finish. It’s all coming together rather nicely. It’ll be interesting to dip my toes into the unfamiliar and new(for me) territory of level design.

Project Source Code : Github.