patternengine
Project description
patternengine
A bullet hell pattern engine
Consult the embedded docs for class descriptions and usage.
Check out the demo. Watch the demo running
Look into src/patternengine/example.py
Preparation
########################################################################
# Relevant part here
#
# A "ring" of 180 degrees aiming towards the top devided int 18 parts
# A heartbeat over 5 seconds with 4 emits and 4 gaps
# A BulletSource fetching 18 bullets at every heartbeat
#
ring = pe.Ring(100, 18, aim=-90, width=180)
heartbeat = pe.Heartbeat(5, '#.#.#.#.')
emitter = pe.BulletSource(18, ring, heartbeat)
#
########################################################################
Later in the game loop
####################################################################
# Relevant part here
#
for bullet in next(emitter):
Bullet(group,
position=bullet[0] + anchor,
momentum=bullet[1] * bullet_speed,
lifetime=10)
#
####################################################################
with Bullet being a simple subclass of pygame.sprite.Sprite
TBC...
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
patternengine-0.0.2.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for patternengine-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7f15f47f8d01068c4109d2d77fb13aac7f7ae7f00d5547e0dc72c2800b3eab |
|
MD5 | db9fb6a75b102f6bef1663cedfde6860 |
|
BLAKE2b-256 | e13cac468a72fccf234396ddc7d89546a7c07ad132f7badb52026ff3b8f4405c |