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.0b10 (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.0b10.tar.gz (190.2 kB view details)

Uploaded Source

Built Distribution

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

libmge-1.0.0b10-py3-none-any.whl (198.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for libmge-1.0.0b10.tar.gz
Algorithm Hash digest
SHA256 38d735e5796e4543a3e440413813fec2eb1b5c727c4bc206a862004b33de9983
MD5 0d56e5f7cae8da53b9914ae4e35f5d01
BLAKE2b-256 d98cf951d447b97cef58bb4e52f01a928537038ac90b5f0bfbfac205dea3e6b0

See more details on using hashes here.

File details

Details for the file libmge-1.0.0b10-py3-none-any.whl.

File metadata

  • Download URL: libmge-1.0.0b10-py3-none-any.whl
  • Upload date:
  • Size: 198.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for libmge-1.0.0b10-py3-none-any.whl
Algorithm Hash digest
SHA256 367eb965e82066b04f1a07111020d730011ce7b7b488982a6db39756f2db57c4
MD5 fa1804fe72e0f7e438467e52c748d2c3
BLAKE2b-256 18527efb4748143dc6485d5a761301eca9a6e037dcd596aef8a8dd067d0c7e7c

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