Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!

Thank you.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 LAURENT*   Members   -  Reputation: 281


Posted 23 June 2014 - 12:18 PM

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.


#2 Servant of the Lord   Crossbones+   -  Reputation: 24069


Posted 23 June 2014 - 01:12 PM

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.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]

#3 cozzie   Members   -  Reputation: 2763


Posted 23 June 2014 - 01:38 PM

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

#4 L. Spiro   Crossbones+   -  Reputation: 18208


Posted 23 June 2014 - 01:41 PM

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



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



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



L. Spiro

#5 Paradigm Shifter   Crossbones+   -  Reputation: 5556


Posted 23 June 2014 - 01:51 PM

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

#6 LAURENT*   Members   -  Reputation: 281


Posted 23 June 2014 - 02:04 PM

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.

Edited by LAURENT*, 23 June 2014 - 02:09 PM.

#7 cozzie   Members   -  Reputation: 2763


Posted 23 June 2014 - 05:23 PM

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

Edited by cozzie, 23 June 2014 - 05:23 PM.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.