GithubHelp home page GithubHelp logo

sevdas / fox-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.94 MB

This is a digital pet game originally named as Tamagotchi using JS, HTML, and CSS as a tech-stack.

CSS 77.82% HTML 6.33% JavaScript 15.85%

fox-game's Introduction

The Project

Do you remember those virtual pet toys from the 90s? They're essentially needy little virutal pets that need you to feed and clean up their poops every few hours. This is what this project builds!

Assets used for this game were created by talented artist Ms Alice Brereton.

[](Here is my version of the game.)


User Story

  • The game starts in an initialized state. The user must press the center game to get started.
  • Users can switch between the three icons on the bottom using the left and right button. To press one of the icons, they will click the middle button. Users cannot directly click the icons.
  • If they reach the end of the icons and try to go further (click the right button when the right-most icon is selected) it should loop around.
  • When the user starts, the fox will hatch after showing the hatch animation.
  • Once the fox is hatched, show the fox in an idle animation in the day time.
  • The user can switch the weather from day to rain using the weather icon.
  • After some amount of time the fox will become hungry. This should be on some sort of variable schedule to add some unpredictability to the game.
  • The fox can only be fed when hungry.
  • After a fox is a fed, after another random interval, the fox will poop.
  • The fox cannot have the poop cleaned up unless there is poop to be cleaned up
  • When a user cleans up poop, it should add another random interval until the fox is hungry again.
  • The fox cannot be hungry and have pooped at the same time.
  • If the user hasn't fed a hungry fox or clean up a fox's poop after a random interval, it should cause the fox to die and go to the game over screen.
  • After a longer random interval of day/rain, it should become night. It stays night for a fixed interval. The fox does not get hungry, poop, or die in its sleep. Once it wakes up, it starts with a new random interval of hunger and poop. You cannot change the weather, clean up poop or feed a sleeping fox.
  • Once the game hits nighttime, reset the timers. The fox will wake up and the first thing that will happen is it will become hungry.
  • Once a fox dies, the landscape goes into the death scene, the fox becomes the tombstone, and the game is over. If the user presses the middle button again, it restarts the game with a new hatch.
  • Using a modal, you should tell the user to restart the game by pressing the middle button.
  • The fox should not be able to die, get hungry, poop, be fed, have the poop cleaned up, or fall asleep when it is being fed, sleeping, hatching, or dead.
  • While in general I'm a huge advocate for responsive designs and making things work on any viewport size, this one time I'm absolving you of that responsibility and you can just assume a fixed desktop browser size.

Phew. That's a lot of requirements!

fox-game's People

Contributors

sevdas avatar

Watchers

 avatar

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.