• Content Count

  • Joined

  • Last visited

About MZuex

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So I figure out what was wrong, I started by creating scenes as shown here instead of as objects. Problem still existed, so I continued messing with the code till I found the real issue, it was the way I was handling mouse input event. This is how I was handling it this.btn.on('pointerdown', () => {//some code}); For some reason this caused errors on a lot of devices, I can't remember how I came about using this approach in the first place, is it wrong? Once I changed it to the below, app was running on all devices. this.btn.on('pointerdown', function (event) {//some code}, this); Anyone knows why this happened?
  2. I created a simple app quiz app using phaser3 and cordova, throughout development and testing (using cordova android emulator, browser, my phone, and other phones) I never had any issues with scenes. But once I deployed it, a number of people complained about having blank screens, I tried running it on bluestacks android emulator and had the same issue. I couldn't figure out why it was happening so I started rearranging and rewriting the code, and I realized whenever I load scene like the code below, I get the issue. It doesn't matter if I declared the scene in the same file or load it from an external file. scene: [preload,about,mainmenu] But if create a preload function and create the content of my "about" scene in a create function and add scene like below, it works fine scene: { preload: preload, create: create } Does anyone know why this is happening or what's causing it, I don't get how it works fine on some phones and not on others. Even when I uploaded the phaser app to a web server, the phones that had the issue still had it when they accessed it via a browser, so i don't think its a cordova issue. Any help, tip, hint, advice will be most appreciated, thanks. P.s I have a whole bunch of scenes, which is I why am not eager to convert them all into functions like i did the 'about' scene.
  3. Hi, Am trying to get text data from a JSON file which I've loaded using : this.load.json('textInfo', 'js/textInfo.json '); however, I can't access the data using the code I had working in phaser2 getInfo = JSON.parse(this.cache.getText('textInfo')); and the JSON examples folder on the phaser site is empty, can someone help me out with this please?
  4. Hi guys, Am using phaser3 making a match 3 type game where I need to check the objects that are around other objects. Is there an easy/efficient way to check for objects around a given object or in a given position in phaser3? Any directions or suggestions would be appreciated.
  5. Hi Guys, AM having problems setting up collisions between children of a group I created. I can have have them collide with other gameobjects but not with each other. This is the code I have inside my Create function, am I missing something? create: function () { myObjects = this.physics.add.staticGroup(); var mychildObjects = this.textures.get('myObjects').getFrameNames(); var y=400; for (var i = 0; i < 5; i++) { var x=400; y+=260; for (var j=0; j<5; j++){ var image = this.add.image(x, y, 'myObjects', Phaser.Math.RND.pick(mychildeObjects)); image.setInteractive(); this.input.setDraggable(image); myObjects.add(image); x+=260; } } this.physics.add.overlap(myObjects, myObjects, this.checkCollision, null, this); this.input.on('drag', function (pointer, gameObject, dragX, dragY) { gameObject.x=dragX; gameObject.y=dragY; } ); }, checkCollision:function(object1, object2){ console.log("inside"); object1.destroy(); }