im developing a game in android, and i’ve been thinking about subdividing many of the elements of the game (e.g. game objects) into separate classes and sub-classes. but i know that method calls to these objects will cause some overhead. would it be better to improve performance or to improve extensibility?
im developing a game in android, and i’ve been thinking about subdividing many of
Share
Only you can answer that question – some games require the utmost in performance, others become so complex that ease of extensibility is the only way to go.
Bear in mind though that the ‘overhead’ you’re referring to is likely to be VERY small – nearly infinitesimal – and should not be high on your list of concerns for any initial release.
Remember too that it’s always easier to extract performance later, the same can not be said of extensibility.
Finally, note that premature performance tweaks frequently fail. Ascertaining where the performance bottlenecks are can seldom be predicted, testing in situ is far more like to yield good results.