Source code for the Bloomfield game:
You can find the game online here here. You can find the debug mode here here.
Using Phaser game library. Library pulled via node. Code compiled by webpack.
npm install
npm run build # compile the code via webpack
npm run dev # run the web serverRemember to recompile the code with webpack when developing: npm run build
README.md: this docpublic: assets folderindex.html: html page which attaches the gamegame.js: configuration for the game (add scenes here)- Scenes:
fieldScene.js: main game scene classstartScene.js: title page scene, entrypoint of phaserinput.js: UI/keymap sceneroundEnd.js: round end scenegameOver.js: game over scene
- Game objects/Sprites:
tiles.js: object class for tilescrops.js: object class for cropscrops.json: stores data about cropsalertIcon.js: object class for water warning etcnewToolbar.js: toolbar object
package.json: config fornpmwebpack.config.js: config for webpack