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.0b11 (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.0b11.tar.gz (192.6 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.0b11-py3-none-any.whl (202.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: libmge-1.0.0b11.tar.gz
  • Upload date:
  • Size: 192.6 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.0b11.tar.gz
Algorithm Hash digest
SHA256 b369e5043694211ceeba9aa046974c584d22e3f9ec59bc0ab499007e68f77ecc
MD5 35ec89ea5fa638021efa757007fa2de4
BLAKE2b-256 c4c7e1bc2cc34c83ed89b94aa60fe06b1e9b6010c5bc177b70d2b260c6364273

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libmge-1.0.0b11-py3-none-any.whl
  • Upload date:
  • Size: 202.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.0b11-py3-none-any.whl
Algorithm Hash digest
SHA256 8736de80e32d8888736b68c1051df110becfc00ada8081a660900239a1b7f3f1
MD5 e1994d8e05a0e4f21d74337562c69349
BLAKE2b-256 71771b187511238ee4f5f3a553e868afe7652c213f38466ef2dfbb090f5d971d

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