A fast-paced, 2-player arcade shooter developed as a technical challenge to implement a complete game engine within a single C# class. Built using the Windows Forms (WinForms) framework, this project demonstrates high-level state management and event-driven programming.
The goal was to build a fully functional game—including physics, UI, and level progression—without using external libraries or multiple files. This required deep control over the WinForms Lifecycle and manual synchronization of multiple asynchronous timers.
- Dual-Player Combat: Local multiplayer with independent controls (WASD vs. Arrow Keys).
- Real-Time Physics: Custom collision detection using the
.Bounds.IntersectsWith()logic. - Level Progression: 3-stage difficulty system that scales speed and introduces environmental hazards (Snail/Wind).
- Profile Management: Dynamic player profiles with customizable colors and gender-based UI themes.
- State Persistence: In-memory tracking of scores, health (Progress Bars), and game history.
- The Heartbeat: Managed via 6 parallel
System.Windows.Forms.Timerobjects, each handling specific tasks like bullet velocity, movement polling, and the level clock. - Input Polling: Uses
KeyDownandKeyUpevents with boolean flags to prevent the "stuttering" effect common in basic WinForms movement. - Collision Engine: Manual logic to detect intersections between bullets and player hitboxes, triggering health depletion and level transitions.
Even in a single-file project, this code demonstrates professional concepts:
- State Machines: Using
Lcounterandstartflags to control the "Flow" of the application (Menu -> Play -> Pause). - UI/UX Feedback: Dynamic color changes based