Skip to content

Food please/rewrite movement overworld cleanup #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7c5b6c3
Add comments to Field, draft the GamepieceRegistry
food-please May 15, 2025
a94a4f5
Refactor/simplify Gamepiece
food-please May 28, 2025
38d7780
Refactor gameboard, implement BoardTileMapLayer to block movement
food-please Jun 1, 2025
203e0e5
Set GameboardProperties in the editor
food-please Jun 2, 2025
3c3ee17
Update DebugGameboardBoundaries to use GameboardProperties
food-please Jun 2, 2025
17d531f
Refactor Pathfinder
food-please Jun 3, 2025
468ada8
Implement pathfinding
food-please Jun 3, 2025
ab337b1
Adapt FieldCursor to new structure
food-please Jun 3, 2025
96f8c5c
Reimplement AIPathController
food-please Jun 4, 2025
efcaed4
Add flags to Pathfinder.GetPathToCell()
food-please Jun 5, 2025
a7010d0
Fix broken anims, add mouse input to Interactions
food-please Jun 5, 2025
60f8e83
Add directional movement (e.g. WASD) for PlayerController
food-please Jun 5, 2025
e99869a
Set player controller to search/work with Interactions
food-please Jun 5, 2025
c7ccfd1
Fix broken GamepieceAnimations, reintegrate all code with main scene
food-please Jun 6, 2025
0e403f7
Reworked treasure chests as Gamepieces
food-please Jun 7, 2025
5005366
Began folder structure rework
food-please Jun 7, 2025
901bfff
Remove generated .depren files
food-please Jun 7, 2025
31a903c
Allow Pathfinder to update properly when layers are freed
food-please Jun 7, 2025
5f0318f
Clean up Interactions in Main.tscn
food-please Jun 8, 2025
c756051
Completely reintegrate main with new code
food-please Jun 9, 2025
590fd13
Update changelog to 0.3.3
food-please Jun 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v0.3.3 Overworld Gameboard & Gamepiece Rework 🔧

### Under-the-hood changes
This update has aimed to greatly simplify the code responsible for moving Gamepieces around the Gameboard, while keeping the structure of the code roughly the same. Most scripts dealing with the overworld/field gamestate have been changed, but the main features are as follows:
- Collision on the Gameboard is no longer based on physics-based collisions. The physics implementation was great, but introduced a host of edge cases (e.g. two gamepieces moving onto the same cell on the same physics tick) that had to be accounted for.
- Rather, objects used to build the pathfinder use a registry pattern; GameboardLayers register themselves with the Gameboard, and Gamepieces register themselves with the GamepieceRegistry. The board and registry update automatically based on signals from their registered objects, and the user no longer needs to worry about emitting global signals such as "FieldEvents.terrain_changed". It all happens under the hood.
- The removal of circular dependency issues that were present in early Godot 4.X has made life much easier. The Gameboard singleton allows anything to figure out where coordinates occur on the gameboard and if those coordinates are moveable (thanks to the single Pathfinder), and the GamepieceRegistry allows objects (cutscenes!) to easily find where everything and everyone is placed on the board. Gameboard and GamepieceRegistry are autoloads that allow designers to easily observe the global overworld state without having to worry (too much) about messing things up.
- Many objects have had their responsibilities reduced, such as Gamepiece which now only deals with moving to a point (rather than also tracking cells, coordinates, movement paths, etc.), and GamepieceControllers which now are much more focused on helping a gamepiece follow a path in response to player and AI input (as opposed to previously, where they also dabbled in pathfinding, physics shenanigans, etc.)
Overall, the code should now be simpler to understand at first glance, and much easier for newcomers to work through. Happy designing!

## v0.3.2 Combat UI Demo 🖱️ - Battler Actions & User Interface

### Guide the player through action selection
Expand Down
Binary file removed assets/characters/default_animations/RESET.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/idle_e.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/idle_n.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/idle_s.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/idle_w.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/run_e.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/run_n.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/run_s.anim
Binary file not shown.
Binary file removed assets/characters/default_animations/run_w.anim
Binary file not shown.
Binary file not shown.
26 changes: 0 additions & 26 deletions assets/characters/generic_character_gfx.tscn

This file was deleted.

24 changes: 0 additions & 24 deletions assets/characters/gobot_gfx.tscn

This file was deleted.

2 changes: 1 addition & 1 deletion assets/gui/path_destination_marker.tres
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://b71dt8n01lhd0"]

[ext_resource type="Texture2D" uid="uid://dm4h0uo6gjp22" path="res://assets/terrain/dungeon_tilemap.png" id="1_km3tr"]
[ext_resource type="Texture2D" uid="uid://dm4h0uo6gjp22" path="res://overworld/maps/tilesets/dungeon_tilemap.png" id="1_km3tr"]

[resource]
atlas = ExtResource("1_km3tr")
Expand Down
Loading