First project of my Full-Stack Web Development bootcamp at Ironhack. We needed to develop a game, any game, in a week's time. Dystopia was built in 5 days.
I really enjoyed playing video games when I was a child. Mostly side-scrolling beat 'em up or platform games. Dystopia was made so that I would have fun while programming and playing it. It's a nostalgic, quick and fun game, designed to last less than 3 minutes to complete.
The game is set in a dystopian, post-apocalypse society. The main character, Jack, needs to survive 4 levels of the game to reach the final boss - his enemy Lucy.
The code reflects my level of knowledge by the time it was built (during the third week of the 9-week bootcamp) and hasn't been updated since.
- Clone the repo
git clone https://github.com/alexandreoliv/dystopia.git
- Make any changes if necessary and host the website in a local web server or somewhere on the internet (for instance 000webhost.com) because it won't load the assets locally in the browser (CORS policy)
- There are four initial levels, each lasting 30 seconds. The goal on each level is to survive until the time is over.
- Controls:
jump: space bar | move: ⬅/➡ music on/off: s | reset: r | pause: p
- On top of the screen the most important information is displayed: level | lives | health | score | time
- Level: Goes from LEVEL 1 to LEVEL 4.
- Lives: Starts with 3. Increases by 1 when Jack finds hearts ❤️ during the game. Decreases by 1 when Jack health decreases to 0 or when he gets smashed by a barrel 🛢️ in the left corner. If Jack loses his last life, the game is over.
- Health: Starts with 100. Decreases by 50 when Jack is hit by the falling saws 🪚. The falling saws appear in random positions and the amount of saws increases at each new level. Health level increases when Jack gets pizzas 🍕 (+15), chicken legs 🍗 (+10) or coffees ☕ (+5), but never exceeding 100. These food items appear in random positions and the most valuable ones are also rarer.
- Score: Starts with 0. Increases when Jack finds AK-47s 🔫 (+30), pistols 🔫 (+15) or knives 🔪 (+5). These items appear in random positions and the most valuable items are also rarer. It's important to collect as many weapons as possible to get better scores.
- Time: Starts with 30 (seconds) and decreases until 0. By then, a level-up sound indicates that Jack has reached a new level, and time starts again with 30.
- If Jack survives all four levels, he reaches the Final Stage. No more falling saws, no more food items or weapons. No more time counting. It becomes a shooting game and only one person will survive.
- Controls: The only difference is that Jack can shoot now.
shoot: ctrl | jump: space bar | move: ⬅/➡ music on/off: s | reset: r | pause: p
- On top of the screen the most important information is displayed: level | lives | health | score | boss
- Level: Shows FINAL STAGE.
- Lives: Decreases by 1 when Jack health decreases to 0. If Jack loses his last life, the game is over.
- Health: Decreases by 50 when Jack is hit by Lucy. Lucy shoots at random times.
- Score: Increases by 5 every time Jack hits Lucy.
- Boss: Decreases by 1 every time Lucy gets hit. She's quite strong and Jack needs to successfully hit her 100 times to kill her. Jack can shoot faster, though.
- Either shows GAME OVER or YOU WIN.
- In case of losing, the final score is (points x levels), for instance 100 x 3 = 300 if the game was lost in the third level.
- In case of winning, the final score is (points x levels) + health + (lives x 100), "health" and "lives" meaning the remaining value of both by the end of the game. For instance, (100 x 5) + 50 + (3 x 100) = 500 + 50 + 300 = 850.
- Press f at any time to reach the Final Stage
- Press d at any time to... die! 💀