Framex
A game engine built off of pygame-ce. Created specifically to spin up quick testing worlds or to make actual games.
Installation
pip install framex-ce
# This should auto install pygame-ce, if not, run
pip install pygame-ce
Usage
A starting window (500x500)
from Framex import *
loop = Loop(
caption = "My First Framex Window",
background_color = (15, 15, 15),
size = (500, 500),
frame_rate = 60
)
loop.run()
A Custom quit key
import pygame
from Framex import *
loop = Loop(
caption = "My First Framex Window",
background_color = (15, 15, 15),
size = (500, 500),
frame_rate = 60
)
loop.run(
quit_key = pygame.K_q
)
A Simple player controlled Character
import pygame
from Framex import *
loop = Loop(
caption = "My First Framex Window",
background_color = (15, 15, 15),
size = (500, 500),
frame_rate = 60
)
groups = Groups(
zorder = True
)
player = DynamicEntity(
position = (50, 50),
group_ref = groups,
color = (0, 255, 0),
center = True,
player_controlled = True
)
groups.add_dynamic(player)
def draw_func(screen: pygame.Surface, camera: None | Camera):
groups.draw(screen = screen, camera = camera)
def update_func(dt: float):
groups.update(dt = dt)
loop.run(
draw_func = draw_func,
update_func = update_func,
quit_key = pygame.K_q
)
Some static entities with a camera
import pygame
from Framex import *
l = Loop()
groups = Groups(True)
player = DynamicEntity(
position = (50, 50),
group_ref = groups,
color = (0, 255, 0),
center = True,
player_controlled = True
)
x = 100
for _ in range(10):
static_sprite = StaticEntity(
position = (x, 100),
group_ref = groups,
color = (255, 0, 0),
center = True
)
groups.add_static(static_sprite)
x += 140
groups.add_dynamic(player)
def draw_func(screen: pygame.Surface, camera) -> None:
groups.draw(screen, camera)
def update_func(dt: float | int) -> None:
groups.update(dt)
camera = Camera("lerp")
camera.set_target(player)
l.run(
draw_func = draw_func,
update_func = update_func,
camera = camera,
quit_key = pygame.K_q)
More Tutorials
Some more tutorials will be added here soon!
Metadata
Release files for framex-ce 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| framex_ce-0.2.0.tar.gz | 6.4 kB | Without provenance | Details for framex_ce-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| framex_ce-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for framex_ce-0.2.0-py3-none-any.whl |
Total release size: 14.1 kB
Release files / framex_ce-0.2.0.tar.gz
| Download URL | framex_ce-0.2.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a814e7afbe1f9b25260cda767cf38948b2dddf8df43e5c95f1f9003578e8412
|
|
BLAKE2b-256 checksum How to use checksums |
0ed6a3f153469d366589fc8bef872f56e40e09b172e968b325619ec172e46b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / framex_ce-0.2.0-py3-none-any.whl
| Download URL | framex_ce-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79b51b471d62b0abea3bf6fe997ef60b384e349c45a1dca62b942754fcc51097
|
|
BLAKE2b-256 checksum How to use checksums |
0b1b19d6f8f2cd4047e1a16b9c016ece524682d4784d2c16c36475f65ecd1dd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for framex-ce 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.