This is the end of the tutorial. I'd like to write some more extensive examples of how to create a complete game in the engine, can't find the time for this atm. The tutorial itself can probably be improved in many points. Please email me about things that weren't clear or that you would like to see. 

Bento itself is not perfect by all means and still in development. The engine is actually based on Glue, which I worked on in the past. I ironed out a lot of ideas, but some troublesome elements still remain.

These points could be improved:

  • Entities are too bulky atm. E.g. origin, position and boundingbox are integrated standardly, but ideally they should be components. This however, created circular dependencies, since these three are very closely related in many aspects. Components ideally should be independent from eachother. I'm sure there is an elegant solution for this!
  • Lots of getters and setters (such as getPosition) could be better integrated as object property or as components.
  • Component initialization is a messy thing that still needs to be ironed out. When exactly should a component initialize for example? When an entity is added to the game or attached to another entity, the event that propagates through the scenegraph is not always relevant to the component. I noticed this was particularly true for the clickable component.
  • Hierarchical Spatial Hash Grid ( was added, but was deeply integrated in the object manager. Could/should this be moved to a component?
  • The root of the scenegraph is the object manager, but is not part of the scene graph...! The object manager itself should perhaps be an entity (it is not, currently) or at least able to implement some components so root transformations are possible. 
  • Pixi integration is not very smooth, as it's not a stateless rendering engine. It has its own scene graph which poses some difficulties. Definitely not impossible though, so far I can sort of work around the other scene graph, but it's not ideal.
  • Better Tiled integration. In particular: what to do with drawing large backgrounds and perhaps use different renderers 
  • Speed with large number of entities could be better (though this could be seen as premature optimization)
  • Some modules are not part of Bento yet, though I already wrote some. Such as the text module.