Skip to content

Jean1000levrai/EasyPyEngine

Repository files navigation

EasyPyEngine

Licence

EasyPyEngine is a beginner-friendly 2D game engine for Python, written in C using SDL2.
It provides a built-in game loop, simple asset loading, and basic rendering utilities for rapid prototyping and learning game development.

๐Ÿš€ Features

  • ๐ŸŽฎ Built-in game loop
  • ๐Ÿ•น Keyboard input handling
  • ๐Ÿ“ฆ Sprite system (images and rectangles)
  • โœ”๏ธ Delta-time support for smooth movement
  • โš™๏ธ Simple and readable Python API

๐Ÿ“ธ Screenshot & Demo

ressources
๐Ÿ‘‰ The Game

๐Ÿงช Quick Example (Python)

import easyPyEngine as epe

engine = epe.Engine("My Game", 800, 600)

sprite = epe.Sprite()
sprite.add_image(engine, "path/to/image.png", 100, 100)

sp2 = epe.Sprite()
sp2.add_rect(100, 100, (255, 0, 0), 1)

x = 100
y = 400
speed = 200

def update(dt):
    global x, y

    engine.clear(color=(135, 206, 235))
    engine.draw_rect(0, 500, 800, 600, (124, 252, 0), 1)

    sp2.draw(engine, 100, 400)
    sprite.draw(engine, x, y)

    if engine.is_key_pressed("w"):
        sprite.height += 2
    if engine.is_key_pressed("s"):
        sprite.height -= 2
    if engine.is_key_pressed("a"):
        x -= speed * dt
    if engine.is_key_pressed("d"):
        x += speed * dt

engine.run(update)
engine.quit()

๐Ÿ“˜ Documentation

Explore the guides below to begin using the engine:

  • Getting Started โ€“ Setup, build and install basics
  • Usage โ€“ API reference and example code

โš™๏ธ Installation

Check out this part of the documentation: Getting Started

๐Ÿง  Motivation

EasyPyEngine was developed as part of the Moonshot Hack Club event.
Itโ€™s designed to introduce Python developers to game engine fundamentals without overwhelming complexity.

๐Ÿงฉ Contributing

Contributions are welcome. See CONTRIBUTING.md for guidelines on reporting bugs, proposing features, and submitting pull requests.
Before contributing, please ensure you follow the code style and documentation standards.

๐Ÿค Contributors

Contributors

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see LICENSE for more details.

About

Beginner-friendly 2D game engine for Python with a built-in game loop and simple asset loading.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors