https://github.com/serhiichogames/collect-diamonds
Open source pixel game written with Phaser JS where you need to collect diamonds and avoid the enemy catching you
https://github.com/serhiichogames/collect-diamonds
game javascript js phaser phaser-js phaser3 phaserjs ts typescript
Last synced: about 1 month ago
JSON representation
Open source pixel game written with Phaser JS where you need to collect diamonds and avoid the enemy catching you
- Host: GitHub
- URL: https://github.com/serhiichogames/collect-diamonds
- Owner: SerhiiChoGames
- License: mit
- Created: 2024-04-14T06:10:52.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-29T08:20:03.000Z (about 2 months ago)
- Last Synced: 2025-03-29T08:20:12.904Z (about 2 months ago)
- Topics: game, javascript, js, phaser, phaser-js, phaser3, phaserjs, ts, typescript
- Language: TypeScript
- Homepage: https://serhiichogames.github.io/collect-diamonds/
- Size: 10.3 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Collect Diamonds
Open source pixel game written with Phaser JS where you need to collect diamonds and avoid the enemy catching you.
> [!WARNING]
> The game is not finished yet, but you can play it [here](https://serhiichogames.github.io/collect-diamonds/)## Installation
The project is written with Phaser JS and Vite. To run the project locally, follow the steps below:1. Clone the repository
1. Navigate to the project directory
1. Run `npm install` to install the dependencies
1. Run `npm run dev` to start the development server## Notes
- `init() -> preload() -> create() -> update()` is the order of execution of the functions in the game loop. All the functions are executed only once except `update()` which is executed in a loop for each frame.
- You can flip the sprite with `flipX` and `flipY` properties on the Sprite object. For example, `sprite.flipX = true` will flip the sprite horizontally.
- You can rotate sprites by calling the `setAngle()` method on the Sprite object. For example, `sprite.setAngle(90)` will rotate the sprite by 90 degrees. It rotates based on the origin position of the sprite. By default, it's in the center of the sprite.## License
The Textwire project is licensed under the [MIT License](https://github.com/SerhiiChoGames/collect-diamonds/blob/master/LICENSE)