Skip to content

Scr44gr/arepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arepy 🎮

Upload Python Package

An ECS game engine created in python with raylib and imgui integration :)

Installation 📖

pip install git+https://github.com/Scr44gr/arepy.git

Usage 📝

Basic usage example

Creating a simple system to move entities

from arepy.bundle.components.rigidbody_component import RigidBody2D
from arepy.bundle.components.transform_component import Transform
from arepy.ecs.entities import Entities
from arepy.ecs.query import Query, With
from arepy.engine.renderer.renderer_2d import Renderer2D

def movement_system(
    query: Query[Entities, With[Transform, RigidBody2D]], renderer: Renderer2D
):
    delta_time = renderer.get_delta_time()
    entities = query.get_entities()
    for entity in entities:
        transform = entity.get_component(Transform)
        velocity = entity.get_component(RigidBody2D).velocity

        transform.position.x += velocity.x * delta_time
        transform.position.y += velocity.y * delta_time

TODO!: create a nice README.md

About

An ECS python game engine using sdl2 (WIP).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages