Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonbloom/bulletcombinators
Automatically exported from code.google.com/p/bulletcombinators
https://github.com/brandonbloom/bulletcombinators
Last synced: 16 days ago
JSON representation
Automatically exported from code.google.com/p/bulletcombinators
- Host: GitHub
- URL: https://github.com/brandonbloom/bulletcombinators
- Owner: brandonbloom
- Created: 2015-03-14T18:14:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-14T18:24:38.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T05:48:48.818Z (2 months ago)
- Language: Python
- Size: 141 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bullet Combinators
A simple Bullet Hell game written in a functional combinator style in Python
using pygame.Here is an example pattern which does a sort of figure-eight out of two
octagons. Every time the the bullet moves, it spawns a new bullet which fires
off in a straight line.```python
Bullet((400, 300)),
forever(
sequence(
repeat(8,
sequence(
repeat(25, forward(3)),
rotate(3.14/4),
spawn(forever(forward(2)), color=red))),
rotate(3.14)))
```This project is inspired by an article on writing a parser with functional
combinators in Arc: . I wanted to write
something with combinators, but was afraid I wouldn't learn anything blindly
copying the parser library. My friend Jace provided this perfect test case
while trying to learn F#.