@Hapax: I am well aware of the mantra "Make games, not engines", but as it happens to be, I really like doing the engine / framework stuff
(which also means I am making the most over-engineered Pong clone ever, currently at 46 code files and still not done, whereas my first working Pong clone was done in one code file
)
But the debug draw overlay was really needed to further tweak the physics of the game, and without visual debugging, this is near to impossible.
@AncientGrief:
Yes I implemented that with the pre-processor, working with #ifdef _DEBUG #else #endif constructs. The drawing itself is handled in the base entity class via a split-up draw function. Entity.draw() just calculates the combined transformation and than calls drawCurrent(...) (which is virtual and overridden in derived classes) and if debug draw is enabled it calls drawDebug(...). Not very elegant but working, also this way the whole debug logic is not present in release builds, because it really hurts performance, like cutting framerate to 25% of release performance.
You can see for yourself if you want
https://github.com/SeriousITGuy/SFML-Pong(Entity.cpp and GameWorld.cpp are of special interest for the debug drawing)