
A 2D platformer prototype built using Phaser, TypeScript, Electron, and Vite. The project serves as a foundation for developing platformer games with smooth physics, animations, and desktop integration.
- Phaser 3 – Game engine for 2D games
- TypeScript – Type-safe JavaScript for better maintainability
- Electron – Desktop application framework
- Vite – Fast development and build tool
- Platformer mechanics: movement and jumping
- Sprite animations with frame-based rendering
- Physics-based interactions using Phaser's arcade physics
- Desktop & Web support with Electron and Vite
- Game scenes management using Phaser's Scene API
- Optimized FPS control with a custom
FPSScene
class
/src
├── assets/ # Game assets (sprites, audio, etc.)
├── config/ # Configurations (Electron, FPS settings)
├── constants/ # Game-related constants
├── entities/ # Game objects (Player, Platforms)
├── scenes/ # Game scenes (Main scene, FPS controller)
├── main.ts # Game entry point
├── game.ts # Phaser game setup
├── electron/ # Electron configuration
Using Yarn (recommended):
yarn install
Or using npm:
npm install
yarn start:dev:web
Runs the game in a browser using Vite.
yarn start:dev:desktop
Runs the game as a desktop app with Electron.
yarn build:prod:web
Compiles TypeScript and builds the web version.
yarn build:prod:windows
Generates a .exe
file for Windows.
Enhancements will be introduced in future prototypes based on this one. Check out the next iteration:
This project is licensed under the MIT License.