Big Tuto on OOP & MVC with the Game Of Life

1.0

By Steph, 2 years ago

Controls: D-Pad: [Arrows / WASD] - A: [J] - B: [K] - Menu: [U] - Home: [I]
Enjoy games at full speed with sound and lights on the Gamebuino META!
Emulator by aoneill

Complete Tutorial on Game of Life



I propose here a very complete tutorial based on a small mathematical recreation, instead of a real game in the classical sense of the term, for the Gamebuino META: the famous Game of Life, designed by John Conway in the 1970s. You will see that this is a great little exercise, which will allow us to discuss many programming concepts and techniques. The main idea that guided me throughout the writing of this tutorial was to propose an exercise that was both simple and rich in possibilities, that we would be able to treat in a different way, through a gradual approach in the complexity of the programming, to achieve a finalized application with a controlled architecture.

I apologize to the English-speakers, my tutorial is written in French ... but you can get the English version here with Google Translate.

However, the French version of tutorial is available here. And you'll need it, because unfortunately Google Translate breaks the layout of code snippets and doesn't correctly show the YouTube videos...

What you will learn in this tutorial :

  • program a cellular automaton,
  • optimize your code for:
    • speed up the execution of your code,
    • save the memory space,
  • better organize your code with Object Oriented Programming,
  • design your applications with a Model View Controller architecture,
  • intercept events when the user presses the buttons,
  • handle menus in your applications,
  • program a LED manager for the META,
  • program a sound effects manager.

Feel free to send me your comments, or ask me for clarification on things you didn't understand correctly.

I would like to point out that this application is my first programming experience in C++... and yes ;-) I'm learning like you! My code is most likely to be perfectible, so I rely on the experienced coders in the community to let me know about possible (or necessary!) improvements. I will try to integrate them as soon as possible... because I still have a job in real life... and I can't spend all the time I want to have fun with this great little console!