-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Player: - Fix some player state machine bugs preventing player from transitioning to the correct state due to having multiple valid triggers, which in turn is caused by not being specific enough when specifying trigger conditions during state machine initialization. This reduces strange bugs where the player gets stuck in a specific state or won't take a valid action like reading a sign, or the player doesn't respond to a specific valid input. - Remove player idle back animation delay when finished reading a sign, at least for now. It looked a bit awkward when finished reading a sign from too far off center. Editor / Scenes: - Simplify main scene by combining upper & lower cliffs to reduce level complexity and duplication by almost 50%. Merge lower cliffs into upper cliffs and rename upper cliffs to cliffs. - Restructure the ground colliders to make them more reliable & way less buggy. - Reorganize & rename many nodes in Godot editor for simplicity & readability, which was made possible by the merging of upper and lower cliffs. - Reorganize the 10 waterfall sections so that section 1 is the very top and section 10 is the very bottom, respectively, which is a much more intuitive layout. - Lock some nodes in the editor to prevent them from being accidentally modified. Tiles: - Heavily rework tile intersection code in Tools.cs to improve accuracy and eliminate bugs. Allow units per tile aka cell size to vary from 1 to 16 for precise placement of tiles without affecting collision and overlap detection. - Greatly simplify player updates in Cliff.cs for detecting both cliff enclosing & ice intersection code. Signals: - Move ground detection signal callbacks for the player from Cliffs.cs to Player.cs which greatly simplifies everything, including not having to add duplicate callbacks in both classes. - Block more signals while changing player's animation-based collision shape to prevent signal callbacks from being triggered more than they should be. This is an ongoing workaround for godotengine/godot#14578 "Changing node parent produces Area2D/3D signal duplicates". - Improve naming of some signal callback methods. Player.cs refactoring: - Remove the use of delta from Player.cs, where it mainly a hack; awaiting a certain amount of idle frames has been more efficient. - Add more private convenience methods for energy meter management to simplify the code & increase readability. - Add more private convenience methods for sign reading management to simplify the code & increase readability. General refactoring: - Move more GetNode calls into _Ready methods and assign them to fields for efficiency, code simplicity, readability, & less possibilities for bugs. Tools: - Don't throw an exception in Tools when checking if any arrow key is pressed except the specified one, when the specified input is invalid; just return false to decrease game crashes. Extensions: - Add a string extension method for allowing the use of the null coalescing operator to work with empty strings, which greatly simplifies string-handling code, e.g., when using the ternary operator to return strings from methods. Cleanup: - Remove unused & obsolete classes. - Remove unused & obsolete methods. - Remove outdated & unnecessary comments. - Suppress unnecessary compiler warnings with comments for increased readability. - Remove obsolete compiler warning suppression comments. - Rename some outdated variables for increased clarity on their purpose. - Rename some methods for simplicity. - Reorganize order of some fields for increased readability> - Remove obsolete formatter-disabling tags for code blocks. - Add formatter-disabling tags where necessary. - Add some TODO's. - Improve many log messages. - Improve code formatting.
- Loading branch information
1 parent
cf4e8af
commit 48d5b9c
Showing
14 changed files
with
816 additions
and
909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.