Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


#ActualL. Spiro

Posted 14 February 2013 - 03:47 PM

Obviously, going object-oriented is generally a good decision, but without knowing anything else about your game there is nothing more to say on that topic.

Some of my functions have 12 parameters, and it is annoying and unelegant to add new features.

For this specifically, don’t add a bunch of parameters to the functions.
Add a structure as a parameter and pass it as a reference. It is quite easy to add new data to the structure when you want to send more to the function.


There are a ton of other things to consider listed here: http://lspiroengine.com/?p=126
Especially the “Structure” section.


L. Spiro

#1L. Spiro

Posted 14 February 2013 - 03:42 PM

Obviously, going object-oriented is generally a good decision, but without knowing anything else about your game there is nothing more to say on that topic.

Some of my functions have 12 parameters, and it is annoying and unelegant to add new features.

For this specifically, don’t add a bunch of parameters to the functions.
Add a structure as a parameter and pass it as a reference. It is quite easy to add new data to the structure when you want to send more to the function.


L. Spiro

PARTNERS