-
-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inheritance / composition #15
Comments
Hi Ben, You are completely, completely, completely right ! What you should know also is that although melonJS is a couple of months old in github, It’s actually one more year older, and some code are still “suffering” from the old bad architecture I had back then. Concerning the AnimatedSpriteObject, I was actually waiting to implement a proper sheet format (like texturepacker, or anything else), before breaking/rewrite this and make it nicer.
But until there is some real changes in the code, I don’t see the need to break the actual inheritance model (even if not particularly clean, it’s still functionally, and for what it does, working fine). Olivier. [EDIT] not to mention that rewrite this would allow me to better define the InvisibleEntity Object as well... in case you didn't notice (yet) it :):) |
Hi, |
That would be great, thank you very much :) |
Lots of info for optimizing for Chrome: |
Target for 0.9.6 :
In a few words : |
Ticket #15 - inheritance / composition
@parasyte probably still need some improvements here and there, but one more done :) |
I'm closing this one :) |
Update README & Styling
First Im really not familliar with javascript, got several years of object modeling and C++ dev, but I'm a complete beginner in js... So excuse me if I'm completly out of bound...
Looking at your inheritance model, I feel like there are some oddities :
For example ObjectEntity extends AnimationSheet extends AnimatedSpriteObject extends SpriteObject extends Rect extends Object
I thinkk it should be something like that :
ObjectEntity is composed with AnimatedSpriteobject and entity related data
AnimatedSpriteobject extends SpriteObect and is composed with AnimationSheet
SpriteObject extends Rect
Rect extends Object
That may just sound like purist gibberish though...
The text was updated successfully, but these errors were encountered: