Welcome to Glitch-and-Go, a hands-on workshop repository designed to teach Phaser game development. This project includes both complete source files and modular code excerpts to help you understand and experiment with different parts of the game.
This repository contains the source code for a Phaser-based game where players navigate obstacles, avoid spotlights, and score points by progressing through the level. The project is structured to facilitate learning, with key game logic split into modular code excerpts for easy reference.
Here’s a quick overview of the key directories and files:
-
src/
Contains the main source files for the game. This is where the complete game logic resides.scenes/
: Includes the main game scenes likeMainScene
andStartScene
.assets.js
: Defines game constants like gravity, platform dimensions, and player speed.main.js
: The entry point for the game, where the Phaser game configuration is defined.
-
src/code excerpts/
Contains modular snippets of code for specific game features. These are useful for understanding individual mechanics like spawning obstacles, handling player physics, or setting up controls. -
index.html
The main HTML file that loads the game into the browser. -
vite.config.js
Configuration file for the Vite development server. -
readme.md
This file, which provides instructions and details about the project.
Follow these steps to set up and run the project:
- Clone the Repository
git clone https://github.com/your-username/glitch-and-go.git cd glitch-and-go