* Update Platformer 2D to Godot v4.3
Before this change, if you tries to import the Platformer 2D project
using Godot v4.3 (the latest stable version of Godot, at the moment),
you would get the following warning:
> Warning: This project was last edited in Godot 4.2.
> Opening will change it to Godot 4.3.
>
> Open anyway? Project will be modified.
This change updates the project to Godot 4.3 so that that warning no
longer appears. When you upgrade to a newer version of Godot, sometimes
certain files will automatically be updated by the Godot Editor after
the upgrade has been completed. Specifically, the files won’t get
updated until after they’re opened in the Godot Editor. When creating
this commit, I tried to open every single file for Platformer 2D in the
Godot Editor to make sure that all of those automatic changes are
included in this commit.
* Replace Platformer2D’s TileMap with a TileMapLayer
Before this change, the Platformer 2D used a TileMap Node. TileMaps are
deprecated. TileMapLayers should be used instead [1].
[1]: <https://docs.godotengine.org/en/4.3/classes/class_tilemap.html#tilemap>
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).
- Move all demo projects that don't require Forward+/Mobile-only features
to the Compatibility rendering method. This improves performance significantly
on low-end devices and ensures visuals are identical to a web export
of the demo.
- Set deadzone on all inputs to 0.2 for better gamepad usability.
- Remove reliance on `default_env.tres` to use built-in Environment
resources in the main scene instead (which follows the preview environment
workflow).
- Remove notices pointing to GDNative or VisualScript, since both were
removed in 4.0.
- Various bug fixes and usability tweaks to 10+ demos.
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>
All demos were opened with Godot 4.2.1, with the mesh format
upgraded for 3D demos.
The 3D antialiasing demo now uses Extra Cull Margin on the last
object to prevent it from disappearing too early when the camera
rotates (due to its use of shader-based animation).
This allows those demos to run on a greater range of devices.
Particles2D nodes were converted to CPUParticles2D for compatibility
with GLES2.
Physics-Based 2D Platformer demo now uses the same stretch mode
as 2D Platformer for consistency.
Use the keep_height aspect ratio option as in the original demo. This prevents
seeing the clear color when making the window tall
Change the ParallaxBackground scene so mirrored sections don't disappear on wide windows
Remove unused spawn input action
Add support for the gamepad's left stick for movement
Use the project settings to store the gravity value project-wide
Remove type hints
This Godot project is a complete rewrite of the official Platformer 2D demo. This is part of a proposal to improve and harmonize the official demo projects. We want to:
- Teach good programming practices with Godot.
- Bring demos to a higher quality standard.
- Unify the code in the demos.
See the [open issue](https://github.com/godotengine/godot-demo-projects/issues/390) for more information.
This new demo showcases features from the original, and works with Godot 3.2.
Co-authored-by: Johnny Goss <me@johnnygoss.dev>
* 2d/platformer works flawlessly on Godot 3.1 beta 8
* fix warnings for inferred node type
* every script has a class_name
* formatted code for better clarity
* each files has its own subfolder
* As suggested by @akien-mga
* states are back to const instead of enum
* class_name comes after extends
* better code style
* PascalCase for nodes
- Added the Z key to shoot so that it follows the same input as Platformer3D
- Fixed the particles in the bullet scene so that it follows the same looks as Platformer3D
- Changed the scaling for the window from none to 2D