parkm / oldbpm

A JavaScript game where you shoot at bubbles.
0 stars 1 forks source link

Rendering #2

Closed dgpt closed 10 years ago

dgpt commented 10 years ago

Abstracted rendering code using Pixi. Provide a front-end API for use in States and Objects (if necessary).

parkm commented 10 years ago

I'm not quite sure on how to distance the rendering stuff from the object stuff. I'm thinking that to render an object you'd have something like this in the object class

PIXI.GraphicInstance g;
addToPixiRenderer(g);

I need to do a bit more research on how Pixi does batching so this may change. This style should work easily for most things, but yeah for bubbles we definitely need the most efficiency.

dgpt commented 10 years ago

At the very least, wrap it in a render module. We shouldn't be seeing any Pixi code in the project, only wrappers we've made of Pixi.

parkm commented 10 years ago

Yeah i'll do that. There are some util functions I need to add for it anyway.

dgpt commented 10 years ago

Is this good to close?