Skip to main content

Core

A powerful Python game engine with comprehensive math library and render pipeline.

Features

  • Complete Math Library (IntPy): Vectors, matrices, quaternions, geometry, advanced math
  • Render Pipeline: Camera system, materials, lighting, scene management
  • Engine Core: Main loop, time management, input handling, event system
  • Component System: Entity-component architecture
  • Resource Management: Asset loading and caching
  • Configuration: Flexible settings system
  • Logging: Built-in logging with levels

Installation

# Install from source
pip install -e .

# Or install in development mode
pip install -e ".[dev]"

Quick Start

Basic Engine Setup

from Engine import Engine

def update(delta_time):
    # Your update logic here
    pass

def render():
    # Your rendering logic here
    pass

# Create and run engine
engine = Engine(width=1280, height=720, title="My Game")
engine.set_update_callback(update)
engine.set_render_callback(render)
engine.run()

Using Math Library

from IntPy import vector3D, Matrix4x4, Quaternion, lerp

# Vectors
v1 = vector3D(1, 2, 3)
v2 = vector3D(4, 5, 6)
result = v1 + v2  # vector3D(5, 7, 9)

# Matrices
matrix = Matrix4x4.translation(10, 20, 30)
transformed = matrix * v1

# Quaternions
quat = Quaternion.from_euler(0, 45, 0)
rotated = quat.rotate_vector(v1)

# Interpolation
value = lerp(0.0, 100.0, 0.5)  # 50.0

Using Render Pipeline

from Render_Pipeline import Camera, Scene, GameObject, PrimitiveFactory, MaterialLibrary
from IntPy import vector3D

# Create camera
camera = Camera(
    position=vector3D(0, 0, 5),
    target=vector3D(0, 0, 0),
    fov=60.0
)

# Create scene
scene = Scene("MyScene")
scene.set_main_camera(camera)

# Create objects
cube_mesh = PrimitiveFactory.create_cube(1.0)
material = MaterialLibrary.metallic_rough(metallic=0.8, roughness=0.2)

obj = GameObject("Cube", mesh=cube_mesh, material=material)
obj.transform.set_position(vector3D(0, 0, 0))
scene.add_object(obj)

# Render scene (in your render callback)
from Render_Pipeline import RenderPipeline

renderer = RenderPipeline(1920, 1080)
renderer.render_scene(scene)

Input Handling

from Engine import get_input, Key, MouseButton

def update(delta_time):
    input_manager = get_input()
    
    # Keyboard
    if input_manager.is_key_pressed(Key.W):
        # Move forward
        pass
    
    if input_manager.is_key_down(Key.SPACE):
        # Jump (only on press)
        pass
    
    # Mouse
    if input_manager.is_mouse_button_pressed(MouseButton.LEFT):
        pos = input_manager.get_mouse_position()
        # Handle click
        pass
    
    scroll = input_manager.get_mouse_scroll()
    if scroll[1] != 0:
        # Handle scroll
        pass

Event System

from Engine import get_event_dispatcher, EventType

def on_window_resize(event):
    print(f"Window resized: {event.data}")

dispatcher = get_event_dispatcher()
dispatcher.subscribe(EventType.WINDOW_RESIZE, on_window_resize)

Component System

from Engine import get_entity_manager, TransformComponent

entity_manager = get_entity_manager()

# Create entity
entity = entity_manager.create_entity("Player")

# Add components
transform = TransformComponent()
transform.set_position(vector3D(0, 0, 0))
entity.add_component(transform)

# Update (called automatically by engine)
entity_manager.update(delta_time)

Examples

See the examples/ directory for more detailed examples:

  • basic_engine.py - Basic engine setup
  • math_examples.py - Math library usage
  • rendering_example.py - Render pipeline usage
  • input_example.py - Input handling
  • component_example.py - Component system

Documentation

Full documentation is available in the docstrings of each module.

License

MIT License

Metadata

Release files for Core3 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Core3 1.0.0
File Size Uploaded Provenance
core3-1.0.0.tar.gz 52.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Core3 1.0.0
File Interpreter ABI Platform
core3-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 105.9 kB

Release files / core3-1.0.0.tar.gz

Download URL core3-1.0.0.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c7b3a15fe9d3eefe12bb7953034a5f1a1fb5396c0f3a09d58cccc4f3f00d335
BLAKE2b-256 checksum
How to use checksums
72fc6a792cc7f8b307734a0b8896d2d6f1d8d7c3c75eab3feef106e0783834ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / core3-1.0.0-py3-none-any.whl

Download URL core3-1.0.0-py3-none-any.whl
Size 53.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be8df7c880d7587021ede53c8ca351d744bc500d857272f39a86fad7038fe597
BLAKE2b-256 checksum
How to use checksums
ca2f36ba096f3c8621788968936f55c5fe80506c56d6275ffd4efc6878ab0e9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for Core3 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page