This project is based from Pixi Open Games. A collection of games to help learn how to make games using PixiJS and its ecosystem of plugins and tools.
This project utilizes multiple pixi based libraries including:
- PixiJS a rendering library build for the web.
- UI for commonly used UI components in PixiJS.
- AssetPack, a framework agnostic tool for optimizing assets for the web.
Other neat stuff in this project:
- written in Typescript, with linting and formatting (Eslint and Prettier)
- package management with Yarn (Fast, consistent, secure)
- uses GreenSock Animation Platform (GSAP). Wow! Do people know about this?
- built with Vite, OMG its awesome.
- hosted with Firebase Hosting
- deployed to Firebase with Github Actions
- sends highscores to Cloud Firestore
This simple game demonstrates how data could be sent to a separate app, and displayed in real-time.
Both apps (and potentially many others) are connected to the same cloud based database - the NoSQL Firestore Database. The second app here consumes the data in a stream using a React hook and updates the table in real-time!
- initializeApp
- getFirestore
- getAuth
- signInAnonymously
- collection
- addDoc
- serverTimestamp
This project needs Node.js
and Yarn
installed on your system.
# Clone the repository
git clone http://github.com/dakerr/pirate-island-pixijs
cd ./pirate-island-pixijs
# Install dependencies
yarn
# Start the project
yarn start
* this will let you play the game but the second project is needed to save the high scores
# Assetpack bundles, tsc compiles and vite builds for production. Output to /dist
yarn build
Deployed to Firebase Hosting pushes and merges to main
with GitHub Actions.
Have fun!
Until I setup a GitHub Action to , you will need to setup a Firebase config yourself. (Not going to commit secrets to GitHub!) A Firebase API key is required to access the Firestore.