Skip to main content

A retro-style game engine built with Pygame

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

retro_game_engine-0.2.1.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retro_game_engine-0.2.1-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file retro_game_engine-0.2.1.tar.gz.

File metadata

  • Download URL: retro_game_engine-0.2.1.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for retro_game_engine-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d05f05fcc46b382d29ba0deadacc81a6d246b91669133b8b351c8dea8bdc9d17
MD5 894f46a81cbf7a9dd12b3df4d01053b7
BLAKE2b-256 1a5f18e0712b5c1cd178b6e2fc841f2cd334fa7089726f321120d9c98f763cc0

See more details on using hashes here.

File details

Details for the file retro_game_engine-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: retro_game_engine-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 37.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.9 Linux/6.8.0-1021-azure

File hashes

Hashes for retro_game_engine-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 967afde7e67a70611d66153f6074b2101b9e9fe51fac0005c714ace3bd6d6283
MD5 d8661316287c64cbb6e0fc66687a02df
BLAKE2b-256 d3c06c5853b95ecb2debae97d49c0d7e44ef70af91f0f5adfbcae31399e41b9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page