Seems like a complete waste of time as well as overengineering for the sake of "ideal" correctness.
You have non-game specific code in your pong implementation please separate 'engine' code out into it's own module or libraryFor a game? Why? He's not writing a library here, who is going to be including these headers besides the game itself?
Separate your header and source files into different folders (include and source)Does he WANT to add AI?
A Paddle shouldn't handle it's input, take that out into a PaddleController class so you can easily add AI to your paddle.While I agree about moving code out of main I don't really get where the assumption would be that he should make a game class and then inherit from it. He could just as easily have a "Game" class by itself.
Remove boiler plate code from main and turn it into a Game class, inherit from that when making PongRemoving magic numbers, sure. He could just as easily make them constants and should make that decision based on his usage, not simply throwing a bunch of random and possibly useless settings in an xml or json file and then getting library code together to load it and parse settings.
Remove all magic number values from code and put them in json or xml files that describe things like game specific data (Paddle initial positions) and engine data (window size, title etc)
If theres one thing that wastes just as much time as bad code its overengineering code just because its the "pretty" thing to do.
Over engineering? It's simply making it easier for a reader to see what is actually game code and what isn't, seeing as he isn't the only person reading the code it isn't a complete waste of time. Good structure is rarely a waste of time, even in small projects.
For the same reason above, so people reading it can directly go to src or inc for whatever they want to look at. I didn't say he was writing a library. I don't know why you wouldn't do this 'for a game'.
Well, AI is just an example what if he wants to add a networked controller so another application could control a paddle via some port? It's all about SRP and makes it well designed, it is also maybe 10 minutes of work.
I was just following his other design patterns (i.e movable which things inherit from) and I think it fits.
Sure, constants would work, but require a recompilation every time, why aren't his shaders, materials etc constants as well? Again following what he already had in his game.
You want to see over-engineered?
- Factories for everything, remove public constructors
- Separate rendering and logic
- Normalise all namespaces and add missing namespaces, make sure they have proper and long names.
- Use premake or cmake (Preferably both) for agnostic compiler \ IDE project setup
- Separate engine and game into different git repositories making use of sub-module
- Add an asset database for handling resources (config files, materials, mesh etc)
- Engine should definitely be it's own library(rather than just some code) and be seperated into core, math, render, physics, input, network, UI and game (WorldObject and Game class)
- Input should be more generic and be loaded through a config file for ease of changing actions
- Write a C interface for everything
- Add a plugin system for mods (Allow use of hot-loaded dlls and scripts for at least 4 languages, make use of SWIG)
- Capture metrics of players and send back to database using pig, hadoop and map reduce.
(Please continue this list)