Skip to content

CaruntuRazvan/Matrix-Project-Bomberman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

Matrix-Project-Bomberman

This repository contains a reproduction of the bomberman game 💣, using Arduino as a project for the Introduction to Robotics Course.

Project description and details ℹ️

This project begins by displaying the message "Let the explosions begin" on the LCD and a bomb-shaped animation on the matrix for 4 seconds as an introduction to the actual game. After this message, the main menu is displayed. It contains five key elements: Start game, Settings, Highscore, About and How to play.

When the "Start Game" option is selected, the player can choose between two variants: "Easy," which involves generating a map with fewer walls, or "Hard," which involves generating a map with more walls, occupying almost the entire surface of the map. After the player chooses the desired variant, the message "Loading..." will be displayed along with a bomb-shaped animation on the matrix for 3 seconds. After this period, the actual game will begin.

In the "Settings" category, there are various settings to control the contrast and brightness of the LCD and matrix, the sound generated by the buzzer during the game, and the ability to reset the high scores to zero. In the "Highscore" category, a kind of podium is displayed showcasing the top 3 scores recorded by the player, regardless of whether the player wins or loses. The score in this game is determined by the number of walls the player manages to destroy throughout a game.

In the "About" category, is displayed information about the game title, the game creator, and the creator's GitHub. The "How to play" category provides a concise description to help the player understand how the game works.

Known Bugs:

In the situation where the player wins and the LCD displays the message "Congratulations," if I click on the joystick to return to the main menu, the sound specific to placing a bomb is heard, but it does not adversely affect the game in any way.

Game instructions 🎮

When the actual game begins, a static map is generated with a certain number of walls based on the chosen difficulty category. The goal of this game is for the player to destroy as many walls as possible, considering that the side walls cannot be destroyed. The player is represented on the map by a blinking point. The player can deploy a bomb by pressing the joystick, causing the bomb to detonate in one of the cardinal directions (up, down, left, or right). The range of the bomb is one unit. The time between placing the bomb and the moment of the explosion is 3 seconds. Subsequent bomb placement is allowed only after the previously deployed bomb has exploded. Throughout this process, an LED continuously blinks from the moment a bomb is placed until it explodes.If the game sound is turned on, a specific sound will be heard at the moment of bomb placement, and a different sound with a higher frequency will be played at the moment of the explosion.Throughout the game, the LCD will display the number of walls destroyed by the player, the player's remaining lives (starting with 2 lives), and also the game level.

If the player exhausts the 2 lives, they lose the game, and the LCD will display the message 'You died.' On the matrix, an animation with the letter X appearing and disappearing three times will be shown. On the other hand, if the player manages to destroy all the walls generated on the map, the LCD will display the message 'Congratulations,' and a specific animation will appear and disappear three times on the matrix. After displaying that message, in both cases, pressing the joystick will return to the main menu.In the event that the player's score falls within the top 3 scores found in the Highscore category, this category will be updated with the new score.

Matrix animations and images 💡

  • Intro message and loading game matrix image
  • Text alternativ al imaginii

  • Main menu matrix image
  • Text alternativ al imaginii

  • Choose easy map matrix image
  • Text alternativ al imaginii

  • Choose hard map matrix image
  • Text alternativ al imaginii

  • Player loses matrix animation
  • Text alternativ al imaginii

  • Player wins matrix animation
  • Text alternativ al imaginii

  • Settings menu matrix image
  • Text alternativ al imaginii

  • Highscore content matrix image
  • Text alternativ al imaginii

  • About content matrix image
  • Text alternativ al imaginii

  • How to play content matrix image
  • Text alternativ al imaginii

The menu 🔗

You can move through the menu using the joystick up and down. To enter an option press the joystick. If the game sound is enabled, a specific short sound will be heard when scrolling through the menu.

The options in the settings submenu that control the LCD contrast, brightness, and matrix brightness work as follows: when you select one of these three options, by moving the joystick up or down, you will increase or decrease the specific value of that setting. When you have reached the desired point, clicking the joystick will save this value, and you will exit that submenu.

Menu structure:

  • Start game
    • Easy
    • Hard
  • Settings 🔧
    • Back (will exit to main menu)
    • LCD contrast
    • Matrix brightness
    • LCD brightness
    • Sound ON/OFF
      • On 🔉
      • Off 🔇
    • Reset scores
      • Yes
      • No
  • Highscore 🏆 (top 3 scores)
  • About (details about creator)
  • How to play (short description)

Electronic setup🔌

Setup photo 📷

Text alternativ al imaginii

Hardware components

  • Arduino Uno
  • one joystick
  • one LCD 2x16
  • 8x8 LED Matrix
  • a MAX7219 driver
  • one ceramic capacitor and one electrolytic capacitor
  • one LED
  • one potentiometer (is not used)
  • one buzzer
  • wires and 4 resistors (1 with a resistance of 100 kΩ, 1 with a resistance of 330Ω for the red LED, 1 with a resistance of 220Ω for LCD and 1 with a resistance of 100Ω for buzzer)

Used pins

I tried to avoid using pins 3 and 11 at the same time because I encountered interference while attempting to solve the project.

Matrix pins:

  • din pin -> 12
  • clock pin -> 13
  • load pin ->2

LCD pins:

  • rs -> 11
  • en -> 8
  • d4 -> 7
  • d5 -> 6
  • d6 -> 5
  • d7 -> 4

Joystick pins:

  • VRX pin -> A0
  • VRY pin -> A1
  • Sw pin -> A4

Other pins:

  • pin for controlling LCD brightness -> 10
  • pin for controlling LCD contrast -> 9
  • pin for controlling the buzzer -> A5
  • pin for controlling the red led -> 3

Demo Video 📹

Watch the demo video of the game:Click here

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages