Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/popcron/ecs-platformer
https://github.com/popcron/ecs-platformer
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/popcron/ecs-platformer
- Owner: popcron
- License: mit
- Created: 2023-03-03T21:50:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T17:49:39.000Z (12 months ago)
- Last Synced: 2023-12-26T18:41:35.418Z (12 months ago)
- Language: C#
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ECS Platformer
A project made with Unity's ECS that implements a 2D player that can move sideways and jump. With authoring components for game objects and prefabs, matching the ECS components.### Players
When an entity has a [Player](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Player/Player.cs) component, it can also have a [PlayerInputState](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Input/PlayerInputState.cs) component, abilities will be performed based on the input state.
In this project's example implementation, only the player entity with the [MyPlayerTag](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Player/MyPlayerTag.cs) will end up with an input state component at runtime, this is done by the [MyPlayerInputSystem](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Input/MyPlayerInputSystem.cs).### Abilities
Abilities are implemented as a combination of components and 1 aspect to represent it (the aspect acts as a top level abstraction to contain all the pieces).
If they're abilities that make the player perform or do something in response to some input, they will read the input from PlayerInputState component on the same entity (how much to move, should jump or not for example).
* [Grounded Movement](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Abilities/Grounded%20Movement/GroundedMovement.cs)
* [Groundedness](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Abilities/Groundedness/Groundedness.cs)
* [Jumping](https://github.com/popcron/ecs-platformer/blob/main/Assets/Code/Abilities/Jumping/Jumping.cs)