SkatePunk #2 - Core Game Structure

posted in SkatePunk - DevLog for project SkatePunk
Published July 08, 2023
Advertisement

Quick Apology

I received an email after my last blog post informing me that they don't like it when people post more than once a week - so a quick apology from me for anybody that may have been annoyed by my last blog post being so soon after the one before.

Progress so far

It's only been a week, but it really feels like it's starting to come together. I've added waves, weapon modifiers, player stats, multiple enemies etc. Here's a quick video

So yeah - You can probably see that there's a lot of game systems in place at least in some fundamental way. There's waves, enemy spawning, levelling up, weapon upgrades etc etc. I'm going to talk more about two of those systems that I think are interesting in this game, but first, a word on GDScript.

The Problems with the language

Progress has been relatively fast but I find I'm frequently fighting the language, GDScript. The bespoke language for the Godot engine. I'm a little stuck for options at the moment, since I'm working on an old linux computer. GDScript works well enough but I find that my style of programming doesn't gel well with dynamic languages. GDScript is not good at object oriented programming either. Nevertheless, I've built my systems in a very object oriented way. Zombie extends Enemy. Enemy extends Node2D. etc etc. This may end up being a test of how well object oriented programming works in godot. But also in games in general. I worry that, by trying to fit things into specific structures and abstracting too early, I'm going to hobble myself in the future. OK back to the fun stuff.

Emergent Behaviour - The Modifiers System

The principle I'm following with this game is “emergent behaviour”. There is one main system I'm leaning on to make that happen. The weapon modifiers system. I'm thinking of binding of isaac in the back of my mind while I'm designing this. There are certain things in Isaac, specifically programmed interactions. For example, you have two modifiers that can't stack. “Brimstone - Turn tears into a blood laser beam” (you attack in isaac by shooting ‘tears’) and “Mum's knife - turn tears into a knife”. In my simple stacking system, one of these would simply overwrite the other. In Isaac, that was true too for a long time until they added specifically coded interactions. “If you have Brimstone and Mum's knife, tears become a barrage of knives that fly out from your face in a straight line”.

Whether I choose to add that kind of thing remains to be seen, but if I do, I need to think about how to handle it.

Anyway, the system as it is now looks like this. Well mostly - I haven't built any continuous modifiers.

The Modifier System

. Currently I've built two modifiers. One that applies a burn (damage over time) to the enemy. One that adds piercing to the bullet. Very simple modifiers as they should be for my first modifiers. The Burn is an on-hit modifier, applying its effect only at the very end. The piercing is actually an on-init modifier. Each bullet has a property enemies_to_pierce. By default it's 0. The modifier will increment this by 1. Not sure if this'll be the solution in the long term but it seemed easiest for now.

The system sounds simple for the moment but you can imagine it could get much more complex and allow for engaging emergent gameplay. Imagine a bullet that phases in and out of existence every 0.5 seconds, when it exists it is surrounded by a ring of fire. When it hits an enemy it explodes into a shower of bullets, all with the same modifiers (except the explodey one cos otherwise it'd go infinite) that fly off in different directions.

So yeah, this is a humble beginning to something that could be very cool in the future.

Easy-to-design enemies with the Behaviours system

The other system I'm looking at is essentially an AI system. I design a bunch of behaviours that enemies can enact. These behaviours are reusable and composable. So if you give an enemy 2 or more behaviours, they will all activate.

An enemy that wanders around and attacks at random

The way it becomes more complex is when you can transition between different sets of behaviours. Something that I added is the ability for a behaviour to report to the actor (in this case, the enemy) that the behaviour has been completed successfully. This allows the enemy to transition into attack mode.

An enemy that approaches the target (whilst making sure to face it) and then begins to attack at random intervals whilst making sure it's facing the right direction

I'm hoping that this system will help me design many enemies with composed behaviour that makes them feel unique and interesting. It would also be possible to create random enemies with random combinations of these behaviours. That's probably not gonna be a good idea but it might be a fun experiment.

Meet your enemies

Currently I've designed 3 enemies. I am absolutely not an artist so they look kinda shoddy but I did my best.

Zombie

This is a zombie. I don't really know why it's called a zombie. It was the enemy I'd already designed in the before-times before the revival. It just rushes down the player and dives into them, dieing on contact but doing some damage in the process.

Spinny

This is spinny! They are a little guy. They spin around randomly, the fire randomly, and they wander around randomly too. They don't really know what's going on and they don't really care. They are my favourite

Wingbat

This is a wingbat! They will chase down the player. When they get close, they'll start firing. Pretty simple IMO.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement