C++Win32libsndfileOpenAL (openal-soft)

Classic Pong built entirely from scratch in raw C++ — no game engine, no graphics API, just direct pixel manipulation via Win32 GDI. Supports single-player against an AI opponent and local two-player multiplayer, with 3D positional audio for spatialized sound effects. Every system (renderer, game loop, collision detection, entity architecture, menu state machine) is hand-rolled, organized into distinct platform, framework, and game logic layers.

[key features]

  • Pure software rendering: direct pixel buffer writes, no OpenGL/DirectX/Vulkan
  • 3D positional audio via OpenAL for spatialized gameplay sound effects
  • Custom bitmap text rendering without font libraries
  • Delta-timed game loop with AABB collision, paddle-velocity transfer, and state-driven pause
  • Adaptive AI opponent with anti-stalemate logic and local two-player multiplayer

[implementation details]

Rendering & Platform

  • Win32 platform layer handling window creation, input, and frame timing with delta-time accumulation
  • Software rasterizer: VirtualAlloc framebuffer blitted to screen via GDI StretchDIBits each frame

Game Architecture

  • Entity system with base class and Ball/Paddle specializations; state machine managing menu and gameplay transitions
  • Audio subsystem wrapping OpenAL with layered abstractions (device, library, player) for source positioning
  • Adaptive AI with speed modulation based on ball direction and deliberate pattern-breaking to prevent stalemates