Sign in to follow this  
cNoob

Could you please tell me if this is good code.

Recommended Posts

cNoob    295
Hello everyone usually when i make games there all in one source file because my games are like pong they dont really need to be object oriented. but guess what I made my first real oop game today it isnt much but i like it. I was woundering if my code is ok for a first oop project. Thank you for taking your time to have a look at it. Any suggestions are welcome( Good/Bad ). Clicky

Share this post


Link to post
Share on other sites
jpetrie    13106
Object oriented programming is conceptual. Putting different modules in different translation units (i.e., using multiple source files) is something that should be done regardless of programming paradigm. In other words, just making multiple source files and using the class keyword does not make your code object oriented.

If the code runs correctly, it is probably acceptable as a good step along the path to becoming a competent programmer (it won't download for me here at work, so I can't actually see it). However, I have a hunch that you might be confused as to what the term "object oriented programming" actually means.

Googling the phrase might help.

Share this post


Link to post
Share on other sites
DeadXorAlive    535
You use classes and multiple files as organization, i'd say it's modular not object oriented but that's okay for this kind of project. How you did it it's very clear to me, I could understand what you are doing by just peeking over the declarations.

Share this post


Link to post
Share on other sites
cNoob    295
Ok thanks for the reply. Appreciate the good comment. So what i have done her ok for simple games like this and like tic tac toe, pong and breakout.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this