Yet another pong clone
Since i started messing with C++, I wrote a quick pong clone using SFML. Primarily it involved stuff like this: https://github.com/agmcleod/pongclone/blob/ca91c63f0e491c3cf163452e9ba17b15c9861a30/MyPongClone/Paddle.cpp#L49
me using a rectangle bounds, and moving that, then copying the properties into the rectangle shape. The render method would then simply pass the rectangle shape to the render window. EzPz.
Though, when is that ever enough. Naturally I have to make my own renderer now. Which I did, and got it fully working last night. Text is a little bit funky, the colon in my font appears a bit small for some reason. Was fine in SFML.
The bulk of the OpenGL code is here: https://github.com/agmcleod/pongclone/blob/47478ca0986ccd90ab293abdc57837520c642901/MyPongClone/Renderer.cpp
It’s definitely not optimal. I need to change it so i’m using one shader for drawing the shapes & text, vs using two. But hey, got to learn about vertex array objects, buffer binding a bit more, etc. Was challenging, especially getting FreeType included properly. But very rewarding.
Cool, good job!
YES! gamedev++ and a levelup
For some reason made me think of a Breakout clone I made … sometime??? Could have even been before Spacius, certainly before Onslaught…