Our project implements a 2D computer game "Destroyer-2016". A player, who controls the destroyer by STM32F407 Discovery board, must destroy all enemy submarines.
This respository consists of two main parts: STM32F4 and Unity Project.
STM32F4 is used as controller. The STM32 accelerometer detects movement and it can be interpreted by the computer.
Programming language: C
The game was created in Unity. Games are programmed using scripts there.
The destroyer of player can move along the width of the screen. This ship drops bombs to annihilate of submarines. Underwater crafts product torpedos and send them up. The player initially has 100% life but one hit reduces the "health points" of ship by 20%. Bonuses sometimes fall from the sky. Player may get more "health" or lose control of the ship by swapping sites.
The current number of levels: 3.
• Unity 5.3.4f1 Personal
• CoIDE-1.7.8 (CooCox)
• MS Visual Studio
• GIMP
Game path: *.exe file in "STMDestroyer2016\Destroyer 2016\Release" directory Click on execute file, eventually change resolution or control settings and click on "Play!" button.
Control:
UP Horizontal position of board/microUSB from leftside/miniUSB from rightside/user sees back of board
DOWN Horizontal position of board/microUSB from leftside/miniUSB from rightside/user sees front of board
LEFT Vertical position of board/miniUSB higher than microUSB
RIGHT Vertical position of board/microUSB and minijack higher than miniUSB port
Depending on the inclination of the device, the destroyer will move to the left or right. Blue button will cause the drop of depth charges.
Connect your device to your computer with 2 wires (mini USB-USB A to power and microUSB-USB A to gamepad mode)
STM as controller:
- Download "STM32 ST-Link Utility" (link)
- Click on file and install programm
- Run the programm after installation
- Go to "Target" section and choose "Program"
- You see new window. Look on "File path" and click "Browse" button to find "stm32f429_project.hex" (path: "STMDestroyer2016\Destroyer 2016\Release\STM Controller")
- Press "Start" button
- Now STM32 is ready for use as gamepad
The explosion of the torpedo is under the water instead of on the ship. We are going to change it. Adding leadeboard.
STM as HID USB device: Author: Tilen Majerle
Destroyer image: link
Submarine image: link
Bomb Exploding Sound: link
(license: https://creativecommons.org/licenses/by/3.0/pl/)
License: MIT Audio: Bomb Exploding Sound: http://soundbible.com/1986-Bomb-Exploding.html license: https://creativecommons.org/licenses/by/3.0/pl/deed.en
• Jan Augustyniak
• Dominik Garczyk
The project was conducted during the Microprocessor Lab course held by the Institute of Control and Information Engineering, Poznan University of Technology.
Supervisor: Michal Fularz