Skip to main content

A modern 2D game engine with advanced UI and graphics

Project description

LunaEngine 🚀

A modern, optimized 2D game engine built with Python and Pygame featuring advanced UI systems, procedural lighting, and embedded asset management.

PyGame Renderer is no longer supported, only OpenGL!

📋 Features

Feature Description Status
Advanced UI Roblox Studio-like UI components ✅ Functional
OpenGL Rendering Hardware-accelerated graphics ✅ Functional
Performance Tools FPS monitoring, hardware detection ✅ Functional
Themes The engine have pre-built themes ✅ Functional
Filters We home a huge amount of filters for your game(Blur, Neon, ...) ✅ Functional
Lighting System Dynamic lights and shadows 🔄 WIP
Particle Effects Particle system 🔄 WIP
Image Embedding Convert assets to Python code ⚠️ Useless
Modular Architecture Easy to extend and customize :)

Code Statistics

See this file

TestPyPi

PyPi

🚀 Quick Start

Installation

# First of all, install python 3.9+ (Not tested on older versions)
# Then you can install either from pypy or testpypi
pip install lunaengine
pip install -i https://test.pypi.org/simple/ lunaengine

Ignore

# Install dependencies
pip install -r requirements.txt

# Run a basic example
python examples/ui_comprehensive_demo.py

Requirements

Core Dependencies (required):

pygame>=2.5.0
numpy>=1.21.0
PyOpenGL>=3.1.0
PyOpenGL-accelerate>=3.1.0

Development Tools (optional):

black>=22.0.0
flake8>=4.0.0
pytest>=7.0.0
setuptools>=65.0.0
wheel>=0.37.0
twine>=4.0.0

Build

# Make build
python -m build

# Check files
twine check dist/* 

# Upload testpypi
twine upload --config-file .pypirc --repository testpypi dist/*

# Upload PyPi
twine upload --config-file .pypirc --repository pypi dist/*

OpenGL

  • Require OpenGL 3.3+
  • OpenGL come actvated by default

Network

Example usage of server scripts:

def auto_save_script(server: Server):
    """Example server script for auto-saving"""
    # This would save game state periodically
    save_data = {
        'timestamp': time.time(),
        'player_count': len(server.clients),
        'game_state': 'running'
    }
    print(f"Auto-save: {save_data}")
    return save_data

def day_night_cycle_script(server: Server):
    """Example server script for day/night cycle"""
    # Calculate current cycle phase (0-1)
    cycle_time = time.time() % 3600  # 1 hour cycle
    cycle_phase = cycle_time / 3600
    
    # Broadcast cycle update to all clients
    cycle_msg = GameStateMessage({'day_night_cycle': cycle_phase})
    server.broadcast(cycle_msg)
    
    return {'cycle_phase': cycle_phase, 'cycle_time': cycle_time}
Star History Chart

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

lunaengine-0.1.9.tar.gz (128.6 kB view details)

Uploaded Source

Built Distribution

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

lunaengine-0.1.9-py3-none-any.whl (139.0 kB view details)

Uploaded Python 3

File details

Details for the file lunaengine-0.1.9.tar.gz.

File metadata

  • Download URL: lunaengine-0.1.9.tar.gz
  • Upload date:
  • Size: 128.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lunaengine-0.1.9.tar.gz
Algorithm Hash digest
SHA256 31ec99916ca82b731453e109378e722b39c14c6e188c4d8b7316e79873b6ee9f
MD5 ea87a33accccdd5430c1889827407349
BLAKE2b-256 f5d7434fc4db6033a0ab4332c87f07a728c0d91bc6c815ea2ab374e14af9b076

See more details on using hashes here.

File details

Details for the file lunaengine-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: lunaengine-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 139.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for lunaengine-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3a14f1f1351769cd8ba711db131894c3ea723e31344edca7f3e397f95787d608
MD5 8d55f9a2394916265ae7c9ca50d98409
BLAKE2b-256 9d95f8bb270d9e2019a51ed1b37ea1b2075cae7c5c0f71aa0dd74389befbb09d

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