Classic 2D space shooter game developed using WPF. This project demonstrates the implementation of a simple game loop, player and enemy mechanics, and handling of user input from both a keyboard and a custom ESP32-based joystick controller via a TCP connection.

The game can be played using either a keyboard or an ESP32 joystick connected via TCP.
Keyboard:
- Arrow Keys: Move the player's spaceship.
- Spacebar: Shoot bullets.
ESP32 Joystick (via TCP):
- Joystick Movement: Controls the spaceship's movement.
- Switch/Button: Fire bullets.
The application listens on port 13000 for a TCP connection from the ESP32 controller. The status of the ESP32 connection is displayed on the screen.
- Framework: The project is built using WPF (Windows Presentation Foundation) and .NET 8.
- Language: The entire application is written in C#.
- ESP32 Firmware: The source code for the joystick controller is contained in the
esp32-joystick.ino
file. - Networking: A TCP listener is implemented to receive input from the ESP32 controller over Wi-Fi. The application uses asynchronous network programming to handle the connection without freezing the game.
- Game Logic: The game loop is managed by a
DispatcherTimer
. All game elements, including the player, enemies, and bullets, are represented asRectangle
objects on aCanvas
.
Contributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.