• Content Count

  • Joined

  • Last visited

  1. I see, so it really makes more sense to talk about containers rather than layers. So I would create a background container that just contains a background image or something like that. Then I would create a foreground container that contains all the game elements, but every game element is wrapped into a container so that I can easily add shadows etc later on. So something like that: masterContainer |-backgroundContainer | |-background graphic |-mainContainer | |-blockContainer1 | | |-block graphic | | |-shadow | |-blockContainer2 | | |-block graphic | | |-shadow | |-blockContainer3 | | |-block graphic | | |-shadow | |.... | |-playerContainer1 | | |-player graphic | | |-player name tag | | |-shadow | |-playerContainer2 | | |-player graphic | | |-player name tag | | |-shadow | |.... | |-bombContainer1 | | |-bomb graphic | | |-shadow | |-bombContainer2 | | |-bomb graphic | | |-shadow | |.... | |-explosionContainer1 | | |-explosion graphic | | |-shadow | |-explosionContainer2 | | |-explosion graphic | | |-shadow | |.... | |-itemContainer1 | | |-item graphic | | |-shadow | |-itemContainer2 | | |-item graphic | | |-shadow | |.... | |-itemContainer1 | |-item graphic | |-shadow |-overlayContainer |-scoreContainer | |-kills/deaths text |-statsContainer |-playerSpeedContainer | |-player speed icon | |-player speed text |-playerBombLimitContainer | |-player bomb limit icon | |-player bomb limit text |-playerExplosionRange |-player explosion range icon |-player explosion range text And when a player moves, I guess I just move his container around etc?
  2. I have to criticize a couple of things: Plaintext passwords: Passwords should never be transmitted in plaintext! Especially not when your domain clearly has a TLS certificate. Yet it's happening even when you're on the HTTPS page. HTTP dy default: Almost all links on this site appear to be HTTP, leaking your cookies, making session hijacking child's play. Using captchas during registration and then still requiring manual moderator approval: Super annoying.
  3. I'd like to write a bomberman-like game with using pixi.js v5 as the rendering engine. I was wondering what the best practices are when it comes to layers. I assume it wouldn't make sense to create 1 layer per game element. Would it make sense to put everything into 1 layer? Or should I put the background (which never changes) into one layer and the rest into another one? Or should I maybe put all players (constantly moving game elements) into one layer and everything else into another layer? Or maybe every type of game object should go into one layer? Players, bombs, items, invulnarable blocks, normal blocks, explosions, background ... I'm also wondering if I should use layers as in: this.stage = new PIXI.Container(); this.backgroundLayer = new PIXI.Container(); this.mainLayer = new PIXI.Container(); this.stage.addChild(this.backgroundLayer, this.mainLayer); or if I should use the pixi.layers plugin?