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.1.tar.gz (107.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.6.1-py3-none-any.whl (117.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunaengine-0.1.6.1.tar.gz
  • Upload date:
  • Size: 107.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.6.1.tar.gz
Algorithm Hash digest
SHA256 0e852beb0f967bec7250f8ab6c45dc4aba19f1dda223385527b145fb27f38b21
MD5 95bd249d89592ce8e55750087b78bdf2
BLAKE2b-256 f74b2759b9e5a7bd5196862fe0b155ce58eb1c27f44d73256b2a91ee5bd70230

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunaengine-0.1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 117.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30ea0b5a06b6751f871fdf05f9e609424d8ef4e3e81120791d8b39c575e1cd10
MD5 3b369aa1067d315e2cf43b4a810f6831
BLAKE2b-256 79af20d5b3983226ec6929473a60acb22d51446db1e5954dde45626c85264a2a

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