Jump to content


  • Content Count

  • Joined

  • Last visited

About theNeedle

  • Rank

Recent Profile Visitors

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

  1. Scene in Phaser 3 is not same as State in Phaser 2. If you don't stop one scene and start another, both scenes will be visible. So, you need to stop the previous scene (boot) before starting new scene(main).
  2. Well. You certainly need to code it from scratch.
  3. you can pass the parameter when you call this.game.state.start('stateName', true, false, PARAM); these parameter will be passed to init method of the state you started. You can send the current city as a param while you go back to city_selection state. And then in city_selection state you can do changes according to whatever city you get in param. checkout the docs here.
  4. You need to `destroy` or `remove` item to remove it from group. `kill` only sets `alive`, `exists` and `visible` properties to false. It won't remove it from group. Since you're creating and destroying items frequently. Better approach would be to do object pooling. When item goes below 500, you `kill` it and when you want new item you find in the group for items which `alive` is set to false. and `revive` that item and change positions of that item.
  5. You might want to describe your problem in detail.
  6. You can `sprite.input.enable = false`. If you want to toggle interactive mode than it's perfect. And I think that's what you're trying to do. If you want to remove the input object from sprite you can do this: `this.input.disable(sprite)`.
  7. You might use this device mode to see how your game scales in different mobile devices. If it scales as you want in chrome-devtools than it should scale as it is on mobile device. If you want to disable scroll than you can use some meta tags in html. However I used phaser 3 and scale the game using custom JS function like this. Apart from that I don't have any experience with phaser2.
  8. you might consider using Mongoose ODM. I think it would be easier(and better) than directly using mongodb.
  9. Great. Using Node(Express) as MVC? It looks like a lot of work. keep it up. 👍
  10. this might be something related to CSP(Content Security Policy). When trying out cordova, I've faced issue where any of assets are not loading. It was solved by removing meta tag related to CSP. I'm not sure that's the best practice but it was okay for just get it to working condition. Other than that I didn't find any other issues. However I didn't run it on emulator, instead I run directly on the device and also made apk and install on several other device and it was working good. Maybe try running on actual device or build an apk? I found this about CSP. I'm not sure this would s
  11. You might consider using `group` for cells. Check out these examples. For looping through cells you could use array methods like `filter` or something or use one of these methods. I'm not sure what you're trying to achieve but this might be useful. Looks like you are doing online multiplayer board game. I also want to make online multiplayer. Can you tell me what you're using (socket.io or something like that) for sending moves between players?
  12. You can `setName` or `setData` to Game Objects. Now, listen for `gameobjectdown` event and using `getData` or `object.name` you can figure out which object was clicked. check out this example.
  13. @TheScruffyGuy I had never worked with Tilemaps but I think there should be Phaser.Tilemaps.TILED_JSON in 1st line of preload function. I found it here.
  14. @KungFuFlames You can find the current Documentation for Phaser 3 here .
  15. I'm making small turn based game tic-tac-toe using phaser 3. Is it possible to cache assets and all the files needed to run game so that game can be played offline so that no internet connection is needed and every file is loaded from cache (providing native like experience)? Does service worker would do the trick? What are the common approaches to speed up the loading process and caching in HTML5 games?
  • Create New...