Skip to content

Online Game - Collecting all the πŸ’© created by the animals

Notifications You must be signed in to change notification settings

tinspham209/poop-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mini Project: πŸ’© Poop Collection πŸ’©

Date: 27 - Aug - 2020

Description

A collaborative multiple player online game where YOU can be a πŸ’© hero by collecting all the dung created by the animals

Deploy

Screenshot

Tech-Stack

Server:

  • Dependencies

    • ExpressJS
    • Socket.io
    • morgan
  • DevDependencies

    • nodemon

Client:

  • HTML/CSS
  • Javascript

Plan Of Action

  • Set up project with express
  • First layout
  • Connect Socket to server
  • Connect Socket to client
  • Create array of emoji
  • Update location of Emoji with random function
  • update logic of poop location
  • remove poop onClick function
  • update score function
  • Send ID to server by socket when onClick poop
  • Logger connected clients
  • Render score when poop Click
  • Update Logic for Poop is not re-render many times when users click many times
  • Rate Limiting for onClick - 1 second
  • Refactor:
    • createAnimal function
    • createPoop function
  • Move Animals function in server
  • Refactor:
    • collectPoop function
    • removePoop function
  • Styling for animal move
  • Move Animals function in client
  • Style grow & shrink animation poops

After this project

I have improve my knowledge about

  • Socket.IO
  • animation styles with css

I have understand about

  • Javascript ES6
  • VanillaJS
  • OOP with JS

Next Steps:

  • Deploy to GCloud App Engine

Directory Structure

.
β”œβ”€β”€ .gitignore
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ README.md
β”œβ”€β”€ public
    β”œβ”€β”€ fonts
        └── fonts.css
    β”œβ”€β”€ images
        └── fence.png
    β”œβ”€β”€ app.js
    β”œβ”€β”€ index.html
    └── styles.css
└── src
    β”œβ”€β”€ index.js
    └── socket.js

Set up

  • git clone
  • npm install
  • npm start

Releases

No releases published

Packages

No packages published