Thank you.

Started by
5 comments, last by cozzie 9 years, 9 months ago

I've taken a bit of a hiatus but I now know my capabilities better. I made a thread asking how to structure your code. I got plenty of support but it took me a long time to digest the info. I've finally come up with a technique that works for me. I finally K,I,S,S the code. I would like to share my results. A super class that handles everything organized by fancy comments. I can easily locate all my problems, it's simple, and still very organized. My plan went so well, introducing gravity to this game of mines was easy.

Again thanks.

Advertisement

When beginning in programming, as you learn more and more, you'll continue to find that your current techniques aren't the best, and will learn better techniques later.

For example, what you've described as "a super class that handles everything" sounds like a God Object, which is an anti-pattern - that is, something that is commonly recognized by professionals as A Bad Idea). Just because gravity was easy to implement that doesn't mean the entire game will be.

If it's current working for you, fine. But it's almost certainly not the best way to do things - however, it's more important to finish your current project than to try to try to write the project perfectly, and to continue to apply your new knowledge and new experience to code the next project better. By the end of every project, I know more than when I started it - even eight years later, I'm still learning better ways to code.

Good to hear, I share the experience on gamedev.net

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

I don’t know in what topic you got what advice, but if what you took from it was to make a super class…

Geekation_piccardDoubleFacepalm.gif

You asked for advice and walked away with the worst possible strategy. I am literally at a loss for words.

3Jauxrw.jpg

Read Servant of the Lord’s reply. Over and over and over and over and…

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Captain, my sensors are detecting large amounts of troll-food in this sector.
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

I was told to be simple. Whoops....... I'll try not to make god objects next projects. Function definitions are still separate from the class. They even get their own c++ file. Matter of fact variables and functions within the super class are separated into very specific categories among the same data type.

I think you should compliment yourself on learning and taking next steps.

You won't go from A to Z in one step, probably creating more classes from your now big class, will be easier today (with the knowledge you gained) then say a year ago.

Good luck

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

This topic is closed to new replies.

Advertisement