top of page
  • Writer's pictureBrittany Blair

20 Game Challenge in MonoGame : Game 1

Link to my blog

The Challenge

The 20 game Challenge is a website that, you guessed it, challenges you to make 20 games. This challenge is an entirely self-imposed set of rules to follow while making 20 small games on your own.

To summarize how this works, you decide on a game engine ( or engines you wish to use ) and watch tutorials before starting the challenge if you need them. Then you can begin making up to 20 games on your own. Start with the first 10 recommended games as they will teach the fundamentals. The next 10 games you choose to design yourself based on what you have learned. After 20 games are done, end the challenge with a capstone project that is either larger than the other games or more difficult to complete than the previous 20 games.

I want to code games from scratch outside of a game engine (i.e. using a framework )for the first time. I have made games in engines like Unity and Unreal for most of my career, but I don't want to feel limited to their platforms. So I want to expand my horizons and use this 20-game challenge to learn how to use the MonoGame framework to make games.

The first Game Requirements

Alright with all the explanation out of the way Let's get into the first game challenge. I get to pick between a 'Pong' style game, or a 'Flappy Bird' style game. I've made pong-style games a lot when I started learning, so I'll opt for the 'Flappy Bird' style game.

The goals are as follows

  • Create a game world with a floor

  • Add obstacles on the left of the game area. They should have a vertical gap between them, and move across the screen.

  • Detect character collisions with the floor or obstacles, and reset the game when a collision occurs

  • accumulate one point for each obstacle that the player passes. Display the score.

Optional goals

  • Add sounds that ply each time a point is gained, and when the player loses the game.

  • add a basic game over the screen to display the player's score

  • Track the score between sessions and display the high score alongside the current score

  • Add some background art, Try layering and scrolling at different rates ( parallax scrolling )


Above is my design/planning sketch. I always do this on paper and usually have journals full of these kinds of notes. It's a good way to demonstrate thought processes and even if I don't actualize a game right away it's like a catalogue of ideas I can pull from in the future.

So Flappy Bird is pretty straightforward, there's a reason why it was a game 1 option so I wrote down some of the most important features. Everything on the screen needs movement, the player, obstacles, the foreground, and background elements. So I plan to make a movement component to add to all moving elements.

I know that input is required for gameplay and for the other screens of the game. So I'll need to make an input handler. Finally, I know that I'll need classes for the obstacles and the player because they will collide and interact with each other to drive the game forward and add to the score.

The Code

So long story short I had to make a lot of systems that are normally designed for you in a traditional game engine such as an input management system, collision detection, event systems, and more. All of that stuff is inside the 'Engine' folder of the GitHub repository. It is the beginning of a foundational set of tools I will be using and continue to expand upon as I complete the rest of these upcoming game challenges.

While this project took me roughly 4 days to complete, most of that time was put towards making those game engine systems and the game itself was almost like a way to test how they were all working.

The image above is a screenshot of all the .cs files I made for not only the engine classes but also what I made for the game itself. The game has 3 game states, 1 player, 1 obstacle class, and one terrain class. All of these classes were inherited from the base classes I made in the engine section.

The game states spawn the scene actors, make the music play, update all the actors for each update loop, and handle the actions for each type of input. FlappyGameplayState is the main play state, FlappyStartSplash is the main menu, and FlappyLoseSplash is the retry menu.

The Art

I made all the art in the game myself using Marmoset Hexels3. It's a program that does pixel art very well, and I purchased my license on Steam while it was on sale.

As I didn't have a ton of time in the world I went with a more whimsical approach and didn't think too hard about it all. I make a player, some obstacles, and the UI elements. Everything turned out pretty well and my favorite piece for this project is a tie between the title and the player duck.

I got the Music and audio from If you're interested in using any of it yourself, check out the credits document in my GitHub repository. I have the assets I use linked in there.

The Conclusion

This was a challenging but fun start to my MonoGame journey. I don't know if I'll be able to finish the 20-game challenge in the long run. But I feel far better about moving forward after finishing this first game.



Post: Blog2 Post
bottom of page