Wednesday, February 9, 2011

Refactored components

Last night I decided to refactor the components. This has been something I've wanted to do for a while. Components were getting messy because they were all bundled together in one package. With the new namespace, it now makes more sense than ever.

I left the base components in the "components" package (except for base physics components) and added the five types of components as packages, plus a sixth to separate physics (a special breed of component which deserves its own package anyway). The two working demos (vector and physics) were updated so they will run. I still need to do the sprite demo and fix a nagging bug in the editor, so that will be next.

Some components were renamed, so pay special attention to those. The ones most affected were the input and collision components where I removed the "Input" and "Collider" text. I figured that was pretty redundant now that the package indicates type. Let me know your thoughts on this.

2 comments:

  1. 2 first demos in '2.0 sneak peek' are not working :(

    ReplyDelete
  2. Yes, those aren't currently converted. I need to put a note on the page that says "These demos may be non-functioning since they run from the development code repository." During code updates and refactoring there are changes which occur that break references and updating all of the demos, repeatedly, is problematic. That's why they are "Sneak Peeks".

    ReplyDelete