Course:CPSC312-2021/FlappyGhost

From UBC Wiki

Title

Authors: Lisa Desjarlais, Tiger Wu

What is the problem?

It’s a bird, it’s a plane, no it’s a ghost! We will implement a derivative of the popular game Flappy Bird, called Floaty Ghost in Haskell. An endless runner game but with floating. Instead of a player trying to fly or flap a bird through pipes, a player will have to turn the ghost transparent to go through walls and become visible again to go through a light source. Because we all know ghosts don’t really exist, and thus they can’t be seen transparent in the light.

What is the something extra?

Utilizing the IO techniques we learned in class, we will combine it with a GUI, to make a side scroller platformer. The techniques that we will be using to implement the UI is inspired by A Game in Haskell - Dino Rush.

What did we learn from doing this?

Our goal was to explore if functional programming was suitable for endless runner games. We found that it is! We’ve created a 100% Haskell endless runner game (aside from the artwork which was created with Adobe Photoshop).

For our GUI we used Gloss library. The most challenging aspect was introducing randomization to our world generator. However the task was too complex and time consuming for the reward, so we opted for a variable timing to the world generator so that it appears random with the spacing of walls or lamps. We learned a lot about IO in the process of implementing Gloss and attempting Random.

In the future we would start with random generator functionality in mind when designing our program. And we would make more games like this, because it was fun and fun to play!

Link to code

https://github.com/LisaDesj/FlappyGhost