GithubHelp home page GithubHelp logo

uzair-ashraf / farming-sim-no-mouse-hackathon Goto Github PK

View Code? Open in Web Editor NEW
35.0 4.0 2.0 3.68 MB

Winner of the Mintbean No Mouse Hackathon

Home Page: https://farming-sim.uzairashraf.dev/

JavaScript 100.00%

farming-sim-no-mouse-hackathon's Introduction

Farming Sim

A vanilla JS web application to simulate farming, built in 48 hours for the Mintbean No Mouse Hackathon.

Technologies Used

  • Vanilla JavaScript
  • Webpack
  • Babel

Live Link

Play the live demo here.

How to Play

The Farming Sim application does not use the mouse. Only uses the keyboard.

Basics

  • WASD - Move your character around
  • M - Unmute/Mute sound effects
  • I - Inventory
  • ESC - Exit modals
  • SPACE - Use your tools or interact with the shop

Basics

Farming

With the correct tool selected you can farm on the brown pieces of land.

  • Space - Use tool
  • Left Arrow/Right Arrow - Navigate through your tool system

Farming

Farming - Planting

With the seed bag selected you can select a seed to plant.

  • SPACE - Attempt to plant a seed
  • A/D - Navigate between which seeds to plant in your inventory

Farming

Farming - Watering

Your plants can only grow if they are watered, to water a plant use the watering can. Some plants take longer to grow than others. Every time your plant grows you need to water it again.

Farming

Farming - Harvesting

Once you can't water the plant anymore, use the shovel to harvest the crop.

Farming

Farming - Hoeing

To remove a seed/crop use the hoe. Be careful because this will destroy it.

Farming

Shopping

Once you have crops you can sell them. You can use the money to purchase different types of seeds.

  • Tab - Switch between selling and buying
  • A/D - Move through items
  • Esc - Close shop screen
  • Space - Purchase/Sell Item

Farming

Development

  1. Clone the repository
  git clone https://github.com/uzair-ashraf/farming-sim-no-mouse-hackathon.git
  1. Change directories
  cd farming-sim-no-mouse-hackathon
  1. Install Dependencies
  npm install
  1. Run Development Server
  npm run dev

Final Thoughts

Its currently 2AM on a Thursday night. I haven't left my chair in a long time and all I have thought about for the past couple days was this game. The logic is simple and yet so complex. There is a single game loop that ages all the crops every second. Each crop has a set growth cycle, which decides at what point in time will it age. I was inspired by Stardew Valley and this hackathon seemed to fit the perfect need for a clone. Special thanks to Mintbean for hosting, Tim D and Cody for getting my slack messages late at night, and Kevin (Bep) Lenell for cheering me on.

Many of the assets in the game were taken from sites like OpenGameArt and SpritesResource. I will add the credentials to the creators of the assets.

Thanks for reading and playing!

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.