8 years ago by theall
Thanks for your time! I'm working on a top down dungeon crawler. I'm still learning js and I have the 'you don't know js' book series to learn from for any ideas suggested.
Why: After watching a few youtube videos about prototypal inheritance people seem to like create.object() and I like this too. I don't like that you can't look up the prototype chain by declaring objects as functions that declare an instance of an object. I would like to understand the ideal way with impact how to make prototypal classes for entities using object.create() in impactjs.
Questions I generally have for anyone who knows about the magic of impactjs:
Is it right to say that impactjs uses javascript's more classical inheritance model and will bringing object.create() methods into impactjs bring pitfalls?
Is it a functional programming model and should I be thinking that way when using it?
Should I avoid trying to use this model inside impactjs?
I have read
http://impactjs.com/documentation/class-reference/class
And I understand the general idea for extending the entity class
Should I just make a js file and stick it in .requires and then call the specified settings from the file that I stuck in .requires or is this bad in some way?
Thanks so much for any advice.
Why: After watching a few youtube videos about prototypal inheritance people seem to like create.object() and I like this too. I don't like that you can't look up the prototype chain by declaring objects as functions that declare an instance of an object. I would like to understand the ideal way with impact how to make prototypal classes for entities using object.create() in impactjs.
Questions I generally have for anyone who knows about the magic of impactjs:
Is it right to say that impactjs uses javascript's more classical inheritance model and will bringing object.create() methods into impactjs bring pitfalls?
Is it a functional programming model and should I be thinking that way when using it?
Should I avoid trying to use this model inside impactjs?
I have read
http://impactjs.com/documentation/class-reference/class
And I understand the general idea for extending the entity class
ig.module( 'game.entities.player') .requires( 'impact.entity' ) .defines( function() { EntityPlayer = ig.Entity.extend({});
Should I just make a js file and stick it in .requires and then call the specified settings from the file that I stuck in .requires or is this bad in some way?
Thanks so much for any advice.