SFML community forums

Help => General => Topic started by: jh1997sa on February 21, 2013, 08:25:06 pm

Title: New to SFML - Is there anything wrong with this code?
Post by: jh1997sa on February 21, 2013, 08:25:06 pm
Hey,

I'm very new to C++ and SFML. I've been programming in Java for a few months now but I only started C++ (and SFML) yesterday.

Anyway, I'm creating the hello world of game development, Pong.

If someone could just go through this code and check if there's anything significant which I could improve, it would be much appreciated!

GitHub link: https://github.com/jh1997sa/Game-Development
Title: Re: New to SFML - Is there anything wrong with this code?
Post by: eXpl0it3r on February 21, 2013, 10:55:49 pm
For one of your first application/games with C++ and SFML, your code is extremely good! :)
Clean interfaces and nicely organized code, if only everyone would start off that way... ;)

Here are a few suggestions, how you can make your code even so slightly better:

Other than that I can't really critics more, then again the codebase is rather small so eventual design issues, might only become clear in the future.
Title: Re: New to SFML - Is there anything wrong with this code?
Post by: jh1997sa on February 22, 2013, 12:03:29 am
Well I've made a few simple games with Java so I guess that helps.

Oh and I'm the guy who was on the IRC channel earlier trying to get SFML 2 to work. Anyway I've got it working now so I'll rewrite it using SFML 2 and, well, finish the game.

Thanks for your reply!