Jump to content

Couple of starter PIXI questions


drmop
 Share

Recommended Posts

Hi, 

 

Just assessing PIXI as a potential replacement for the rendering portion of my game engine and have a couple of questions:

 

1) In my engine I have separate scenes, each scene contains a bunch of stuff, for example, one scene could contain the HUD, another could be game level1, another level 2 etc.. Is it feasible for me to have a separate stage for each of these scenes? Or is it recommended to have only a single stage?

 

2) Can a stage have a transparent background?

 

3) I cannot seem to find anything related to sprite layering, is this supported?

 

Thanks

 

Mat

 

 

Link to comment
Share on other sites

Stage can have a transparent background 

 

PIXI.autoDetectRenderer(renderWidth, renderHeight, {'transparent':true}); 

 

i think its better to have 1 stage with many DisplayObjectContainer .. 

 

For sprite layer its just set when you add something to a stage ..

Exemple :

stage.addChild(object1); layer 1 

stage.addChild(object2); layer 2 ..

Use DisplayObjectContainer  to have many item on 1 layer

 

See the documentation it will help you alot .. im still a new user from pixi but i respond my best

Link to comment
Share on other sites

Thanks for the reply. So basically I can derive my Scene from DisplayObjectContainer  or just create an DisplayObjectContainer and add that to the stage?

 

I think PIXI ideally needs some kind of programming guide, at the moment I'm finding reading the source more informative than API reference as its difficult to pick up context from API docs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...