1000miles / spicey

ironhack Project 1: "Spicey" is an interactive game built with p5.js. The goal is to accumulate food and hide them from enemies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spicey - Fight for your life with chilli

Story

  1. We are in the year 2050. Due to greed of the powerfullest and climate change most cities and communities have been destroyed. Those who survived found refuge in the forest, rural areas and on islands. Food is very rare.
  2. This game is about searching, finding, exchanging, saving and sharing food.
  3. The goal is to accumulate as much and various food as possible and prevent enemies from taking away the food.
  4. Once food is found or won in a battle, the food inventory will increase and the player will be awarded with points.
  5. Chances:
    • Hiding food from enemies or eating them before enemies catch them increases the points.
    • Hungry wolves who eat humans can be killed by feeding with chilli or other spicy stuff.
  6. Risks:
    • Wolves appear randomly and attack players.
    • Food can get rotten easily.
    • Big sticks and stones prevent players from moving forward.
  7. Game over
    • tba

Breakdowns

Goal of Day 1

  1. Setup

    • boilerplate:
      • index.html
      • style.css
      • p5 libaries: p5 play, p5 dom
    • folders
      • assets/
      • css/
      • js/
    • files
      • constants.js
      • preload.js
      • obstacle.js
      • food.js
      • player.js
      • game.js
      • main.js
  2. Game concept

    • Create a background story
    • Define an environment
    • Define the characters
    • Define obstacles
    • Set conditions to win and lose

Goal of Day 2

  1. Background

    • Set image background
  2. Obstacles

    • Learn how to move obstacles in a loop
    • Learn how to drop obstacles
  3. Player

    • Make player1 visible

Goal of Day 3

Player

Movement

  • Logic
    • Create a function to move the player
      • Make player 1 move on keyPressed();
      • Set conditions for directions;
      • Ensure player does not move out of the screen
      • Set conditions for speed (extra)
      • Make player jump (extra)
  • Visualization
    • Use sprites with images that contain left, right, up, down images

Obstacles

  • Logic

    • Create plane 1 that moves from left to right in a loop
      • it should throw objects from the plane
      • it should define the frequency of throwing food
  • Visualization

    • Throw chilli (weapon) from the plane 1
    • Throw random food from plane 2 (extra)

Goal of Day 4

Obstacles

Plane

  • Logic
    • Create an array of food images and pull food from it randomly (extra)
    • Create a function for the player to catch the food from the plane
    • Use DOM manipulation to display scoring
      • Calculate points won when food has been caught

      • [x] Calculate points lost when food has been caught changed concept!

  • Visualization
    • Show different food types falling
    • Show player scoring

Collisions

  • Logic

    • Create a function to check collisions
    • Set conditions when and how often obstacle appears and when it disappears
    • Set the visual frame and frequency for obstacles
  • Visualization

    • Let obstacle (wolf) appear on the ground

About

ironhack Project 1: "Spicey" is an interactive game built with p5.js. The goal is to accumulate food and hide them from enemies.


Languages

Language:JavaScript 99.3%Language:HTML 0.7%