Development Update II: Explosions & Scripting

Making the game easier to make game modes for.

Projectile Rotation fixed

I fixed the rotation of the projectiles, now they spawn appropriately when the ship is rotated

Bullet spawns working!

Explosions!

I've also begun work on the explosion particles.

Explosions (WIP)

They're a bit floaty at the moment, but I'll work on making them feel better.

Lua Scripting & Modding

Say what?

That's right. You heard me. I'm in the middle of adding in the Lua API to the game to allow people to write their own game modes!

Lua is one of my favourite languages, so I decided "why not? - it's pretty straightforward to embed into a program."

Here's an example so far that I've written. It's subject to change.

Luau
local spawns = {
    {
        {Type = 'AI', Enum.AIType.Kamakaze, 3},
    },
    {
        {Type = 'AI', Enum.AIType.Regular, 5},
        {Type = 'Debris', Enum.DebrisType.Asteroid, 10},
    },
    -- ... etc.
}
                                            
--[[@dox Game.OnLevelCleared
    Called when the game\'s level is considered \'cleared\'
    @param GameManager manager
]]
function game.OnLevelCleared(manager)
    manager.NextLevel();
end
                                                        
--[[
    @dox game.OnLevelChanged\n  Called when the level is changed
    @param GameManager manager
    @param int level
]]
function game.OnLevelChanged(manager, level)
    print("Changed level to " .. level);
                                                        
    local spawnInfo = spawns[level];
    if (spawnInfo) then
        print(#spawnInfo);
        for _, spawn in pairs(spawnInfo) do
            if (spawn.Type == 'AI') then
                manager.SpawnAI(table.unpack(spawn));
            end
        end
    end
end
                                                                                                                            
--[[
    @dox game.Main
    Called when the game\'s started
    @param GameManager manager
]]
function game.Main(manager)
    -- Basically starts the game
    manager.NextLevel();
end

So I could specify what AI spawn on what wave/level and how many. In the future I'm planning to add the ability to display messages so that I can give some cheesy lore into the game.

Unfortunately I don't have a demonstration of this just yet - as I'm writing an entire new class to replace what currently happens in the game to it's own instance (for future stuff - like possibly multiplayer)

Partial Controller support

I randomly felt like trying to see if I could adapt the movement system for controllers, and it worked out... so now the movement in the game supports controllers.