Skip to content

StreakyFly/FlappyBirdPlus

Repository files navigation

FlappyBirdPlus

Upgraded Flappy Bird with health, guns & enemies, controlled by AI agents.

Not developed for commercial purposes, only for fun and learning.

Current state of the game:

gameplay.mp4

This video is kinda old, a lot of stuff has been updated since.

⚠️ DANGER ZONE AFTER THIS—contains random shit I wrote when I thought I knew what I was doing but it turns out that in fact I did not. So whatever is written after this might be complete utter garbage joyfully produced by past me.

TODO:

  1. make fighting enemies a bit easier and more fun! (fighting CloudSkimmers is too hard)
  2. barely touching the top/bottom of a pipe shouldn't immediately kill the bird, but only slightly damage it
  3. add animation for reloading guns, bullet collisions (sparks/tiny explosions), collecting items, enemy deaths and other items
  4. VFX, show damage dealt - red text appears above the entity when damage is dealt and then it fades away
  5. sound effects for like uhh... everything
  6. multiple types of enemies (controlled by AI agents)
  7. 3rd inventory slot - small robots that help the player? (also controlled by AI agents in some modes) - their position and movements can be programmed similarly as we did with ghost.py, set the target and let them move towards it, but slow them down until they almost stop, then update the target's position
  8. main menu with a global leaderboard (data stored in a database)
  9. more items, like potions, heals, weapons and special items
  10. occasional targets attached to pipes, that give you points/abilities/extra shield for hitting them, so it's not boring when there's no enemies?
  11. easter egg: kill multiple birds with one stone: super rare stone item that bounces between enemies and kills them all
  12. maybe add some occasional thorns growing from the top to bottom pipe, that slowly damage the bird if they touch them, can be destroyed by shooting them
  13. Figure out how to run the game in a browser, possibly with pygbag https://pypi.org/project/pygbag/
  14. and more...
  • global leaderboard database: later possibly add "HumanPlayer" column that simply stores the info whether the bird was controlled by a human or an AI agent

Training the Player AI agent (once the game is complete):

Take this input/output with a big grain of salt (it was written when I had no experience yet), after experimenting and training the CloudSkimmer I learned that a lot of things I thought would be a good idea turned out wrong and a lot of things I thought would negatively affect the training turned out to be beneficial.

Input:

  • player position, rotation, health & shield
  • pipes y center position
  • enemy positions, their type and health
  • positions and velocities of bullets the player fired
  • positions and velocities of other bullets (excluding those that already hit the floor)
  • spawned item positions
  • gun stats & bullet stats
  • quantity of the 3rd slot item and its type whatever it may be
  • quantity of potions and their type
  • quantity of heals and their type
  • quantity of special items and their type
  • ... and possibly more

Output:

  • jump or not
  • fire, reload or do nothing
  • use the 3rd slot item or not
  • use a potion or not
  • use a heal or not

The agent should be rewarded every time they pass a pipe/the score increases. It should also be rewarded for hitting enemies, and punished for getting hit. Maybe also reward it when the bird has high health and shield, and punish it when they're low? To be determined.


Credits:

About

Upgraded Flappy Bird with guns & enemies, controlled by AI agents.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors