Search the Community

Showing results for tags 'problem'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 89 results

  1. Hello all. I am having a browser-specific issue with Phaser 2.10.0 that I cannot seem to understand. I have the following code for a button. minDimension = Math.min(game.width, game.height); resetButton = game.add.sprite(game.width * 0.5, game.height * 0.925, 'Reset'); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; resetButton.inputEnabled = true; resetButton.events.onInputDown.add(resetProcess, this); This puts a reset button image at the middle of the bottom of the browser window. As expected, when clicked or tapped, the resetProcess() function is called and the level in my game is reset. This works as expected in most browsers on desktop and mobile; however, in Android Chrome (in my case, Android 7.0.0 and Chrome 64.0.3282.137) the button appears but does not do anything when clicked. I verified that the issue is not in my resetProcess() function. It seems that the onInputDown event isn't working properly. I also tried the following code, using a button instead of an image. minDimension = Math.min(game.width, game.height); resetButton = game.add.button(game.width * 0.5, game.height * 0.925, 'Reset', resetProcess, this); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; This caused behavior identical to the snippet above. Previously, a few months ago, I was able to get my button working as expected no matter the browser, and no changes were made to this part of my code since then. Does anyone have any thoughts as to what might be causing this issue, and how to fix it? Thanks.
  2. Mrblah

    First Game : Help

    i need a little help getting my code to work. I can't get the star score to increase. i can only make it go NAN... HELP ? "Making you own game" on the last part i'm having trouble making tht work.
  3. Hello! I'm new to Phaser and HTML5 game development (but not to JS), and have been going through a few free tutorials online. I've already done the mobile toddler's game tutorial, and a simple sidescroller game tutorial, great fun so far! Today I tried to follow an infinite scolling game tutorial (not the same author and not as well written as the first two I followed), but I can't get it to work... The dog falls through the ground on collision with the fleas, and stays stuck down there while the game keeps scrolling. The dog also falls through the ground also after the digging animation... I compared my game.js code to the author's Game.js code, line by line, and didn't see anything missing – I even went so far as to reorder everything the same way she did (the other files were quasi-identical). This is what I found: If I only paste the author's code in place of mine: the game still doesn't work as expected. If I only use the phaser.js v2.1.3 file (from the downloadable source files), instead of the phaser.js v2.6.2 file I use: the game still doesn't work as expected. If I use both the author's Game.js file and phaser.js v2.1.3: the game works! I think that the article must be missing something that can be found in the author's code, because I followed the tutorial exactly. But given that swapping her code for mine still doesn't fix the game, does anyone have any idea what might be causing the player to fall through the ground on collision/overlap? Might it have something to do with gravity, or other physics in Phaser 2.1.3 vs 2.6.2? Thanks in advance!
  4. Maxli

    Very slow rendering

    Hello everyone, I just upgraded my project from Phaser CE to Phaser 3 (latest beta) and I noticed that framerate has dropped down dramatically. I know that version 3 is using custom renderer and not Pixi, but as I understand, the WebGL version should have similar performance as the original Pixi renderer. I have just a single isometric scene with 64x64 tile sprites, every sprite is 80x40 and there are 128 single textures. Before upgrade, I got solid 50-60 FPS, now I can barely move the camera without FPS dropping under 15 FPS. Has anyone actually tested the rendering performance of Phaser 3? Thank you for any hint, Have a nice day, Max.
  5. Greetings! I had an idea for the organization to move the camera when the cursor to a specific side of the screen, for example - have brought the cursor to the top of the screen, the camera moves up. Brought down - the camera moves down. But I do not know how to organize it. There is another problem with importing models from 3ds Max 2015 models do not rotate absolutely nothing, no one axis. Tried already and simple rotation, and rotation directly in 3ds Max. Even tried to change the angle of the file .babylon. Nothing changes. Blender model of spin, but their appearance does not suit me, the model curve. Also wanted to ask. Is it possible for someone to ask for help (direct support), can somebody help me a little bit in the course of writing my project?
  6. RobiNERD

    OBJ Exporter help?

    So, with some googling i found this... the problem is, it's in TypeScript (I don't know what this is even)... I don't know how to implement this any time i try using this i get unexpected identifiers. (I also noticed this TypeScript language is really similar to c# lol). So how would i use this... I know this is very nooby but meh
  7. DavidRkoder404

    Problems in Landscape mode

    Hi everyone!, I've just started to use Phaser's framework, so I don't have enought knowledge about it. I did a game (test it here), it works well on pc's browser. The problem were when I tried to do it mobile friendly. I tried to do that (on boot's state): if (!game.device.desktop) { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.refresh(); } When I test it in my phone (portrait mode) it works good . The problem is when I rotate the screen (landscape mode), it doesn't scale well(I can't see the bottom). Portrait view: Landscape view: (I can't see the bottom) What is the problem ?? Thanks!!
  8. Can anybody explain me why pointer event (mouse and touch events) does not work in Edge browser ? It Works well with Chrome FireFox Opera! What is difference? Is there any better way to handle (mouse and touch events) in all browser same? You can try and see difference between Edge and Chrome/Fierefox/Opera in this example/game. (here I use hand.min.js) Is there any better alternative of hand.min.js ??? Is there any bug in Edge browser or BabylonJS's hand.js? https://ajna4taiga.tk/PerplexusShadowOpen/PerplexusProd.html Edge problem: When I release any of WSAD key it has longer delay only in Edge (Windows) Browser. Is there any batter way to handle (mouse/touch evnets) with javascript? greetings Ian
  9. Hello! I'm still new working with the framework. So, I got a player that for now dies if collides with another sprite or if it falls out the world (sprite !inworld, so kill it and restart), and when it dies, it displays a message and I put a black picture that I set alpha = .7 behind the text. When the player collides with the sprite everything is OK, but when it falls out the world the dark picture shows it without trasparency! I also tried loading a picture already with transparency edited with photoshop, so I shouldn't set the alpha property in phaser, but same result! Looks like a bug, but idk, I tried some things but ended in same result! here's my Play state: var play = { create: function () { this.cursor = game.input.keyboard.createCursorKeys(); this.jump = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); this.xKey = game.input.keyboard.addKey(Phaser.Keyboard.X); game.world.setBounds(0, -400, 2500, 1000); //Fisicas game.physics.startSystem(Phaser.Physics.ARCADE); game.world.height = 1000; //fondo game.stage.backgroundColor = "#00FFFF"; //capa invisible //this.fondoInv.alpha = 0; //codigo de plataformas this.walls = game.add.group(); this.walls.enableBody = true; game.add.sprite(0, 553, 'plataforma', 0, this.walls); game.add.sprite(300, 400, 'plataforma', 0, this.walls); game.add.sprite(600, 300, 'plataforma', 0, this.walls); game.add.sprite(1000, 300, 'plataforma', 0, this.walls); this.walls.setAll('body.immovable', true); //asi no se caen //plataforma que se cae this.wall2 = game.add.sprite(1800, 300, 'plataforma'); game.physics.arcade.enable(this.wall2); //cosa que mata this.asesino = game.add.sprite(1200, 220, 'asesino'); game.physics.arcade.enable(this.asesino); this.asesino.body.immovable = true; //tipo this.player = game.add.sprite(125, 500, 'tipito'); this.player.anchor.setTo(0.5, 1); game.camera.follow('tipito'); game.physics.arcade.enable(this.player); this.player.body.gravity.y = 800; //this.player.body.collideWorldBounds = true; (PRODUCE BUG CON game.world.setbounds) //animaciones this.player.animations.add('correr', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], true); }, update: function () { //this.walkVelocityR = this.player.body.velocity.x = 200 //this.walkVelocityL = this.player.body.velocity.x = -200 //this.jumpVelocity = this.player.body.velocity.y = -400 game.physics.arcade.collide(this.player, this.walls); game.physics.arcade.collide(this.asesino, this.walls); game.physics.arcade.collide(this.player, this.wall2); game.physics.arcade.overlap(this.player, this.asesino, this.playerDie, null, this) //this.platforms.body.checkCollision.down = false; game.camera.follow(this.player); if (!this.player.inWorld) { this.playerDie(); } //salto mientras camina if ((this.cursor.right.isDown || this.cursor.left.isDown) && this.jump.isDown && this.player.body.wasTouching.down) { this.player.body.velocity.x = 380; this.player.body.velocity.x = -350; this.player.body.velocity.y = -500; //derecha } else if (this.cursor.right.isDown && this.cursor.left.isUp) { //this.cursor.left.enabled = false; this.player.body.velocity.x = 380; this.player.animations.play('correr', 5, true); this.player.scale.x = 1; //izquierda } else if (this.cursor.left.isDown && this.cursor.right.isUp) { //this.cursor.right.enabled = false; this.player.body.velocity.x = -380; this.player.animations.play('correr', 5, true); this.player.scale.x = -1; }else { this.player.body.velocity.x = 0; this.player.animations.stop(); this.player.frame = 4; } //salto if (this.player.body.wasTouching.down) { this.jumps = 1; console.log(this.jumps) } if (this.jumps > 0 && this.jump.justDown){ this.player.body.velocity.y = -500 this.jumps--; console.log(this.jumps); } }, render: function () { //game.debug.inputInfo(32,32); game.debug.key(this.cursor.right, 50, 50) }, playerDie: function () { this.player.kill(); this.fondoInv = game.add.sprite(game.camera.x, game.camera.y,'fondoInv'); this.fondoInv.alpha = .77; var perdiste = game.add.text(game.camera.x + (game.width/2), game.camera.y + (game.height/2), "You have lost", {font: "65px Arial", fill: "#ff0044", align: "center"}); perdiste.anchor.set(0.5,0.5); perdiste.fixedtoCamera = true; game.time.events.add(4000, this.start, this) }, start: function () { game.state.start('play'); } } Thanks for helping!
  10. Rich Kitten

    Download Problem

    Downloading MelonJS (mini) throws up error 800A0404. The case is similair with other versions. I've looked everywhere for a solution but can't find one! am i the first person to have this issue? How do i solve it? please?
  11. Igor Georgiev

    CSS and Phaser input problem.

    Hey guys, I have made some scaling of the game via CSS so I can have my game always the proper size in the browser window. However, I lose my onInputDown because for some reason the game container overflows but visually is okay.... here is my CSS styling (visually it looks perfect): html { height: 100%; margin: 0; padding: 0; } body { height: 100%; margin: 0; padding: 0; } #content { height: 100%; } #content > canvas { margin: 0 auto; height: auto !important; width: auto !important; max-height: 100%; max-width: 100%; position: relative; top: 50%; transform: translateY(-50%); } Here is my game init class: import Boot from 'states/Boot'; import Preload from 'states/Preload'; import GameState from 'states/GameState'; import * as Constants from 'data/Constants.js' class Game extends Phaser.Game { constructor() { let height = window.screen.height; let width = window.screen.height / Constants.SIXTEEN_TO_NINE; super(width, height, Phaser.AUTO, 'content', null); this.state.add('Boot', Boot, false); this.state.add('Boot', Preload, false); this.state.add('GameState', GameState, false); this.state.start('Boot'); }; } new Game(); If I don't have any css code - the input works. I believe it is because the game is still bigger than what it visually appears. Has anyone had this issue?
  12. https://www.dropbox.com/s/l2l67aququd7she/Patch.babylon?dl=0 or https://ajna4taiga.no-ip.org/BabylonBall/Patch.babylon Hire is playground which doesn't work ok any more http://www.babylonjs-playground.com/#CKEHJ#1 or http://www.babylonjs-playground.com/#CKEHJ#3 How can I load my .babylon file from dropbox or my server? This code has worked. What is goging on now? I see with F12 new problem XMLHttpRequest cannot load https://ajna4taiga.no-ip.org/BabylonBall/Patch.babylon. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.babylonjs-playground.com' is therefore not allowed access. But this things has worked before. How can I make this example to work again? Any alternatives? (I also try like this http://www.babylonjs-playground.com/#YEKUO#1 set data (copy/paste from .babylon file) but here is problem with string of data ! I try \" and \' also but no luck.) I would like to make some playground to ask something and I can't meke playground to load .bayblon file. Greetings Ian
  13. I need help. I was following a tutorial online for the Phaser States, and I did everything right (I think), but obviously, I've made some changes myself to fit to what I kind of want. Here is the code: var loadState = { preload: function() { // Load the BG Images (Before so we can have an awesome looking loading screen) game.load.image('redPlanet', '././assets/images/redplanet.png'); game.load.image('spaceBG', '././assets/images/spaceBG.png'); // Preload the one character we need to look awesome! game.load.image('scavenger', '././assets/images/Scavenger.png'); // Add the loading label and the character, so the player doesn't think the game crashed. var background = game.add.sprite(0, 0, 'spaceBG'); background.scale.setTo(0.6); var character = game.add.sprite(80, 150, 'scavenger'); var loadingLabel = game.add.text(0, 0, 'Loading...', {font: '30px Courier', fill: '#fff'}); loadingLabel.alignTo(character, Phaser.RIGHT_CENTER, 16); // Load the Planet Images game.load.image('planet1', '././assets/images/Planet1.png'); game.load.image('planet2', '././assets/images/Planet2.png'); game.load.image('planet3', '././assets/images/Planet3.png'); game.load.image('planet4', '././assets/images/Planet4.png'); game.load.image('planet5', '././assets/images/Planet5.png'); game.load.image('planet6', '././assets/images/Planet6.png'); game.load.image('planet7', '././assets/images/Planet7.png'); game.load.image('planet8', '././assets/images/Planet8.png'); game.load.image('planet9', '././assets/images/Planet9.png'); game.load.image('planet10', '././assets/images/Planet10.png'); game.load.image('planet11', '././assets/images/Planet11.png'); game.load.image('planet12', '././assets/images/Planet12.png'); game.load.image('planet13', '././assets/images/Planet13.png'); game.load.image('planet14', '././assets/images/Planet14.png'); // Load the pause button game.load.image('pauseButton', '././assets/images/pauseButton.png'); } create: function() { game.state.start('menu'); } } And that is not all. Every single one of my state files has an error that says: Expected '}' to match '{' from line 1 and instead saw 'create'. Missing Semi-Colon. Unrecoverable Syntax Error (93% Scanned) Please help me, as this was going to be the way I made my game because I really like how organized states are!
  14. Hello I started playing with phaser, some time ago. But now i wanted to try something new, something like Websocket + phaser. And i stuck :/ So, i want to make multiplayer "Game" but i stuck, i cannot happen that game will be still working in background. It should be working that i m logging at 1st tab and sprite is apearing, than i m logging at 2nd tab and on first another sprite is apearing but on different position. So at the end, at the 1st tab will be 3 sprites, or more, depends how many tabs you will open. Sry for my bad engladno :/ I hope you understood something. My code: Client: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var player; var cursors; function preload() { game.load.image('med1','client/assets/Unit/medievalUnit_01.png'); } function create() { game.stage.disableVisibilityChange = true; game.physics.startSystem(Phaser.Physics.ARCADE); cursors = game.input.keyboard.createCursorKeys(); game.input.mouse.capture = true; ws.send('NewPlayerJoined',nick); player = game.add.sprite(0,0,'med1'); player.nickname = nick; game.physics.enable(player, Phaser.Physics.ARCADE); ws.onmessage = function(data){ game.add.sprite(Math.floor((Math.random() * 100) + 1),Math.floor((Math.random() * 200) + 1),'med1'); console.log("NewPpl"); }; } function update() { if (cursors.left.isDown) { player.body.velocity.x = -100; }else if (cursors.right.isDown) { player.body.velocity.x = 100; }else{ player.body.velocity.x = 0; } if (cursors.up.isDown) { player.body.velocity.y = -100; }else if (cursors.down.isDown) { player.body.velocity.y = +100; }else{ player.body.velocity.y = 0; } } SERVER: const express = require('express'); const http = require('http'); const url = require('url'); const WebSocket = require('ws'); const app = express(); var players = {}; __dirname = 'E:/WebstormProjects/TestWorkingServer'; app.get('/',function(req, res) { res.sendFile(__dirname + '/client/index.html'); }); app.use('/client',express.static(__dirname + '/client')); const server = http.createServer(app); const wss = new WebSocket.Server({ server }); wss.on('connection', function connection(ws) { console.log("New Connection"); ws.on("message",function incoming(data) { ws.send("sumf"); }); }); server.listen(2000, function listening() { console.log('Listening on %d', server.address().port); });
  15. Hello, I've recently encountered a very strange behavior on a specific PC. I've been testing about 10 Phaser puzzle games, which use various tweens for visualization. I've played the games on quite a few desktop PCs, including a Mac, and more than 10 different mobile devices, Android and iOS. On only 1 of the PCs all games exhibit an aberrant behavior where tweens seem to be running slower than their duration states. I couldn't find anything in the Internet about what could cause this issue. Even a simple alpha tween with a certain duration, no delay and autostart is acting weird. Phaser 2.4.6 is used. The issue is experienced in Chrome, currently the latest version, but I've noticed this behavior in earlier versions in the past months. On Edge everything runs as intended. If anyone has any idea or solution, please share.
  16. rickydamta

    sprite.tint white color problem

    Hi! I am new to phaser. I have a sprite called Ground in the group called Platforms var platforms = game.add.group();platforms.enableBody = true;var ground = platforms.create(0, game.world.height - 30, 'ledge');The ground sprite has to be white,I use this line of code for that ground.tint = 0xffffff;I don't know why but it does not work with the color white,it works with any other color but not with white. Thanks for help
  17. DanielApNa

    Canvas not visible on Safari

    Hello, We are making a game with Phaser and works perfect in all the browsers except in Safari (iPad). It's pretty strange becouse the game seems to be running becouse we can hear the music, but the canvas is not displayed... Few seconds later the game is destroyed... We can't use the remote debugging becouse we don't have any Mac to conect the IPad... (Phaser Version: 2.6.2 / IOS version: 9.3.2) Please help!! Thank you
  18. Hi!, I'm new to Phaser, I just started a day ago and it looked pretty interesting, But lately I've been having some problems with certain sprites that will break the game if I try to add them as an animation (will go into a black screen as soon as starting), and if i try to stop all animations and start the game with no animations, trying to see the sprite at least frozen, the game will just show any other sprite on the list avoiding the 'broken' sprite. I'm using a JsonHash from TexturePacker (the trial version) "walk/07": { "frame": {"x":113,"y":2,"w":38,"h":48}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":38,"h":48}, "sourceSize": {"w":38,"h":48} }, "walk/08": { "frame": {"x":112,"y":110,"w":39,"h":46}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":39,"h":46}, "sourceSize": {"w":39,"h":46} }, "batk/01": { "frame": {"x":2,"y":54,"w":39,"h":52}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":39,"h":52}, "sourceSize": {"w":39,"h":52} }, "batk/02": { "frame": {"x":43,"y":165,"w":33,"h":51}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":33,"h":51}, "sourceSize": {"w":33,"h":51} }, "batk/03": { "frame": {"x":2,"y":2,"w":64,"h":49}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":64,"h":49}, "sourceSize": {"w":64,"h":49} }, "batk/04": { "frame": {"x":69,"y":2,"w":41,"h":49}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":41,"h":49}, "sourceSize": {"w":41,"h":49} }, "batk/05": { "frame": {"x":77,"y":110,"w":32,"h":52}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x":0,"y":0,"w":32,"h":52}, "sourceSize": {"w":32,"h":52} }, Here's part of the Json, the sprites that wont work are the "batk/**". And the meta "meta": { "app": "http://www.codeandweb.com/texturepacker", "version": "1.0", "image": "Kenshin.png", "format": "RGBA8888", "size": {"w":237,"h":218}, "scale": "1", "smartupdate": "$TexturePacker:SmartUpdate:5c2cc8f899f401916073813f8a57c05c:859f44caf8d84d1347ca0147886ae398:b98d3e23e0675afb80a9fc68a5d2d511$" } I remade the Json and the png and still the same sprites won't work. KenshinChar = game.add.sprite(36, game.world.height - 120, 'Kenshin', 'batk/03'); Tried to start the game with a bg and basically just one of the sprites, without animation and it avoided the sprite showing the first sprite of the Json. Here's the whole png. and these are the ones that won't work. I'm just trying the framework so I borrowed some sprites from a certain ds game. I have absolutely no idea what's happening, sorry if it's something dumb I'm missing.
  19. So I'm not sure if this is a bug or maybe I've just not configured the camera correctly. I have a scene that's the interior of a building and the interior is made of a bunch of room meshes joined together. I have it so that when you click on a room the camera sets that room mesh as its target. If I try to pan the camera(ctrl and mouse drag) after clicking on a room the whole interior pans except for the room that I clicked on which stays in the centre of the screen, separated from the rest of the rooms. Any way to remedy this? I'm using an ArcRotateCamera by the way. Example of what I mean: http://www.babylonjs-playground.com/#18KHF6#0 Click on sphere2 and then pan the camera (ctrl and mouse drag).
  20. WiLD11

    Arcade Collision Problem

    Hello! There is this really weird problem that I can't seem to fix. So the problem is when my player's body collides with a particle body, it does some really weird stuff Here is how I'm checking collision: game.physics.arcade.collide(coin.coin, player.coinCol, function(player, coin) { pizza.coins += 1; coin.destroy(); }, null, this); The coins are part of a particle emitter, which gets set off in above the player this.coin = game.add.emitter(totem.x, 100, 0); this.coin.makeParticles('particle'); this.coin.setAll('anchor.x', 0.5); this.coin.setAll('anchor.y', 0.5); this.coin.gravity = 500; this.coin.width = 30; this.coin.height = 10; game.physics.arcade.enable(this.coin); When the coin falls, and the player's body touches it, it works like it should. But when it touches the world boundaries at the same time, it somehow doesn't work. The player is made up of two bodies, one is the totem collision box, which is set at the top of the player, and one that is the coin collision box which covers the whole player. Here is how I'm setting up the coin collision box this.coinCol = game.add.sprite(game.world.centerX, game.height); this.coinCol.scale.setTo(5, 6); this.coinCol.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(this.coinCol); update... this.coinCol.x = this.player.x + 100; this.coinCol.y = this.player.y-this.player.height/2; If there is only 1 coin in the scene and it touches the boundaries, it works as expected. I have some ideas about how this might have happened, but I want to hear what other have got to say. Thanks!
  21. Hey guys! I have a export problem in Unity for my architecture visualization(for web). Everytime I export from Unity for BabylonJS I only get 1 picture where are missing some details like the backgroung or the windows. Here you can see what I want to export: Here are the results of the rendering from the BabylonJS exporter for Unity: - http://prntscr.com/bi7ufs - http://prntscr.com/bi7vbc - http://prntscr.com/bi7vrp And here are my current settings in the BabylonJS exporter for Unity: - http://prntscr.com/bi86rc Can me anyone help with this problem? :c
  22. Hi, I ran across an issue with the setTileIndexCallback method involving it triggerring multiple times. I have a health potion tile in my game and I would like for it to disappear when my player collides with it as well has add 1 to a variable storing the amount of health potions the player has collected. The problem is that the health potion doesn't disappear until my player's sprite actually collides with the health potion tile but the callback function triggers as long as part of my player is touching or inside the 32x32 box around the health potion, which is smaller than 32x32. Therefore, my variable the stores the amount of health potions collected increases infinitely as long as my player is in the 32x32 box but hasn't touched the health potion image. Here's my code relating to this issue: Inside the create function: var healthPotionCounter = 0; map.setTileIndexCallback(9, function(){this.collectHealthPotion(game)}, this); Inside this.collectHealthPotion(game) function: map.putTile(-1, layer1.getTileX(player.x), layer1.getTileY(player.y)); healthPotionCounter += 1; Help is much appreciated! Thank you!
  23. rachid

    input text/select + cocoonjs

    hi, i'm very new to phaser, i almost finished my first game using it. but i'm facing a problem wrapping my game using cocoonjs . the problem in the input fields, i used a plugin called phaser-input it doesn't have <select></select> option and its unfillable after wrapping . i tried integrating regular html form and it disappear in mobile, you can see my game in : http://goo.gl/IJI9jO can you please guide me how to make inputs that can be desplayed in mobile after wrapping ... Sorry for the bad english, thank you PS:in game play i reduced the FPS to 25 as the performance in mobile using cocoonjs is bad in 60FPS...
  24. Hi. I have a problem with multiple levels (game states). What can I do when, I don't want to write the same piece of code in each level over and over? I've tried to create a function in separate js file which e.g. will set player sprite, gravity, animations or will create necessary variables etc. And I failed this. Everything what I have got are errors.
  25. Hi, so first thing i'm new to this, 3d modelisation and babylon.js so i'm kinda of a huge noob, but anyway. I started to work on this demo http://www.babylonjs-playground.com/#8EUPP#1. It seems like i get very bad performance from firefox compared to chrome. Do you have an idea why ? you can try the demo on the playground or i hosted the demo on my website : www.fleurantmaxime.com Thx !