Skip to content

tetrotibo/WPR.COLLISIONDETECTOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

COLLISION DETECTOR | Retro 2D Game Prototype

Collision Detector is a Python-based utility designed to test and visualize a pixel-perfect collision detection system in a retro-style debug environment.

Originally built as a learning tool for comprehensive gamepad input management, this prototype lets users interact with dynamic tetromino-shaped objects in a minimalist 2D sandbox to fine-tune collision accuracy and control logic.

Built with Python and Pygame, the tool combines shape rendering, joystick input, delta time smoothing and real-time overlays. It operates across five distinct speed modes—normal, slow, fast, pixel-per-pixel and block-per-block. Each mode introduces its own quirks and behavior, requiring specific logic adjustments and careful implementation to ensure accurate collisions and stable motion.

Collision Detector Screenshot

VIDEO DEMO

Collision & Debug Mechanics

The user controls falling or moving tetrominoes using a game controller. These geometric shapes collide with a static obstacle in a pixel-perfect environment, allowing users to inspect collision boundaries visually (the obstacle turns orange when collision occurs) or to monitor player and obstacle x and y coordinates.

The system also handles:

  • 5 different speeds: normal, slow, fast, pixel-per-pixel, block-per-block
  • rotation and movement logic
  • consistent physics via delta time smoothing

Designed as a visual debugging tool, the prototype isolates edge cases and micro-collisions in fast-paced environments like arcade gameplay, platformers or puzzles.

Built With

  • Python – core logic and control flow
  • Pygame – video game library for Python
  • VS Code – development environment

Features

  • Pixel-perfect collision detection system with live visual feedback
  • Tetromino shapes with dynamic movement and rotation
  • Comprehensive gamepad input management with single-frame detection
  • Handles five speed modes: normal, slow, fast, pixel-per-pixel, block-per-block
  • Real-time overlays: hitboxes, outlines and collisions
  • Delta time smoothing for stable and precise motion
  • Modular codebase ready for extension and experimentation

Licensing

Application, screenshots and demo video are all original works and protected.
See LICENSE for details regarding code and media usage rights.

About

Retro 2D Game Prototype

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages