* General proofreading for grammar and spelling
* General formatting
* Addition of appropriate literals where appropriate, i.e. `&"foo"` for `StringName` cases and `^"foo/bar"` for `NodePath` cases
* Improve gamepad behaviour in rpg
Fix gamepad can't do dialogue.
Fix character often plays bump animation with gamepad when there's no
obstacles around.
Add gamepad A to ui_accept so gamepads can press buttons in dialogue and
combat.
Use get_vector so we get an automatic deadzone on our input.
Round our input direction so we don't pass Vector2i(0,0) to
request_move, get denied, and then do a bump animation.
* Use SpriteFrames instead of animating texture
Seems like Godot 4 doesn't allow toggling AnimationPlayer tracks by
making children editable so the texture is no longer being set and the
player is invisible. Regardless, this workflow is also not scalable to
multiple enemy types. Instead, use SpriteFrames to setup different
visuals for each slime.
Triggers animations from code alongside AnimationPlayer calls because
doing it in AnimationPlayer seemed unnecessarily complex.
* Give all slimes a common base class
Split player input handling from walker to allow both slimes to use the
same visual setup. In a real game, you'd want this kind of setup so
enemies are able to walk on the grid too.
Remove unused actor.gd -- looks like this was an early version of
walker.gd.
Setup opponent slime as type=Actor because otherwise you can't fight
them.
* Convert TileMap to TileMapLayer
Used "Extract TileMap layers as individual TileMapLayer nodes" in the
TileMap editor and removed the 0 layer argument from functions in
grid.gd
* Explain and rename facing direction node
When I first started looking into the character, I couldn't figure out
what this play button texture was for. After experimenting, it might be
an old version of the character visuals or a demo to show how to make
your character rotate.
* Fade to black between scenes
Fix blue screen when entering combat.
Our fade ColorRect was hidden so it never displayed. We removed the
exploration scene before fading so the fade started with an empty scene
with a blue skybox.
* Loop idle animation in combat
Add AnimationTree to combat character setup so we can tell when the
take_damage animation completes. This was harder than expected because
by default Godot modulates to black and sets scale to 0 unless you
specify otherwise with the RESET animation.
* Add a CanvasLayer above each clickable Control root
Fix mouse can't click buttons.
Seems like we're not able to click buttons in Godot 4 without a
CanvasLayer root. Adding that makes it work, but required some
restructuring to point at the correct node. In cases like combat+ui,
change it to emit a signal to use the "call down, signal up" pattern.
* Remove error comment that no longer occurs
Neither winning nor fleeing triggers this warning on Godot
v4.4.1.stable.official [49a5bc7b6].
* Rename parent -> grid
Make it clearer that the parent of the player and other pawns is
expected to be our Grid class.
This leads to code that is easier to understand and runs
faster thanks to GDScript's typed instructions.
The untyped declaration warning is now enabled on all projects
where type hints were added. All projects currently run without
any untyped declration warnings.
Dodge the Creeps and Squash the Creeps demos intentionally don't
use type hints to match the documentation, where type hints haven't
been adopted yet (given its beginner focus).
This re-ports the following demos to Godot 4 following their latest `3.x` versions:
- 2D Navigation with AStarGrid2D
- 2D JRPG Demo
- 2D Isometric Game
- 2D Platformer
Some tweaks have also been made in the process, such as split screen players
having different colors in the 2D Platformer demo.
Co-authored-by: Nonparoxysmic <69494951+Nonparoxysmic@users.noreply.github.com>
1. Renamed `CELL_TYPES` enums to `CellType`
2. Fixed references, old: `turn_combat_system/actors/Actor.gd`, new: `turn_combat/combatants/Combatant.gd`
3. Fixed references, old: `turn_combat_system/actors/health/Health.tscn`, new: `turn_combat/combatants/health/Health.tscn`
4. Fixed bug in `grid_movement/pawns/Actor.gd` extending lowercase `pawn.gd`; changed to `Pawn.gd`
5. Renamed lowercase `grid_movement/pawns/actor.gd` to capital `Actor.gd` for consistency
6. Fixed some unused local variables warnings
Other changes are from engine, after opening and saving all scenes.
closes#263
- Rename dialog to dialogue
- Give meaningful name to generic actors
- Move combat screen content to turn_combat folder
- Add new icon.png and .svg
- Change combat UI to not emit a signal from its parent, instead pass parameters to a function and let the combat work on them there
- Remove UI accessing deep layers on the hierarchy (get_parent().get_node("../etc/etc../etc...")
- Fix defend() stacking, making the player invulnerable, now evey turn the Health.armor resets to a base_armor value
- Remove useless Inventory button (maybe added again in the future when an inventory is added to the demo)