Released a package on pypi called Hooman. It’s tagline is “~pygame for humans”.
You can install it via pip install hooman
and docs are on github. Here’s a glipse of the feel:
from hooman import Hooman
import pygame
hapi = Hooman(500, 500)
def handle_events(event):
if event.type == pygame.QUIT:
hapi.is_running = False
hapi.handle_events = handle_events
while hapi.is_running:
hapi.background(hapi.color['white'])
hapi.fill(hapi.color['blue'])
hapi.stroke_size(4)
hapi.begin_shape()
hapi.vertex((0, 0))
hapi.vertex((100, 0))
hapi.vertex((hapi.mouseX(), hapi.mouseY()))
hapi.end_shape()
# same as hapi.polygon([(0, 0), (100, 0), (hapi.mouseX(), hapi.mouseY())])
hapi.flip_display()
hapi.event_loop()
pygame.quit()
If you know PyGame, this lib preserves the spirit of it while keeping your code clear