A library for making simple 2D games
Project description
Emeral is a Python package for creating small games, developed based on Pygame, with the aim of changing the loop-refresh method to a multithreaded approach. The Emeral library is suitable for making 2D games and currently has four modules: display, events, image, and entity, with more modules planned for development. Emeral is currently in the beta version.
Installation
Before downloading the Emeral library, you must ensure that Python is already installed on your computer, and the Python version should be above 3.7. Version 3.7 is only the minimum requirement, and some advanced functions may not be available when using it. Once you have installed Python, you can use the following command to install the Emeral library from the command line.
pip install emeral
After installing the Emeral library, you can use the following command to ensure that the library was installed successfully.
pip list
If the Python library ‘emeral’ appears in the list, it means you have successfully installed it.
Help
Our documentation is actively being written. To view the basic help documentation, please write the following code in your Python program.
import emeral
help(emeral)
Quick Start
· Basic framework:
import emeral
window=emeral.display.Window() # Create a window object.
room=emeral.display.Room(window) # Create a room on the window.
room.set_caption("NewGame") # Set caption for the room, which will show on title bar.
room.switch() # Switch to the window.
window.listen() # Window Mainloop.
· Create a Animation of sprite and show it on window
import emeral
window=emeral.display.Window() # Create a window.
room=emeral.display.Room(window) # Create a room.
room.switch()
img=emeral.image.Animation(path="xxx.gif")
sp=emeral.entity.Sprite(room,img,position=(100,100)) # Create a sprite object.
emeral.events.When(window,emeral.events.EACH_FRAME_STEP()).do(lambda:sp.next_texture()) # Change to next texture.
window.listen() # Mainloop.
Changelog
· 0.8.0 beta version : Develop the four main Python packages and have the ability to create basic games.
· 0.8.2 beta version : Fixed the bug that prevented packages from being imported.
· 0.8.5 beta version : Added some methods to the Sprite object, and added a Camera object to the display module.
License
MIT License - Check the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file emeral-0.8.5.tar.gz.
File metadata
- Download URL: emeral-0.8.5.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98c1b3340e8c6e4d59b818b4f11853c40122e807e22fbc2ac24f8a000f715df2
|
|
| MD5 |
bae52b6feb875dcfe6d9e6066a9a7bb8
|
|
| BLAKE2b-256 |
0bdd229d7208e9f80ecaa367257572cef28ba2e77ac935a10950516e4f572ab7
|
File details
Details for the file emeral-0.8.5-py3-none-any.whl.
File metadata
- Download URL: emeral-0.8.5-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d826515e5da2b6fa88cbdc4684c7704f199dcfc3ff3427a6083a8fa11eedaba
|
|
| MD5 |
fdcc0ea83d51a038d1a5c432ff2bee3d
|
|
| BLAKE2b-256 |
e7bf4293cca8233b67b81c009b48f074f9b9546e4c9dc94b88d97e937731d9a6
|