Jump to content
GameDev.net Posting Guidelines (please read before posting)
For Beginners Forum FAQs (please read before posting)
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
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.
Posted 14 February 2013 - 03:16 PM
Posted 14 February 2013 - 03:34 PM
It's hard to say without seeing any code or knowing what exactly you have going into the functions. As a guess though, you could make an Actor class, so each object of that class could be a monster or party member. Then you'd just send in the object by reference to the functions and you have all of those stats / items / etc in just one argument.
I'm not sure what else you'd be sending in?..
Posted 14 February 2013 - 03:42 PM
For this specifically, don’t add a bunch of parameters to the functions.
Some of my functions have 12 parameters, and it is annoying and unelegant to add new features.
Edited by L. Spiro, 14 February 2013 - 03:47 PM.
Posted 14 February 2013 - 03:44 PM
Posted 14 February 2013 - 03:50 PM
Since I edited my posted just after your reply and you probably missed it, be sure to look back on it for the link and the tips within.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.