Our project is a clone of the classic arcade game, Space Invaders, but with some additional features over other mbed clones.

Dependencies:   mbed mbed-rtos 4DGL-uLCD-SE

  1. Authors Jonathan Quang and Daniel Martin
  1. Overview Our project is a clone of the classic arcade game (based on Devon Cooper's and Sidak Dhillon's clone), Space Invaders, but with some additional features over other mbed clones. The basic features we have are a joystick that moves the player's ship, a button to fire bullets from the ship, and a LCD screen to display the game. However, our clone boasts some additional feature over other mbed clones. We have added functionality for second player that can connect to the game over a bluetooth module using the Bluefruit Connect app on a Bluetooth enabled phone. Additionally, we added sound effects (with adjustable volume) and LED effects to improve immersion into the game. We have also added a player vs player gamemode, a way to track score and lives, a game over menu with some music, and a starting menu to select gamemodes and to manage the connection of both players.
  1. Hardware - [mbed LPC1768](https://os.mbed.com/platforms/mbed-LPC1768/) - [Sparkfun PCB speaker 8ohm .1W](https://os.mbed.com/users/4180_1/notebook/tpa2005d1-class-d-audio-amp/) - [TI TPA2005D1 class D audio amp chip (250Khz PWM)](https://os.mbed.com/users/4180_1/notebook/tpa2005d1-class-d-audio-amp/) - [uLCD-144-G2](https://os.mbed.com/users/4180_1/notebook/ulcd-144-g2-128-by-128-color-lcd/) - [KY-023 PS2 joystick axis sensor](https://arduinomodules.info/ky-023-joystick-dual-axis-module/) - [Adafruit Bluefruit BLE board](https://os.mbed.com/users/4180_1/notebook/adafruit-bluefruit-le-uart-friend---bluetooth-low-/) - [5v 2AC adapter](https://www.digikey.com/en/products/detail/wurth-electronics-inc/694106301002/5047522?utm_adgroup=Barrel%20-%20Power%20Connectors&utm_source=google&utm_medium=cpc&utm_campaign=Shopping_Product_Connectors%2C%20Interconnects_NEW&utm_term=&utm_content=Barrel%20-%20Power%20Connectors&gclid=Cj0KCQjw-LOEBhDCARIsABrC0TlTFUNaJdsN-9aJB1ibh7JMV1RMs3MJ0_6Dr17MpBX6kMGLQGHtjRsaAuz2EALw_wcB) - [10K ohm breadboard trim potentiometer](https://www.sparkfun.com/products/9806) - Red and Blue LEDs with two 330 Ohm Resistors
  1. Circuit Connections
Mbed PinTPA2005D15V 2A AC adapterSpeakerPotentiometer
----------------
GNDpwr-, in-GND
pwr+Positive
p21 (PWM)in+
out++
out--
vol+fixed end 1
vol gainvariable end
vol-fixed end 2
Mbed PinLCD Pin
-----
p27RX
p28TX
p30RES
GNDGND
VU+5V
Mbed PinKY-023
----
GNDGND
VU (5v)+5v
p15VRx
p16VRy
p22SW
Mbed PinBluetooth BLE Board
--------
GNDGND
VU (5v)Vin (3.3-16v)
No connectionRTS
GNDCTS
p14TXO
p13RXI
Mbed PinRed LED with Resistor in SeriesBlue LED with Resistor in Series
-----------------
GNDnegative endnegative end
p20positive end
p24positive end

![Circuit](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/circuit_diagram.png)

  1. Images of Project

![Collage](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/menu_collage.png) ![Menu](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_menu.jpg) ![Blue](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_blue.jpg) ![Shoot](https://jonathanquang.github.io/ECE4180-Space-Invaders-Clone-Expanded-with-Multiplayer/space_shoot.jpg)

  1. Code Repositories Used

[Devon Cooper's and Sidak Dhillon's Space Invaders Clone](https://os.mbed.com/users/DNoved1/code/Space_Invaders_Clone/)

[Playing Songs via PWM](https://os.mbed.com/users/4180_1/code/song_demo_PWM/)

  1. Future Work

- Include more gamemodes - Improve audio system to support .wav files loaded from an SD card. - Include other methods of user input, such as a gyroscope - Add ways to play over the internet with the Ethernet module

History

Working Code of PvP Space Invaders default tip

2021-05-02, by dmartin99 [Sun, 02 May 2021 19:01:00 +0000] rev 12

Working Code of PvP Space Invaders


Revert update to mbed-os.

2017-02-15, by mbed_official [Wed, 15 Feb 2017 14:04:02 -0600] rev 11

Revert update to mbed-os.


Wait times updated;

2017-01-12, by mab5449 [Thu, 12 Jan 2017 23:35:40 +0000] rev 10

Wait times updated;


Thread::wait is deprecated

2017-01-12, by mab5449 [Thu, 12 Jan 2017 23:21:50 +0000] rev 9

Thread::wait is deprecated


Updating to mbed OS

2017-01-12, by mab5449 [Thu, 12 Jan 2017 22:58:45 +0000] rev 8

Updating to mbed OS


Update to use start function

2016-11-22, by geky [Tue, 22 Nov 2016 18:04:36 +0000] rev 7

Update to use start function


Point to the latest libraries

2013-06-04, by emilmont [Tue, 04 Jun 2013 16:01:32 +0100] rev 6

Point to the latest libraries


Update libraries

2013-04-30, by emilmont [Tue, 30 Apr 2013 10:51:40 +0000] rev 5

Update libraries


rtos library update

2012-11-23, by emilmont [Fri, 23 Nov 2012 10:17:39 +0000] rev 4

rtos library update


Update to latest mbed and rtos libraries

2012-11-23, by emilmont [Fri, 23 Nov 2012 09:58:48 +0000] rev 3

Update to latest mbed and rtos libraries