Skip to content

alexanderroidl/wheat-farmer

Repository files navigation

Wheat Farmer

Farming/Tower Defense web-based game. Live demo (desktop-only)

  • 🌾 Entirely made from scratch (Exceptions)
  • 🌾 Written in TypeScript
  • 🌾 Linted with ESLint
  • 🌾 Built using Node/Gulp (Browserify + TSify + Babelify)
  • 🌾 Deployed with Docker multi-stage build
  • 🌾 Rendering on HTMLCanvas
  • 🌾 Soundtrack by collaborator @julianarnold96

Table of contents

  1. The Game
  2. Dependencies
  3. Without Docker
    1. Installation
    2. Usage
  4. With Docker
    1. Installation
    2. Usage
  5. Third-party contents
  6. Collaborators

1. The Game

The game is currently at early alpha developing stage, meaning it is neither complete, nor bug-free.

Implemented mechanics:

  • Gather wheat by planting seeds and waiting for your crops to grow, harvesting them upon completion ✅
  • Avoid hostile robot attacks while farming ✅
  • Purchase and build up walls for defense ✅
  • Manage your inventory ✅
  • Purchase items in the shop ✅

Road map:

  • Automate farming by upgrading technology ❌

2. Dependencies

3. Without Docker

Please execute all commands directly inside the project sub-directory.

3.1. Installation

Install Yarn globally:

$ npm install --global yarn # Install Yarn globally

Install project dependencies:

$ cd project

$ yarn

3.2. Usage

  • When the web server is running, it will become accessible on http://localhost:3000.
  • When in development mode, BrowserSync + webserver will become available on http://localhost:3000.
$ cd project

$ yarn build # Build once
$ yarn develop # Build once and watch/serve afterwards - (Re-)starts webserver and BrowserSync
$ yarn production # Build in production mode (Compress everything, strip debug)

$ yarn serve # Start Express webserver to serve files
$ yarn test # Run unit tests
$ yarn lint # Lint source TS/JS + unit tests

4. With Docker

4.1. Installation

Install Yarn globally:

$ npm install --global yarn # Install Yarn globally

Install project dependencies:

$ yarn # Install project dependencies

4.2. Usage

Run yarn docker:development or yarn docker:production to build/start based on your environment.

$ yarn docker:development # Build/start development environment
$ yarn docker:production # Build/start production environment

$ yarn test # Run tests in /scripts
$ yarn lint # Lint /scripts and unit tests

4.3. Development

  • When in the development environment, ./project will be synced with your running Docker container.
  • BrowserSync will deploy itself on http://localhost:3000.
  • yarn develop* will execute upon startup ➡ all changes inside ./project will lead to an immediate re-build and browser refresh.

5. Third-party contents

6. Collaborators