Level 3 - final version

Go forth and Butterfly

Short version: 

https://github.com/CompassMentis/go_forth_and_butterfly.git, python 3.6 or 3.7, pygame 2.0.0(dev)


Lead your flock through the levels. Sleep at night or perish. Eat when hungry or perish

When it is mating season, make little butterflies (oops, no level for this - functionality is mostly but not quite there - so no mating)

Installation instructions:

(Steps 1 and 2 - you can also download the zip file, either from github or the uploaded file for this pyweek entry, unzip it and change into the newly created directory with the unzipped files)

(Steps 3 and 4 to create a virtual environment - optional but recommended)

(Step 3, this needs at least python 3.6, but doesn't work with 3.8 - so 3.6 or 3.7)

(Step 5, the only dependency is pygame. It only works with 2.0.0(dev), not 1.9.6)

  1. git clone git@github.com:CompassMentis/go_forth_and_butterfly.git
  2. cd go_forth_and_butterfly/
  3. python3.7 -m venv .env
  4. source .env/bin/activate
  5. pip install -r requirements.txt
  6. python main.py

Sorry, I couldn't get it to work with pyinstaller Please run it in Python instead


Presented by xmzhang1

Give this entry an award


Ratings (show detail)

Overall: 3.1
Fun: 2.5
Production: 3.5
Innovation: 3.3

27% respondents marked the game as not working.
Respondents: 8


File Uploader Date
Zipped copy of GitHub repository. See README or details on the pyweek entry page for instructions
coen 2020/03/29 20:16
Level 3 - final version
coen 2020/03/29 00:11
Day 1 - flapping butterflies
coen 2020/03/22 22:23

Diary Entries

Butterflies flocking (kind of) and flapping

End of day 1. pygame. Not a bad start: 

  • Implemented flocking (boids), more tweaking (and debugging?) required. 
  • 'Attractor' to pull (steer) the butterflies.
  • Animated wings, rotating butterflies - one set created
  • Side scrolling background

Add a comment

Day 2 - flocking under control

Flocking is looking much better, and now includes

  • Standard flocking rules - cohesion, alignment and the other one :-)
  • Fixed force, e.g. wind or gravity
  • Obstacle avoidance
  • Goal seeking
  • Multiple flocks with different rules and settings

Next: Different types and colours of butterflies. And some sort of game to go with it - some fun

Add a comment

Day 3 - leader, flowers, food

First signs of an actual game are starting to appear

  • One butterfly (the 'leader') can be controlled by the player
  • The leader can land on the ground and plant seeds, from which grow flowers over time
  • Butterflies go hungry and die. Next: when hungry, they will find the nearest flower to eat
  • Next: eat, multiply, predators

Plenty to be done, but steady progress

Draft game title: Go Forth and butterfly

Add a comment

Day 4 - Feeding and mating

My butterflies eat when they're hungry and mate when it is the mating season. That's most of the game engine done, just need to add predators.

But first, time to make it look right. Main layout decisions made. 

Tomorrow I'll fill in the detail and combine the layout with the game engine

Add a comment

Coding done :-)

Final coding done at 23:59. 

Lots more that could be done, but very pleased with the results

Tomorrow: create README, remove a few unused assets, push to GitHub, try to create Windows and Linux executables

Add a comment