Browse files

First whack at better organization

  • Loading branch information...
merriam committed Dec 10, 2012
1 parent c8b5a23 commit 6f43b62da39624ab2a7ff3306a11303528091d0e
Showing with 36 additions and 4 deletions.
  1. +36 −4 tutorial/entities-components/
@@ -1,10 +1,42 @@
layout: tutorial
-title: A Better Way to Structure your Game
+title: Everything Crafty
-Explain why it is better to use components to structure a game than classes and inheritance. Has-a vs is-a
+Crafty is a JavaScript library to help you build HTML5 games. Learning the library will be easier for you if take a moment to understand the Way of Crafty, read through the vocabulary, and map these concepts to a simple game.
+# The Crafty Way
+Here is one attempt at explaining the overall choices in making Crafty. Like the [Zen of Python] (, a short list of principles brings clarity of thought, creates focus in discussions, and is generally regarded as a great invention on par with sliced bread.
+**The Crafty Way**
+The purpose is to help make great games,
+tools are elegant when they help the purpose.
+Every game will be different,
+but there is no need to reinvent everything for each game.
+Inheritence is usually the wrong way to reuse code,
+traits are usually the right way.
+Keystroke count counts,
+but don't be mystical.
+It's better to have one complex call than ten short ones,
+but maybe we can just chain the calls together.
+Games are too small for namespaces,
+and too much organzing hurts more than it helps,
+The code should be in front of you.
+The library should fit in your head.
+# The Magic Words of Crafty
+Every library has a vocabulary of concepts and terms. Each is explained in more detail somewhere else in the tutorial.
+Sprite Sheet
-how is it used. Add, remove, requires
-Things to note about the implementation in Crafty: No namespacing (different components will trash each others variables). object variables in components are shared among all entities with that component.

0 comments on commit 6f43b62

Please sign in to comment.