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.
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 |
|
|
|
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 |
|
|
|
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 |
|
|
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 |
|
|
|