What’s next May 2022

A slightly delayed monthly post, oops!

Last month, things slowed down a bit, but I have reached some goals with Gravity Flux. The gameplay is more or less complete! I just need to finish up the last menu – the player stats, and of course Steam achievements and integration. Boring and tricky compare to the rest of the game, but I’ll get there!

I am also planning on running a hybrid, online and in-person Godot Engine workshop. That has been taking up a lot of my time as well, and this month I hope to complete the main course content for people. If you’re interested, please join my Discord server in the Links page on this site. The course will cover making a clone of my game, Wizards with Rockets. You’ll see how quick it is to make the game, especially compare to making it with C programming..

So the workshop will likely take up most of my spare time, but I’ll try to make some progress with Gravity Flux. my plan was to release the game roughly mid 2022, which is still looking possible.

In other gamedev news, I’ve decided I want to make my own 3D game engine, much like I’m making a 2D engine with Wizards with Rockets, and improving another one of those core programming skills, C++ programming. I thought I’d try Vulkan programming, but we’ll see how that goes. I might cave in and just use Ogre3D or something much easier. This is going to be a very long-term project, probably longer than Wizards with Rockets will be, and that’s already been in development since 2018 (4 years).

Oh, and with Wizards with Rockets, I have been successful in porting the build system to CMake! This is one of those “dark arts” of programming that are notoriously poorly documented and very few people know it very well.. Sigh, I wish that wasn’t the case because it’s been a rough experience learning CMake. But I’ve forced myself into it as I’ve been using CLion IDE with a view to keep using it, and it’s a paid product, so I better learn it well!

Here’s the CMakeLists.txt file that defines the build process:

cmake_minimum_required(VERSION 3.22)
project(topdown_shooter C)

set(CMAKE_C_STANDARD 99)

if (WIN32)
    include_directories(win64lib/include)
    link_directories(win64lib/lib)
    set(game_LIBS liballegro.dll.a liballegro_image.dll.a liballegro_main.dll.a liballegro_font.dll.a
            liballegro_primitives.dll.a liballegro_dialog.dll.a liballegro_audio.dll.a liballegro_acodec.dll.a
            liballegro_ttf.dll.a )
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
    include_directories(/usr/include/libxml2/)
    include_directories(allegro_5.2_linux/include)
    link_directories(lib)
    link_directories(allegro_5.2_linux/lib)
    link_directories(libs)
    set(game_LIBS liballegro.so liballegro_image.so liballegro_main.so liballegro_font.so
            liballegro_primitives.so liballegro_dialog.so liballegro_audio.so liballegro_acodec.so
            liballegro_ttf.so)
endif()


file(GLOB topdown_shooter_SRC
        "src/tmx/*.h"
        "src/tmx/*.c"
        "src/dyad/*.c"
        "src/dyad/*.h"
        "src/minIni/*.c"
        "src/nuklear/*.h"
        "src/nuklear/*.c"
        "src/*.h"
        "src/*.c")

# This was useful.. https://gamedev.net/forums/topic/639698-allegro-and-cmake-so-close-but-won39t-compile/5038817/
add_executable(topdown_shooter ${topdown_shooter_SRC})
if (WIN32)
    target_link_libraries(topdown_shooter ${game_LIBS} -lws2_32 -lxml2)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
    target_link_libraries(topdown_shooter ${game_LIBS} -lxml2 -lm)
endif()

With this file, you then make a build directory, such as ‘build-windows’ and then run cmake .. to generate build files. In CLion it uses the Ninja build system, but it can generate build files for many IDEs such as Visual Studio, XCode or just plan Makefiles, like what I’ve been using. In CLion, all you have to do after editing the CMakeLists file is press build and then run to to run it. And it’s working for me!

That’ll be the last of WWR I plan to work on for a while, as I’m quite busy with other stuff. Such as Gravity Flux which is very close to being released!

Leave a comment