Geometry environment for pygame.
Project description
Description
This is a framework based on pygame that allows an easier process for making games. This is so much more than a tool kit. Tested in pygame2 not in pygame1.
Geometry objects
Geometry components added:
- point
- segment
- vector
- line
- halfline
But also:
- circle
- rectangle
- square
- polygon
- triangle
- bezier curve
- trajectory
Physics/Maths objects
- force
- motion
- body
- polynomial
- perlin noise
Game objects
- entity
- anatomy
- widget
- menu
- manager
More technical physics objects
- material
- material form
- material circle
- material formcollider
Installation
pip install pygame-context
Draw a
import pygame_geometry as pgg
from pgg.abstract import *
from pgg.context import Context
from pgg import colors as cl
context = Context("title") # create a context similar to a pygame surface
p1 = Point(2,2)
p2 = Point(3,2, color=cl.BLUE)
r = Rectangle(50, 50, 100, 200)
# main game loop
while context.open:
# clear the window
context.clear()
# check quit event (empty pygame event buffer by doing so)
context.check()
# update objects
p1.rotate()
r.move(1, 0)
# show objects
p1.show(context)
p2.show(context)
r.show(context)
# flip the screen
context.flip()
Description
Controls
- Space: Switch to next mode.
- Enter: Go back to the center.
- Up/Down/Right/Left Arrow: Move arround.
- Right/Left Shift: Zoom in or out.
- Quit/Escape: Quit.
- Z: Cancel last sample.
- R: Remove all samples.
- S: Save the fourier-coefficients.
Enjoy!
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
pygame_geometry-0.0.5.tar.gz
(105.5 kB
view hashes)
Built Distribution
Close
Hashes for pygame_geometry-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c39f04d5c9e7c7f40403873335dfa44cfe5a21d6171dc77c3bf838b624d76ca |
|
MD5 | 7ef2538e05d61479664386757dca79ad |
|
BLAKE2b-256 | 52754ad46477a4fcf1495cfc2847b8fe119f97d06f13cb9596a310e883634083 |