https://github.com/iamstrix/winforms-2d-shooter-sandbox
A 2D shooter made in WinForms with self-programmed bullet trajectory calculation. Features sandbox tools and live statistics. Discontinued due to discovery of WinForms' strict integer-based component coordinate system.
https://github.com/iamstrix/winforms-2d-shooter-sandbox
csharp visual-studio winforms
Last synced: 2 months ago
JSON representation
A 2D shooter made in WinForms with self-programmed bullet trajectory calculation. Features sandbox tools and live statistics. Discontinued due to discovery of WinForms' strict integer-based component coordinate system.
- Host: GitHub
- URL: https://github.com/iamstrix/winforms-2d-shooter-sandbox
- Owner: iamstrix
- Created: 2025-11-24T12:11:34.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-12-17T20:11:22.000Z (6 months ago)
- Last Synced: 2025-12-21T07:46:53.119Z (6 months ago)
- Topics: csharp, visual-studio, winforms
- Language: C#
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discontinued 2D shooter with sandbox tools to apply OOP concepts.
C#, .NET, WinForms, Visual Studio
Throughout development, I realized that WinForms only uses integers for component coordinates, leading to floor division when calculating bullet trajectory, which ultimately ruined the whole thing. Programming the bullet trajectory calculation by myself was the aspect I had the most fun with during this project. The caveat for the trajectory calculation, though is that bullet velocity scales depending on how far the target is from the player, as I could not perform vector normalization given the limitation of WinForms' strict integer data type usage.

*player shooting bullets, with enemies on screen*

*player alongside all enemies displayed*
Player features:
- Shoot bullets, click anywhere
Enemy features:
- Three enemy types
- Normal
- Boss
- Superboss
Sandbox tools:
- Player x, y relocation
- Adjust bullet speed - random x, y changes to initial velocity
- Adjust bullet spread variance - scale of x, y variance for each builet
- Adjust bullet shoot count - how many bullets are shot per click
- Spawn enemy button
- Remove all bullets on screen
- Remove all enemies on screen
Statistics display (upper left and right-most side):
- Mouse coordinates
- Player coordinates
- Last-clicked coordinates
- Object count
- Velocity (old testing statistic, can't bother to fix/remove)
- Bullet bounce limit
- Enemy count
- Bullet count
- Player to current mouse distance for trajectory calculation
- Calculated trajectory (displays different x, y quotients as the formula for this label uses a different divisor value than the actual bullet trajectories displayed at the right-most portion of the program
- Bullet trajectory history at the right-most side - shows actual bullet trajectory values
Feature I did not bother fixing:

- Old manual bullet trajectory adjuster, before I programmed my own click-to-shoot trajectory calculation
# Run Without Visual Studio
1. Open Terminal
2. Clone repository to a specified file path
3. cd into file path with the solution file *.\shooter\winforms-2d-shooter\RogueLike1*
4. run dotnet restore
5. run dotnet run