Jump to content

Search the Community

Showing results for tags 'layers'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 20 results

  1. Hi, i'm having a problem with the collisions in my game. I'm using tilemap layers the character can jump as long as it's not touching the ground, but the moment it touches the tiles that are set for check for collision, it just seems unable to move upwards. Can move sideways tho. Everything else is loaded and displayed just fine. BasicGame.Game = function (game) {}; BasicGame.Game.prototype = { create: function () { this.game.physics.startSystem(Phaser.Physics.ARCADE); this.setUpInput(); this.setUpMap(); this.setUpPlayer(); }, update: function
  2. Hi Been working on a top down car game for quite a while and creating my own render using 2d canvas. Looked at pixiJS and decided to update the render with that to get the benefit from webGL and perhaps other nice useful features that I don't know about yet. I create tiles in photoshop, draw the map in many layers in Tiled and then in my game I pre render all background layers and my foreground layers into 2 large canvases stored in memory which I then use to draw what the player sees based on my camera that is tracking the hero. Now that I'm switching to pixiJS I'm confused ab
  3. Hi guys i have a tilemap with 4 layers(ground, water, roads, others) and a sprite with my character. how i do would for my character can collide with everything inside on others(layer),every layer use a different sprite, example ground use ground.png, water water.png etc, i have this code ( i use https://github.com/lean/phaser-es6-webpack): /* globals __DEV__ */ import Phaser from 'phaser' import Mushroom from '../sprites/Mushroom' import Link from 'phaser-link' export default class extends Phaser.State { super() { } init () {} preload () { this.load.image('terrain', '../../as
  4. Hello. I've been trying to create some levels for my game and I found that the only way for it to work, given my tilesets, would be to create multilayered tilemaps. The problem is I don't know how to load them using Phaser functions and I've been unable to find any existing examples of this in action. Any help would be greatly appreciated. Best regards! Mariusz
  5. Hello, I have an idea for a front-end of sorts. Think of it as Steams big picture mode. The problem I need to solve is to find different ways to achieve the scene I want. Here are the layers that create my scene: 2D layer for background, can have images and animated images, 2D particle effects etc... 3D video layer, so the video can be at different angles, have boarders etc... can also have other 3d objects if desired 3D layer to allow overlap from the layer above 2D foreground layer on top to show information Possibly another 3D layer, unsure, but I wan
  6. Hi guys, I've built one or two small, simple games with Phaser before but this is the first time I'm working with tilemaps. Hopefully someone can offer some advice. I'm working on a topdown game. I created a tilemap in Tiled with 3 layers. (floor, wall 1 and wall 2 ). The problem is I can get collisions to work on a single layer if I combine the wall layers into the same layer as the floor (so I just have one layer), but I can't get the player to collide with a second layer. TLDR: Is is possible to set up tilemap collisions with multiple layers? Thanks in advance. I've been
  7. Hi, I need more rendering groups, is it possible? Cheers
  8. Hello guys! This is my first time here. I have looked through a lot of posts already trying to find the answer, but for some reason nothing is working for me!!! I am using tiled to get the map data and I have included it just fine since I was following the tutorials. So the first layer shows, but as soon as I create another layer that has my objects that will collide with the user, they don't appear. I have no idea what I am doing wrong. I am using the responsive template that came with phaser, which is why everything is in different files and stuff. This is my game.js BasicGame.Game = funct
  9. Hello everyone, I have been struggling with a problem that I can't seem to solve. Don't know if it's lack of pixi knowledge, concept problem or lack of a good night sleep (probably a bit of all). I'm working on a simple game concept, similar to an old game called Jumpin Jack. Consider this image: This scene is composed by 2 sprite types: the red lines (platform) and a white sprite (the hole) moving along the lines (on a top layer). So, each time I want to create a hole, I simple add a new sprite of type 2 and move him accordingly. Problem is, behind this first top layer, I can have
  10. Hi everyone. I am a newbie in phaser and in english I am making a tower defense game,and i need to make 2 different layers. One for the background and one for the sprites. How do I make that? Thanks
  11. 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
  12. I'm relatively new to Phaser (only a few months of experience with it), so it didn't come up until recently that I attempted using tilemaps (which in this case are JSON files generated with Tiled) that have multiple layers. My code works fine with a single layer, but all collision between a layer and anything else stops working when I modify the code to add a second layer. In addition, creating sprites from the object layer (createFromObject) doesn't seem to work either. In my simplest test, the only change was adding a second layer to the map file (both layers share a single tileset), and t
  13. i have one little tiled background image and two layers in tiled .. all of them are only used as background images.. all the collisionareas are polyline objects on different layers.. the problem is always the same.. the performance is so poor - the game is almost unplayable on a nexus7 (this is no low end device you know?!) of course my levels are quite big but this shouldn't matter at all because it's always just the camera view (800x480) that's beeing rendered but hey.. it does matter.. because scrolling tilemap layers still sucks hard.. so i am searching for a neat workaround.. i
  14. For some reason, Mario will just fall through the tilemap layer "Ground". Do I have the collision and physics set up correctly? I used the Starstruck example on the Phaser website, but to no avail. Thanks in advance guys!var game = new Phaser.Game(320, 240, Phaser.AUTO, 'gameCanvas');var map;var tileset;var groundLayer;var mario;var cursorsvar playState = { preload: function() { game.load.tilemap('level01', 'assets/level01.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tiles1', 'assets/mariotileset.png'); game.load.spritesheet('marioSheet', 'assets/marioSheet.png', 16, 25); },
  15. Hi! I am working on a game with kids from the inner city in one of the most dangerous neighborhoods in Canada. I am trying to integrate multiple layers from tiles to control behavior of different sprite classes (like enemies) that have their own collision tiles separate from the player tiles. I cannot actually figure out how to make the physics system recognize any layer but the player's layer. I've been able to get around it before with some tile classes but now I feel I need the enemy to interact with the tilemap separately than the player. Below is some of my code. Please help! The chil
  16. my game map is 200x20 tiles big - i have 7 layers.. most of them have only a few tiles on them except the mainlayer and the icelayer which contain the ground .. the moment the camera starts scrolling with my player (follow player) the performance drops to 30 frames/second. if i comment out all layers except the mainlayer and the icelayer (so 2 instead of 7 layers) the performance is top !! why is that? i thought the layers are being converted to p2 bodies and then handled as bodies?? touching tiles should be converted to one single body so performance would be even better.. i
  17. Hi, first of all: Thank you very much for Phaser! Its just great how much work you keep away and how much fun you give to the developer. I just have a brief question: I built a map with Tiled. The map has 3 layers. The third layer contains the elements the 'player' has to collide with. I loaded the map via tilemap() and added a player sprite via sprite(). Both are displayed, everything works fine. I used 'setCollisionRange' to the tile numbers that occur in layer3 (the colission layer) and in my update() method I call (game.physics.collide(player, map)). I checked my code twice and, co
  18. Hi all, Please find the following link http://collegetomato.com/forDhruva/nanoSWAT/curveMovement/ which I have done using construct2 game engine and it took me almost a week to do this. Considering my programming skill of a designer(who also codes sometimes) it would take more time in Phaser. Can you help me out with a code snippet which simulates the action shown in the link The algorithm I have used is ... I am storing the trails as the player is touching the screen and storing the X,Y, direction (relation between previous consecutive trails) in an array which I am looping throu
  19. in previous versions of Phaser I believe you could use the 'scrollFactor' field to control the scrolling rate of layers, but the 1.1.x releases have removed this. I have worked around this by replacing the 'update' method on TilemapLayer objects which scroll at a different rate than the "primary" layer. for instance, for a 'foreground' layer which scrolls twice as fast as the primary layer I do something like: fg_layer.update = function() { this.scrollX = this.camera.x * 2; this.scrollY = this.camera.y * 2; this.render();};while this works, it is obviously rather brittle (as it re
  20. After reading this article on Samsung Galaxy III on Rich's site, a couple of questions have come to my mind. How many canvas layers do you use in your games? How does this number affect going multi-device? I find using multiple canvas very handy, but I know this might lower the performance when the device or browser is not so powerful. Linked to this, how do you handle the canvas clearing issue? For the moment I'm trying to clear only the changing areas, so i'ts fundamental to have more than one canvas.
  • Create New...