Skip to content

pavel-alpinweb/phaser-vue-start-template

Repository files navigation

Starter Template: Phaser + Vue + Pinia + Vite for HTML5 Games

This is a starter template for creating HTML5 and PC games.  
Optimized for PC and platforms like [itch.io](https://itch.io).  
Supports fullscreen mode.

Tech Stack:

  • Phaser – used for game logic and graphics rendering
  • Vue – used for building user interfaces
  • Pinia – used for managing game state
  • Vite – used for project bundling and development
  • Electron - is used for creating a desktop application version.

Authors:

Art is sourced from open resources.
Character design and animation by Pavel Bezdornov.

Built-in Game Mechanics:

  • Top-down movement (WASD)
  • Platformer movement (WAD)
  • Level transitions powered by Vue Router
  • Health gain and loss system

Installation and Build:

  • Requires Node.js version 20+
  • Install dependencies: npm i
  • Start development server: npm run dev
  • Build the project: npm run build
  • Serve the built project: npx serve dist
    (This allows running the template on a regular hosting or platforms like itch.io)
  • Start electron application: npm run electron:start
  • Package the Electron application: npm run electron:package
  • Build the Electron application: npm run electron:make

Project Structure:

  • src/composition – contains files for game logic using the Phaser engine
  • src/configs – contains constants for engine settings, game logic, and event names
  • src/scenes – contains files for managing Phaser scenes (Phaser.Scene)
  • src/screens – contains Vue components responsible for rendering game screens
  • src/store – contains files for working with Pinia
  • src/ui-components – contains Vue components for rendering the HUD
  • src/utils – contains helper functions
  • public/assets – contains all assets
  • electron - entry point of Electron application

About

Simple Game Template on Phaser + Vue + Vite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •