"Creating the math object inside the Monster" is definitely not clean and tidy. That's coupling the Monster to the math object. Dependency Injection exists to help make sure classes really are reusable. And the "getDinstanceToAnother" is also not a proper method for a Monster cla...
If you keep having to say "you are misrepresenting my position" and also "that's not what I meant", there is chance that instead of "you are all making strawmen arguments" this is a simple case of "I seem to be bad at expressing what I mean". This does, howeve...
I figured it was about time I put a version tag on this and put it out there, especially with Ludum Dare being tomorrow. Looky is designed to help you break your game's views into easily reusable components and to help you to lay them out on the screen. It comes with a set of standard components (te...
Premature optimizing also refers to the act of sacrificing legibility and maintainability to improve the performance of code that has not yet been shown to have unacceptable performance. It's one thing if you can write code that is clean and also fast to start with, but you literally said that "...
And as with any garbage collected language, using pools is always preferable to creating new objects and then discarding them, even if it isn't nearly as clean and straightforward. Etc etc etc. Sounds a lot like premature optimization to me. Unless you're going to be using and reusing a huge number...
When I code, I just concentrate on getting it to work properly, and then on getting it to work faster. That's all the end user would care for, and so it's all what I care for. I'm guessing you don't have any colleagues? Because they would probably care about you writing stuff they can read and unde...
You could give each view a z-index, and hit them in order of z-index with an option on the event to stop propagation. That's basically how HTML/Javascript does it.