Jump to content

  • Log In with Google      Sign In   
  • Create Account


adrian17

Member Since 19 Jun 2013
Offline Last Active Aug 01 2014 11:37 AM

#5071189 [SDL2] A (yet another) simple Pong clone to review

Posted by adrian17 on 19 June 2013 - 12:29 PM

Hi!
As the first step made a simple Pong game, both to get a bit of practice and to have a nice code foundation for future projects. I've used SDL2 and a tiny bit of sdl2_mixer, just to get the hang of it.

I'm quite happy with the code, although I guess some things could have been done better, eg. file structure. The only thing I really don't like is how I had to divide paddle's input functions to InputRight() and InputLeft(), but I didn't know any other good way of doing this (aside from making subclasses for left and right paddle, which didn't seem worth the effort to me).

 

https://github.com/adrian17/pong

(it's also my first time using Git, I hope I didn't mess anything up)

 

Regarding SDL, I have a few small "I have no idea why this happens" issues, mostly regarding toggling fullscreen with SDL_SetWindowFullscreen. For convenience, I've written these in my repo's "issues" section.




PARTNERS