Search the Community

Showing results for tags 'bug'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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

Found 155 results

  1. Bug, or i don't understand well

    I have this scene, and whenever the zombie touches my debug object, it should turn velocity to 0, stop walking animation , and start attack animation, Not working (animation is stopped too): Working (but not what I want): if I turn velocity to anything but 0, i will start moving again, but i don't want this... is this a bug, or a feature? how could i stop the zombie movement, but continue the "attack" animation ?
  2. Hi everyone, I'm running into a weird bug. I'm working on a very tiny display game (128*100) with a tiny 4x4 tilemap (with 8x8 tiles in it, I don't know if it could be the problem) and a small 16x16 sprite with some tiny bounds on it , and this is the heart of my problem. Also, I'm on a retina mac, maybe the resolution is a problem here. here is my full code: var config = { type: Phaser.CANVAS, width: 128, height: 100, zoom: 5, backgroundColor: '#2d2d2d', parent: 'phaser-example', pixelArt: true, physics: { default: 'arcade', arcade: { gravity: { y: 250 }, debug: true } }, scene: { preload: preload, create: create, update: update } }; new Phaser.Game(config); let map; let cursors; let player; let floorLayer; function preload () { this.load.spritesheet('rick-stand', 'gfx/rick_Stand.png', { frameWidth: 16, frameHeight: 16 }); this.load.image('lev1_8x8', 'levels/one/8x8.png'); this.load.tilemapTiledJSON('level1-1', 'levels/one/level1-1.json'); } function create () { cursors = this.input.keyboard.createCursorKeys(); map = this.add.tilemap('level1-1'); const smallTiles = map.addTilesetImage('lev1_8x8'); floorLayer = map.createStaticLayer('floor', smallTiles); floorLayer.setCollisionByExclusion([ -1 ]); player = this.physics.add.sprite(15, 41, 'rick-stand'); this.physics.add.collider(player, floorLayer); this.cameras.main.startFollow(player); player.setSize(8, 12, false); player.setOffset(5, 4); } function update (time, delta) { player.body.setVelocityX(0); if (cursors.left.isDown) { player.body.setVelocityX(-22); } else if (cursors.right.isDown) { player.body.setVelocityX(22); } if (( || cursors.up.isDown) && player.body.onFloor()) { player.body.setVelocityY(-100); } } nothing fancy I guess, not the setSize command, which causes a bug. Here, the width of the body of my sprite is 8 (because I want my 16x16 sprite to 'fall' into small 8px width hole) Here is the bug, the sprite "jump" backward randomly you can test that here (the game is zoomed 5x, but with no zoom, the bug is the same) If I change to player.setSize(9, 12, false); (9 instead of 8) there's no more bug (see that here Using values below 8 causes bug too... Is that a known bug? I'm not afraid to look at it closely, but I even don't know what to check first... Is that a physics problem? a tilemap problem? a Sprite problem?
  3. Hello! I updated new version 3.2.0-alphaC and get an error with GPUParticleSystem.isReady(). Cause of this is when scene check isReady, it call GPS.isReady() but GPS not render at the moment. Means, _updateEffect and _renderEffect attribute undefined. See console:
  4. I was unable to transform mesh instance if the original mesh had a shader material. Is this a bug? I have created a playground example using box mesh. If you open the debug -> mesh panel, you realize there are 6 meshes, but only 5 are displayed. This is because one of the instances in the second row was not transformed properly. On the other hand, clones of meshes with shader material can be transformed properly.
  5. AnimatedSprite does not play

    I'm new to Pixi.js I did a code to make a simple 3 frame animatedSprite but it never leaves the first frame, if I do a gotoAndPlay(1) it goes to the desired frame and stops, and if I console.log the ticker it keeps on the frame as it were stopped but the playing property is true. Can't find the error anywhere. Somebody could help me out here? The code is below: var w = window.innerWidth, h = window.innerHeight, objs = {}, tex = {}, anim = {}, prop = w/16, props = { grass: [2060, 745, 16], trave: [1334, 471, 10], rede: [1309, 454, 9.8] }; var app = new PIXI.Application(w, h, {backgroundColor: 0x33aaff}); app.renderer.autoResize = true; resizeAll(); $('#div_canvas').append(app.view); objs['message'] = new PIXI.Text( "Carregando...", {fontFamily: "Arial", fontSize: 20, fill: "white"} ); objs['message'].position.set((app.screen.width/2)-(objs['message'].width/2), (app.screen.height/2)-(objs['message'].height/2)); app.stage.addChild(objs['message']); app.loader .add('css/fonts/Quantico-Regular.otf') .add('img/grass.png') .add('img/trave.png') .add('img/rede.json') .on("progress", loadProgressHandler) .load(onAssetsLoaded); function loadProgressHandler(loader, resource){ objs['message'].text = "Carregando..."+(Math.round(loader.progress*100)/100)+"%"; objs['message'].position.set((app.screen.width/2)-(objs['message'].width/2), (app.screen.height/2)-(objs['message'].height/2)); app.renderer.render(app.stage); } function onAssetsLoaded() { app.stage.removeChild(objs.message); delete objs.message; tex['grass'] = app.loader.resources["img/grass.png"].texture; tex['trave'] = app.loader.resources["img/trave.png"].texture; tex['rede'] = app.loader.resources["img/rede.json"].textures; anim['rede'] = []; for(var i=0; i<3; i++){ anim['rede'].push(tex['rede']['rede0'+i+'.png']); } console.log(anim.rede); objs['grass'] = new PIXI.Sprite(tex['grass']); objs['grass'].anchor.set(0.5, 0.0); objs['grass'].position.set(app.screen.width/2, app.screen.height/2); objs['trave'] = new PIXI.Sprite(tex['trave']); objs['trave'].anchor.set(0.5, 0.8); objs['trave'].position.set(app.screen.width/2, app.screen.height/2); objs['rede'] = new PIXI.extras.AnimatedSprite(anim.rede); objs['rede'].anchor.set(0.5, 0.8); objs['rede'].position.set(app.screen.width/2, app.screen.height/2); objs['rede'].animationSpeed = 1; objs['rede'].play(); resizeAll(); app.stage.addChild(objs['grass']); app.stage.addChild(objs['rede']); app.stage.addChild(objs['trave']); app.ticker.add(function() { console.log(objs['rede'].totalFrames, objs['rede'].currentFrame); }); } function resizeAll(){ var propW = w/16; var propH = h/9; if(propW>propH){ w = propH * 16; }else if(propW<propH){ h = propW * 9; } prop = w/16; for(var i in objs){ if(typeof props[i] !== 'undefined'){ objs[i].width = props[i][2]*prop; objs[i].height = (objs[i].width/props[i][0])*props[i][1]; } } app.renderer.resize(w, h); }
  6. As in topic. It's not critical but it's annoying
  7. Hi admin people I create this topic to point an annoying bug: a teammate tried to create an account, but can't validate it! It seems that is the security question which generate issue. I try myself to generate a test account (with strong password, with typing Chrome instead of chrome, adblocker disabled, on Firefox - my teammate is on Chrome), and couldn't validate it too.
  8. Hi everyone, I'm trying to integrate VR cameras to my project, but I encountered some problems with the VRDeviceOrientationArcRotateCamera. As you can see there : , I can't set the target of the camera on the moving sphere, and I have no idea what's going wrong with my code. If you have some ideas about how I can fix that, you are very welcome
  9. Hello, I am getting a strange bug in chrome with the pointer lock API. When using chrome on windows 10, the mouse will randomly move to a new location as I move the mouse around. I have repeated this bug on seperate machines. Works fine on firefox. Here's a play ground: I removed the non chrome pointer lock stuff. Pointerlock code for chrome: scene.onPointerDown = function (evt) { canvas.requestPointerLock(); }; I would really appreciate any help on this! Thanks!
  10. Hello, i created a litle game, based on the car demo in the playground, Now i have noticed that when i click with the mouse (left, middle, right) the car bounce a litle for and then back. also when the key is released. I have created an video: Have a look on the console. I dont think this is not an problem with my game logic, more with the canvas. Like you drag & drop the frame. Has anyone an similar problem or a fix for me ? I dont know what to do.
  11. Physics bug

    Box2D always calls contact callback twice. Here's an example: Ship with collision category 2 (ship at left) calls contact callback once while ship with collision category 1 (default) calls it twice. I've been trying to fix this for weeks but couldn't find any solution in web, i really need you guys to help me. function create() { game.physics.startSystem(Phaser.Physics.BOX2D); game.stage.backgroundColor = '#2d2d2d'; // User-controlled ship ship1 = game.add.sprite(250, 300, 'ship'); game.physics.box2d.enable(ship1); ship1.body.setCircle(14); // Ship with collision category 2 (triggers contact callback only once, it shouldn't even trigger it) ship2 = game.add.sprite(200, 200, 'ship'); game.physics.box2d.enable(ship2); ship2.body.setCircle(14); ship2.body.setCollisionCategory(2); // Ship with collision category 1 *default, i guess* (triggers contact callback TWICE) ship3 = game.add.sprite(300, 200, 'ship'); game.physics.box2d.enable(ship3); ship3.body.setCircle(14); game.physics.box2d.setBoundsToWorld(true, true, true, true, false); ship1.body.setCategoryContactCallback(1, function(b1,b2,f1,f2,begin){ if (begin){ total += 1; hitText.text = 'Contact callback called '+total+' times'; console.log("CONTACT: ", b2) } }, this); cursors = game.input.keyboard.createCursorKeys(); game.add.text(5, 5, 'Use arrow keys to move.', { fill: '#ffffff', font: '14pt Arial' }); total = 0; hitText = game.add.text(5, 30, 'Contact callback called 0 times', { fill: '#ffffff', font: '14pt Arial' }); } function update() { if (cursors.left.isDown) { ship1.body.rotateLeft(300); } else if (cursors.right.isDown) { ship1.body.rotateRight(300); } else { ship1.body.setZeroRotation(); } if (cursors.up.isDown) { ship1.body.thrust(300); } else if (cursors.down.isDown) { ship1.body.reverse(300); } } function render() { game.debug.box2dWorld(); }
  12. So I'm getting these weird collision glitches, where I get knocked back randomly. This only seems to happen when I set my sprite's body's width to 8, as opposed to the sprite's width of 16. I'm using Arcade physics, if that makes a difference.
  13. Editor bug with Editor camera

    When I've tried to load .babylon model to the editor, I've receive a message: "ERROR: Cannot insert node with id=EditorCamera (text: EditorCamera) because another node with the same id already exists." Then I've checked the .babylon file but haven't found any object with id "EditorCamera" office.babylon
  14. Hello, everyone. I am using an SVG file to render resolution independent textures. My device has a pixel ratio of 3, and so I set the PIXI resolution to 3 for a crisp display. My SVG texture becomes weirdly pixelated if the canvas it is rendered to is too large. This only happens when using the WebGL renderer. I have two comparison pictures: First one crisp (Canvas), second one pixelated (WebGL). The size of the texture is 1528x1528 and my screen resolution is 1920x1080.
  15. Hi There is bug when BABYLON.GUI buttons that has been created with custom viewport on camera: buttons can be clicked even if mouse is out of button playground:
  16. 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? 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
  17. Hello, Please see the PG:
  18. Hi there, I found this issue when loading a .babylon file with the SceneLoader. After the scene loaded, I found the 'scene.textures' array gets twice length than it should be, and each texture has a duplicated/clone one stays in the array. I think the problem comes from the 'StandardMaterial.Parse' logic, see the test PG: The material json has only has 1 texture, (diffuse Texture), but the 'Texture.Parse' had been called twice, one is for 'diffuseTexture', and the other is for '_diffuseTexture', see the 'SerializationHelper.Parse' definition.
  19. Hi, I've switched from BJS 3-beta to BJS-3 final and now get this error: Error status: 404 - Unable to load src/Shaders/ShadersInclude/shadowsVertexDeclaration.fx What's causing it?
  20. Hello Everyone! I´m testing and choosing a javascript engine to create a game, and I found something weird in Phaser which I can´t fix it. I made a little game just to test how the framework works. I´ve created a sprite, a weapon and a group of enemy. On the collision event between weapon and enemy group the behavior seems weird or bug. The collision event is called, but seems a delay, sometimes work, sometimes no. I don´t know what is happening. Can someone help and tell what is wrong on the code? Here is a link with game running: Sorry for identation on snippet, here on my editor seems all idents aligned. Sorry for var names in portuguese too Thanks var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); function preload() { //game.load.crossOrigin = 'anonymous'; // 37x45 is the size of each frame // There are 18 frames in the PNG - you can leave this value blank if the frames fill up the entire PNG, but in this case there are some // blank frames at the end, so we tell the loader how many to load game.load.spritesheet('president', 'img/temer2.png', 340, 500, 6); game.load.spritesheet('petista', 'img/petista.png', 272, 460, 2); game.load.image('bullet', 'img/bullet.png'); game.load.image('background', 'img/congresso2.jpg'); // Firefox doesn't support mp3 files, so use ogg'shoot', ['sounds/shoot.mp3']); } var temer; var weapon; var shoot_sound; var background; var petistas; function create() { cursors = this.input.keyboard.createCursorKeys(); fireButton = this.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR); shoot_sound ='shoot'); background = game.add.image(0, 0, 'background'); petistas =; // create group petistas.enableBody = true; petistas.physicsBodyType = Phaser.Physics.ARCADE; petistas.setAll('outOfBoundsKill', true); petistas.setAll('checkWorldBounds', true); petistas.setAll('anchor.x', 0.5); petistas.setAll('anchor.y', 0.5); // center the picture in the world background.alignIn(, Phaser.CENTER); initTemer(); initWeapon(); createPetistas(); } function update() { if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { temer.x -= 4;'walk', 6, true); if(temer.scale.x == 0.3) { temer.scale.x = -0.3; weapon.trackSprite(temer, -60, -18); weapon.fireAngle = 180; } } else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) { temer.x += 4;'walk', 6, true); if(temer.scale.x == -0.3) { temer.scale.x = 0.3; weapon.trackSprite(temer, 60, -18); weapon.fireAngle = 0; } } else if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) { temer.y -= 4;'walk', 6, true); } else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) { temer.y += 4;'walk', 6, true); } else temer.animations.stop('walk', true); if (fireButton.isDown) {;; } } function render() { //game.debug.spriteInfo(temer, 20, 32); /*for (var i = 0; i < petistas.length; i++) { game.debug.body(petistas.children[i]); }*/ weapon.debug(); } function initTemer() { temer = game.add.sprite(,, 'president'); temer.anchor.setTo(0.5, 0.5); temer.scale.setTo(0.3, 0.3); temer.animations.add('walk'); } function initWeapon() { // Creates 1 single bullet, using the 'bullet' graphic weapon = game.add.weapon(30, 'bullet'); // The bullet will be automatically killed when it leaves the world bounds weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS; // The speed at which the bullet is fired weapon.bulletSpeed = 400; // Speed-up the rate of fire, allowing them to shoot 1 bullet every 60ms weapon.fireRate = 60; weapon.bulletAngleOffset = 0; weapon.fireAngle = 0; // Tell the Weapon to track the 'player' Sprite, offset by 14px horizontally, 0 vertically weapon.trackSprite(temer, 60, -18); } function createPetistas() { var petista_height = 184; var y_point =; if(game.height - petista_height > y_point) y_point = game.height - petista_height; var petista = petistas.create(0, y_point, 'petista'); petista.scale.setTo(0.4, 0.4); petista.animations.add('walk');'walk', 2, true); game.add.tween(petista).to({ x: game.width + (1600 + petista.x) }, 20000, Phaser.Easing.Linear.None, true); game.physics.enable(petista, Phaser.Physics.ARCADE); // add colision event game.physics.arcade.overlap(weapon.bullets, petistas, collisionHandlerPetista, null, this); var MIN_ENEMY_SPACING = 300; var MAX_ENEMY_SPACING = 3000;, MAX_ENEMY_SPACING), createPetistas); } function collisionHandlerPetista(bullet, petista) { petista.kill(); bullet.kill(); console.log('colision detected'); }
  21. Hey guys I'm making a platformer and I've managed to get my character running and jumping at the same time... to one side only - the right! I have NO ideia why running and jumping to the left is proving impossible but I'm hoping you can help me out. runKey = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); // The running key, in the create method // Fast forward to my update method (...) // Horizontal movement player.body.velocity.x = 0; // Resets our character's horizontal movement. if (cursors.left.isDown) // If the 'left' key on our keyboard is pressed ... { player.scale.x = -1; // ... we horizontally flip our character to face the left ... player.body.velocity.x = -200; // ... we move him to the left ...'walk'); // ... play the 'walk' animation ...'', 0, 1, false, false); // ... and finally play the 'player_walk' sound effect. if (runKey.isDown) // If the 'run' key on our keyboard is being pressed while we are walking to the left... { player.body.velocity.x = -350; // ... we allow our character run to the left. } } else if (cursors.right.isDown) // If the 'right' key on our keyboard is pressed ... { player.scale.x = 1; // ... we horizontally flip our character to face the right ... player.body.velocity.x = 200; // ... we move our character to the right ...'walk'); // ... play the 'walk' animation ...'', 0, 1, false, false); // ... and finally play the 'player_walk' sound effect. if (runKey.isDown) // If the 'run' key on our keyboard is being pressed while we are walking to the right... { player.body.velocity.x = 350; // ... we allow our character run to the right. } } else // If no key on our keyboard is pressed ... {'idle'); // ... play the 'idle' animation ... } // Vertical movement if (cursors.up.isDown && (player.body.blocked.down || player.body.touching.down)) // If the 'up' key on our keyboard is pressed and our character is touching a surface ... { if (runKey.isDown && player.body.velocity.x < 0) { player.body.velocity.x = -350; player.body.velocity.y = -700;'', 0, 1, false, false); jumpCounter = 1; } else if (runKey.isDown && player.body.velocity.x > 0) { player.body.velocity.x = 350; player.body.velocity.y = -700;'', 0, 1, false, false); jumpCounter = 1; } player.body.velocity.y = -700;'', 0, 1, false, false); jumpCounter = 1; } else if (player.body.velocity.y < 0) { if (runKey.isDown && player.body.velocity.x < 0) { player.body.velocity.x = -350;'jump'); player_walk.pause(); } else if (runKey.isDown && player.body.velocity.x > 0) { player.body.velocity.x = 350;'jump'); player_walk.pause(); }'jump'); player_walk.pause(); } else if (player.body.velocity.y >= 0 && !(player.body.blocked.down || player.body.touching.down)) { if (runKey.isDown && player.body.velocity.x < 0) { player.body.velocity.x = -350;'fall'); player_walk.pause(); } else if (runKey.isDown && player.body.velocity.x > 0) { player.body.velocity.x = 350;'fall'); player_walk.pause(); }'fall'); player_walk.pause(); } else { jumpCounter = 0; } I really don't understand what's wrong Thanks in advance!
  22. Context: in my game i got the setup you can see in the image. I got an image larger than the window, so i'm able to displace the image with the window's scroll bar, in the lower part of the image I got a button so it's initially hidden. Problem: When I scroll down to see the button and put the pointer over it, it doesn't work for a few seconds (it doesn't execute input events. No hand cursor), after moving the cursor a little while over the button, it works again. I also checked the variables "visible" and "inputEnabled" in the update() but they are always true, so I suppose Phaser do something else to disable elements which are off-screen, and re-enable them once they are on-screen. Any suggestion would be highly appreciated.
  23. I can't use external video for videoTexture

    Hello! 使用本地视频: 使用外部视频(跨域) 使用外接影像无法正确播放!
  24. Looks like OimoJSPlugin class incorrectly implements IPhysicsEnginePlugin interface. So with Babylon.js 2.5 when I try to enable physics with Oimo.js plugin like this: scene.enablePhysics(new BABYLON.Vector3(0, -9, 0), new BABYLON.OimoJSPlugin()); I get the following TypeScript compilation error: TS2345: Argument of type 'OimoJSPlugin' is not assignable to parameter of type 'IPhysicsEnginePlugin'. Types of property 'updateDistanceJoint' are incompatible. Type '(joint: IMotorEnabledJoint, maxDistance: number, minDistance?: number) => void' is not assignable to type '(joint: DistanceJoint, maxDistance: number, minDistance?: number) => any'. Types of parameters 'joint' and 'joint' are incompatible. Type 'DistanceJoint' is not assignable to type 'IMotorEnabledJoint'. Property 'setMotor' is missing in type 'DistanceJoint'. I'm using babylon.d.ts type definition file from babylonjs npm package.
  25. Possible bug report

    I a having trouble with the interactive elements in the minified version of pixi 4.0 To give me a fake input box i have an input box at the end of my dom that i make focused to take keyboard input so take the value of and place in text container. But the minified version of pixi is stealing the focus from my input box where the unminified version is not.