Skip to content

A lightweight, authentic 8-bit and 16-bit style game development framework

License

Notifications You must be signed in to change notification settings

ahmed5145/retro_game_engine

Repository files navigation

Retro Game Engine 🎮

CI PyPI version License: MIT Python 3.11+ Code style: black

A modern Python game development framework for creating authentic 8-bit and 16-bit style games. Built with performance and developer experience in mind, it provides a robust set of tools while maintaining the aesthetic and technical constraints that defined the retro gaming era.

Retro Game Engine Logo

✨ Features

🎨 Core Engine

  • High-Performance Rendering: Pixel-perfect 2D graphics with hardware acceleration
  • Flexible Sprite System: Animation, batching, and effects
  • Tile-Based Maps: Scrolling, auto-tiling, and efficient culling
  • Robust Physics: Collision detection and resolution
  • Audio Management: Sound effects and music with priority system
  • Input Handling: Keyboard, mouse, and gamepad support

🏗️ Architecture

  • Entity Component System: Modular and efficient game object management
  • Scene Management: Easy state transitions and persistence
  • Event System: Flexible communication between components
  • UI Framework: Text, menus, and HUD elements

View all features →

🚀 Quick Start

Installation

pip install retro-game-engine

Create Your First Game

from retro_game_engine import Game, Scene, Entity
from retro_game_engine.components import Transform, SpriteRenderer

class MyGame(Game):
    def __init__(self):
        super().__init__(width=320, height=240, title="My Retro Game")

        # Create and setup your game scene
        scene = Scene("main")
        player = Entity("player")
        player.add_component(Transform(x=160, y=120))
        player.add_component(SpriteRenderer("player.png"))
        scene.add_entity(player)

        # Start the game
        self.scene_manager.push_scene(scene)

if __name__ == "__main__":
    MyGame().run()

Get Started Guide →

📚 Documentation

🎮 Examples

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Clone the repository:
git clone https://github.com/ahmed5145/retro_game_engine.git
cd retro_game_engine
  1. Install Poetry (dependency management):
curl -sSL https://install.python-poetry.org | python3 -
  1. Install dependencies:
poetry install
  1. Run tests:
poetry run pytest

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with Pygame
  • Inspired by classic game engines and retro gaming systems
  • Thanks to all contributors

📫 Contact & Support

About

A lightweight, authentic 8-bit and 16-bit style game development framework

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages