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.

📋 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
Lighting System Dynamic lights and shadows 🔄 WIP
Particle Effects Particle system 🔄 WIP
Image Embedding Convert assets to Python code ⚠️ Buggy
Modular Architecture Easy to extend and customize

Code

See this file

TestPyPi

PyPi

🚀 Quick Start

Installation

# 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}

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.6.tar.gz (107.1 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.6-py3-none-any.whl (117.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunaengine-0.1.6.tar.gz
  • Upload date:
  • Size: 107.1 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.6.tar.gz
Algorithm Hash digest
SHA256 0f3ef85541372c8fe0e828095d8c81f0b11237b1c06bbfae38d85c45b8dfe637
MD5 4d807b74c820a658f595bc85e7cc6cec
BLAKE2b-256 3082406937705a85d45119c5958f6c81cdb4cc9269407f1fec3e0c2fe46ea47f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunaengine-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 117.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 16422491a36ba0a4900c0cf13fa64db7799e5e1de389593718a1c47c3a7e4f05
MD5 59db1785bb5539139e380b99e4789fba
BLAKE2b-256 12102dfb7eede76df167d470fdd50c786c01d4691f92a141094f957f0ffc4829

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