DungeonDame

Members
  • Content Count

    4
  • Joined

  • Last visited

About DungeonDame

  • Rank
    Newbie
  • Birthday 04/23/1991

Profile Information

  • Gender
    Male
  • Location
    Berlin
  • Interests
    Animation, Programming, Level Design, Voice Acting. Also: Poker, Starcraft, Jogging, Guitar
  1. Good to know that's it's not an edge case, I assumed so because I've never seen a resource fail during testing. I guess those that fail I will queue up to load again at the end, so there's a delay between it failing and it reloading.
  2. I noticed in PIXI.loaders.Loader you can set an error handler like loader.on('error', func); and I was wondering what practical applications this has, other than handling the edge case where a user's internet cuts in and out in a precise timeframe. I'm storing my textures on AWS file hosting, so if I attempt to load a texture and it returns an error, I'm assuming the user's internet connection is faulty (Amazon's servers should never be down). Therefore attempting to reload the texture would be pointless, right? Is there any practical benefit to implementing reloading of textures using the error handler when I store textures on AWS? Would anyone recommend I do it? Thanks
  3. Thanks, makes a lot more sense now. I didn't need layers/groups for what I was trying to do, just needed to set the zIndex of the containers or add them to the stage in a certain order. And thanks for writing pixi-display, I see what the purpose of it is now and I'll be making use of it later when I introduce shadows.
  4. Hi! I'm an ex-Flash developer learning Pixi, and I'm confused by the way Groups/Layers/Containers work. When I search Layer or Group in the API documentation, I get no results, so I've just been trying to understand the Z-Order Demo. 1) Is Container obsolete? In the demo comment it says it is, but in the API docs it doesn't. My understanding is that a Container is like a simplified Layer, where I can't specify z-index or inner sorting. So I use a Layer if I need better control over zindex/sorting, and otherwise just use Container? 2) I can see Group does not extend Container (because I can't do addChild on Group), what exactly is a Group? I see when a Layer is created we pass it a Group, which specifies the z-index and sorting. Is that the only purpose of a Group? 3) Does Layer extend Container? 4) Does this test code I wrote use Layers/Groups properly? I want mainLayer to be used for the gameplay sprites (right now just a floor sprite), and uiLayer on top with the user interface sprites (right now just a button sprite). So I add one sprite to each Layer and set the z-indexes using Groups. I'm not using Containers at all. It seems to work fine. function init() { // Application (app) is already created, textures already loaded app.stage = new Stage(); app.stage.group.enableSort = true; this.mainGroup = new Group(0, false); // no sorting needed, just z-index this.mainLayer = new Layer(this.mainGroup); this.uiGroup = new Group(1, false); this.uiLayer = new Layer(this.uiGroup); app.stage.addChild(this.mainLayer); app.stage.addChild(this.uiLayer); this.floor = new Sprite(loader.resources['game/img/floor.png'].texture); this.floor.parentGroup = this.mainGroup; this.mainLayer.addChild(this.floor); this.floor.x = 50; this.uiButton = new Sprite(loader.resources['game/img/uiButton.png'].texture); this.uiButton.parentGroup = this.uiGroup; this.uiLayer.addChild(this.uiButton); } 5) In the code above, what do the first 2 lines with the app.stage do? It seems nothing works without those lines, whereas if I use Containers instead of Layers, I can remove those lines, and app.stage is created automatically when I create app and it works (except for the zindexing). Next time I will try to ask less questions at once. Thanks a lot!