mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 13:30:07 +01:00
aecf661c9c29edf71ce9045796b79daaf26bf798
* 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.
Godot demo projects
Each folder containing a project.godot file is a demo project meant to
be used with Godot Engine, the open source
2D and 3D game engine.
Godot versions
- The
masterbranch is compatible with Godot'smasterdevelopment branch (next 4.x release). - The
3.xbranch is compatible with Godot's3.xdevelopment branch (next 3.x release). - The other branches are compatible with the matching stable versions of Godot:
Importing all demos
To import all demos at once in the project manager:
- Clone this repository or download a ZIP archive.
- If you've downloaded a ZIP archive, extract it somewhere.
- Open the Godot project manager and click the Scan button on the right.
- Choose the path to the folder containing all demos.
- All demos should now appear in the project manager.
Try the demos in your browser
Most of the demos are exported to GitHub Pages. They can be viewed here.
Note: The performance of Godot in a browser is lower than natively on desktop. For the best performance, consider downloading the demos.
Useful links
License
Those demos are distributed under the terms of the MIT license, as described in the LICENSE.md file.
Description
Languages
GDScript
89%
C#
9.4%
JavaScript
0.7%
GLSL
0.5%
Shell
0.2%
Other
0.2%