Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

LibMGE

PyPI version License: Zlib Python

LibMGE is a powerful and easy-to-use graphical user interface library for developing 2D programs and games in Python.

✨ Features

  • 🎮 Simple and intuitive API for 2D game development
  • 🖼️ Built-in support for images and animated GIFs
  • ⚡ Frame rate control and performance monitoring
  • 🎨 Material and texture system
  • ⌨️ Keyboard and event handling
  • 🪟 Flexible window management

📦 Installation

pip install LibMGE

🔧 Dependencies

  • numpy - For efficient numerical operations
  • SDL2 (bundled) - For graphics rendering

🚀 Quick Start

Here's a simple example that displays an animated GIF:

import LibMGE

# Initialize the library
LibMGE.init()

# Create a window
window = LibMGE.Window(
    resolution=(500, 500), 
    flags=LibMGE.WindowFlag.Shown
)
window.frameRateLimit = 60

# Create a 2D object and load a GIF
gif = LibMGE.Object2D((0, 0), 0, (500, 500))
gif.material = LibMGE.Material(
    LibMGE.Texture(LibMGE.LoadImage("./image.gif"))
)

# Main loop
while True:
    LibMGE.update()
    window.update()
    window.title = f"LibMGE OpenGif | FPS: {window.frameRate}"
    
    # Exit on quit event or F1 key
    if LibMGE.QuitEvent() or LibMGE.keyboard(LibMGE.KeyboardButton.KeyF1):
        exit()
    
    gif.drawObject(window)

📚 Documentation

For detailed documentation and tutorials, visit:

📝 License

LibMGE is distributed under the zlib License. This license allows you to freely use it in any software, whether personal, commercial, or open-source projects.

💻 Compatibility

LibMGE officially supports Windows. With some modifications, it can also run on:

  • 🐧 Linux (experimental)
  • 🤖 Android (experimental)

Note: For best stability and performance, we recommend using LibMGE on Windows. Community contributions for better cross-platform support are welcome!

👤 Author

Lucas Guimarães


Current Version: 1.0.0b12

Metadata

Release files for LibMGE 1.0.0b12

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

Source distribution (sdist)

Source distribution for LibMGE 1.0.0b12
File Size Uploaded
libmge-1.0.0b12.tar.gz 323.7 kB Details

Built distribution (wheel)

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

Total release size: 661.8 kB

Release files / libmge-1.0.0b12.tar.gz

Download URL libmge-1.0.0b12.tar.gz
Size 323.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8853954674e2cc3e0b6c85609e6d0af1639e9ea089bb58236ac7f5dbbc321c94
BLAKE2b-256 checksum
How to use checksums
425bb7a3438dbd11fc5906a2de460049b09e54b5b6fc7ab789cdfdec08f0df3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / libmge-1.0.0b12-py3-none-any.whl

Download URL libmge-1.0.0b12-py3-none-any.whl
Size 338.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59b1035ccd6360233532f02e0545f11a2cf229ec7a39ac3a0959c84d3d139c4e
BLAKE2b-256 checksum
How to use checksums
858863cc51ac4a480aeb500b95f0c473f6ac67437d28e68d7f4f2f4582aec673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2
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