Skip to main content

LibMGE is a powerful graphical user interface library for developing 2D programs and games.

Project description

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:

🔗 Links

📝 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

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Current Version: 1.0.0b9 (Beta)

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

libmge-1.0.0b9.tar.gz (184.3 kB view details)

Uploaded Source

File details

Details for the file libmge-1.0.0b9.tar.gz.

File metadata

  • Download URL: libmge-1.0.0b9.tar.gz
  • Upload date:
  • Size: 184.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for libmge-1.0.0b9.tar.gz
Algorithm Hash digest
SHA256 42cccd1869cb472e8dbfcfcfdb881d1c919181167773e275560f7bea85fa4782
MD5 665c926581c452a295347d254106c1bd
BLAKE2b-256 8f2afb5de8e5b0d28ee84326f5235491d917aa1ac29b3b40a99113f7c03627de

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