goedware game jam #10: consequences

friday

friday was spent brainstorming ideas for the theme "consequences". at first i was thinking of a time loop game,. where saving one person causes another to be doomed, and 5 or 6 of these moments are chained up together and you have to figure out how to save everyone. thinking about how to implement that though, with all the branching paths, it would have to be a visual novel, and i don't want to make a visual novel.

with the brainstorming help of Archival and Naelstrof, instead I arrived on a more freeform AI-focused game where you're the captain of a starship, and you have to make tough and risky decisions to try to keep (most) of your crew alive. there will be several catasrophes one after another, and how you handled the previous ones will affect how you can handle the next ones. think of it like an episode of star trek, except you aren't as good as kirk is. the AI is going to need to be deterministic, so if you repeat your actions you will get the same result.

saturday

most of saturday was spent relaxing, but i spent the morning modelling out placeholder ship geometry and (very) placeholder characters. i also got a kanban board up and running with a few work items to get started on.

Todo Doing Done
  • goal-based ai with priority ranking
  • character object
  • grid based movement system
    • per-turn, character has a certain amount of movement. they can't move through walls.
    • move function
    • don't go through walls
    • pathfinding
    • limit distance
  • turn based system
  • system to sum up the important bits of state in the game for RNG seed
  • episode 1
    • let's say there's one catastrohpe for the first episode. if you lose any crewmates, you won't have them for the next episode.
  • better character model
  • character object
  • basic ship environment

sunday

on sunday, i did most of player movement and pathfinding. i still need to limit the distance they can travel though. i was looking at Godot's navmeshes for this task, but decided they were too unweildy for the grid-based environment i had set up. i want the AI to be very predictable, so the game state should be very quantized, on a grid. i opted to use the AStar3D object for this task. there is no automatic path building with AStar3D, so I spent most of today writing a flood-fill path tester, and setting up a pathfinder singleton for other objects to interface with.

have an array of vectors representing 8 directions (cardinal and diagonal) have an array of edges to be tested, starting with those 8 directions pointing out from the world origin while there are still edges to be tested: raycast along the first available edge if the raycast hit something: remove this edge from the list else: configure that edge to be connected in the AStar3D object remove this edge from the list add the edges starting from the end point of the edge, and ending in each of the 8 directions, making sure there are no duplicates

one issue i came across with this, was that corners would have an inconsistent hit test because the ray would just barely graze the corner. i solved that by running 8 raycasts, each offset in a different direction by a preset actor radius. i could probably halve the number of raycasts (just do diagonals) if i run into performance issues in the future.

Todo Doing Done
  • goal-based ai with priority ranking
  • turn based system
  • system to sum up the important bits of state in the game for RNG seed
  • episode 1
    • let's say there's one catastrohpe for the first episode. if you lose any crewmates, you won't have them for the next episode.
  • better character model
  • limit distance during pathfinding
  • basic ship environment
  • character object
  • grid based movement system
    • per-turn, character has a certain amount of movement. they can't move through walls.
    • move function
    • don't go through walls
    • pathfinding

monday

on monday, i got some guidance from Flicky on what sort of things a spaceship captain would do, and what sort of features a spaceship would have. he also wrote me a few scenarios to use in the game, so now i have a clearer idea of what features need to be added for those scenarios to happen.

i redid the ship model with specific systems and sectors in mind, fixed a bug with the pathfinding (objects were blocking the flood-fill algorithm, so i added a mask to the physics raytrace), and i got started on the goal-based ai system. right now the only task is move, but i successfully chained up a few of these, so now what's left is to add new task types when those features are added.

Todo Doing Done
  • turn based system
  • ship systems
    • systems can be disabled, damaged, or destroyed
  • character death
  • scenario 1
    • Captain! An unexploded mine is lodged through a bulkhead in [section] and could detonate any minute!
    • - Evacuate that section and surrounding sections before it detonates (consequence: surrounding areas of ship are seriously damaged, but all crew is able to evacuate)
    • - Seal off the section to contain the explosion (consequence: section is destroyed, crew in that section dies, but the remainder of the ship is intact)
    • - Send the weapons expert/engineer to disarm it (consequence if failed: specialist dies, ship is seriously damaged)
  • scenario 2
    • Captain! [System] is having a power surge and it could cascade through the ship!
    • - Disable the system (consequence: system is inoperable, but the ship is safe)
    • - Attempt to remotely repair the system (consequence if failed: the power surge damages several other systems on the ship before stabilizing)
    • - Send the engineer to repair the system (consequence if failed: the power surge is resolved... as the excess energy is ran through the engineer's body, vaporizing them)
  • scenario 3
    • (During combat) Captain! The torpedo launcher is jammed, the last volley failed to clear the tube!
    • - Fire another torpedo! (The torpedoes collide and both explode in the tube, seriously damaging the ship and permanently disabling your torpedo launchers. Great job.)
    • - Open the tube at both ends, and seal the weapons bay! (The torpedo detonates, but the explosion is less serious - the weapons systems are badly damage but still barely operational)
    • - Send the weapons specialist into the tube to clear it! (if failed: as the torpedo is about to explode, the specialist vents the tube, sending the torpedo clear of the ship into the vacuum of space... with them)
  • system to sum up the important bits of state in the game for RNG seed
  • enemy agents
  • better character model
  • higher pathing cost for characters to pass each other
  • basic ship environment
  • character object
  • grid based movement system
  • limit distance during pathfinding
  • new ship
  • make pathfinder ignore everything but world
  • goal-based ai with priority ranking

tuesday

on tuesday, i implemented character death (very simple), the start of a ship systems manager, and added a few more crewmembers. i gave them cat names

i wanted the people to affect each other as they pathed around the ship, so i increased the pathing weight for occupied tiles. i started to have a hard time figuring out how to manage everyone doing this at the same time, but remembered the game was going to be turn-based anyways, so i implemented a turn manager. the rest of the night was spent ironing out all the bugs surrounding turn-based pathfinding.

Todo Doing Done
  • scenario 1
  • scenario 2
  • scenario 3
  • system to sum up the important bits of state in the game for RNG seed
  • enemy agents
  • better character model
    • animations for walking, dying, interacting
  • ship systems
    • systems can be disabled, damaged, or destroyed.
    • a character can manage multiple systems if there are not enough crewmates left.
    • basic ship environment
    • character object
    • grid based movement system
    • limit distance during pathfinding
    • new ship
    • make pathfinder ignore everything but world
    • goal-based ai with priority ranking
    • character death
    • higher pathing cost for characters to pass each other
    • turn based system