Break out clone written in
JavaFX (Oracle Docs)
Entity Component System
(ECS) pattern. This was a coursework for
programming module and my first big project. The end result and the source code can be found on the
fork to get a copy,
then build and run with
When I started this project I knew only basics: java syntax, conditional statements, loops, methods and little bit about inheritance. But I had to start somewhere and came across with Beginning Java 8 Games Development book. Which gave me pretty good insight to JavaFX. How to setup game loop, timers, asset management etc. Unfortunately, I was not impressed by the end result. Had few classes with hundredths of lines. My lack of understanding about OOP principles (Wikipedia) forced me to read Head First Design Patterns book.
I redesigned the project from ground up and ended up with more than 15 classes and interfaces. Which was good, had working game and code looked pretty clean. But then I started to think what if I want to extend it, for example, add different power ups or make bricks (tomatoes in my case) to move. This will be very hard to accomplish, because I will have to extend my classes deeply and will end up with tight coupling. Lucky for me someone introduced me with pattern which is very popular in game development. After redesigning again, and by redesigning I mean copying all the project files to new folder, then modifying them, I realized that this is too laborious and has to be better solution to control all the versions. And this is where I realized importance of GitHub . Of course to learn about it, had to read Pro Git .
To download source code go to
git clone https://github.com/grrinchas/squash from your favorite command line tool.