https://github.com/whoisfpc/charactermovement
a demo of 2d capsule based character movement implement
https://github.com/whoisfpc/charactermovement
2d character-movement game gamedev javascript movement network-multiplayer
Last synced: 8 months ago
JSON representation
a demo of 2d capsule based character movement implement
- Host: GitHub
- URL: https://github.com/whoisfpc/charactermovement
- Owner: whoisfpc
- License: mit
- Created: 2019-03-02T13:05:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-04T15:47:15.000Z (almost 4 years ago)
- Last Synced: 2025-02-27T19:54:40.730Z (over 1 year ago)
- Topics: 2d, character-movement, game, gamedev, javascript, movement, network-multiplayer
- Language: JavaScript
- Size: 426 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CharacterMovement
> a 2d capsule based character movement implement demo.

## Prerequisites
> nodejs & npm
## Build & Run
### 1. Install development dependencies
```sh
npm install
```
### 2. Build the project
only build the code
```sh
npm run build
```
or start a development environment
```sh
npm run dev
```
### 3. Try it
> open the public/index.html or navigate to [localhost:5000](http://localhost:5000)
> Test online [https://whoisfpc.github.io/CharacterMovement/](https://whoisfpc.github.io/CharacterMovement/)
## What it is
> It is a demo project, implement 2d capsule based character movement.
## What it is not
> It is not a library, so it will hard to direct use it in other project.
## Debug Console
| Console Vars | Description |
| :-----------------: | :---------------------------- |
| Time.scale | (0-1), scale time |
| Debug.showDebugDraw | (true,false), show move infos |
## Todo list
- [x] Walking
- [x] Walking slope
- [x] Step up stairs
- [x] Falling
- [x] Jumping
- [x] Animation
- [ ] Improve robustness
- [x] Network multiplayer
## License
This project is licensed under the MIT License - see the **LICENSE** file for details
## Reference
UE4 CharacterMovement
[https://gafferongames.com/post/state_synchronization/](https://gafferongames.com/post/state_synchronization/)
[http://www.gabrielgambetta.com/client-server-game-architecture.html](http://www.gabrielgambetta.com/client-server-game-architecture.html)
## Credits
Test animation sprites come from [Animated Pixel Adventurer](https://rvros.itch.io/animated-pixel-hero)