Hi. When asked to present a coding sample I had nothing suitable, particularly not in C++. For a long time I have wanted to create an engine and I saw this as an opportunity to lay the groundwork and produce something. With the short time window and the busyness of my schedule I opted to cheat by using SFML but then again, what's a good programmer if he doesn't use the tools available ;)!
This is my quick version of Pong written on top of SFML. I produced it in the last few days. The work I have done here will be adapted for me to continue to develop an engine, hence the seemingly out-of-place and unused files and some methods.
It should compile and run on both windows and mac. I have tested on both and had no issues.
Controls: Player One MOVE_UP -> Q MOVE_DOWN -> A
Player Two ARROW_UP -> Move paddle up ARROW_DOWN -> Move paddle down
GENERAL: ESCAPE -> exit
With more time I would have implemented a simple AI for the paddles. I would also add difficulty settings as well as a top score for playing the ai.
I had no experience previously with SFML or any real work like this in C++ outside of the office. However I was recommended SFML by a colleague who works on SFML in his spare time and spoke very highly of it. It did mean that a lot of my time was spent learning how to use SFML.