AidanPTD

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. @samme, your suggestion didn't work, unfortunately. I'm still unsure of what to do... I'm getting "phaser-ce" from the file "phaser.d.ts" in a different folder, which I linked the "main.js" file to successfully. I'm also not sure if the example that I'm following is based on JavaScript or TypeScript, but it seems like it's using JavaScript (it says so in the tutorial..). Should I try converting my file to typescript and try from there, or do you have any other ideas?
  2. I'm actually trying to modify the code from this tutorial and add some things to it. But I'll try your suggestion.
  3. @samme, I tried removing line 6, but now the camera doesn't move as expected. How would I change this line to work properly? import {Math} from "phaser-ce";
  4. Hi, In currently trying to host a Phaser game with GitHub Pages, but it's not showing up. I've looked at the code for this game, and it all seems fine, as well as the index.html for the page. I'd like a fresh pair of eyes, so would anyone mind taking a look at the source code? Thanks to everyone in advance! Git Hub Repository: https://github.com/AidanPTD/Games Git Hub Pages: https://aidanptd.github.io/Games/
  5. Hi, I'm (sort of) new to Phaser, and I was wondering about something: Is there an easier way to load tiles and items onto a level than something like this (see below)? { "platforms": [ {"image": "ground", "x": 0, "y": 920}, {"image": "ground", "x": 800, "y": 920}, {"image": "ground", "x": 1600, "y": 920}, {"image": "ground", "x": 2400, "y": 920}, {"image": "ground", "x": 3200, "y": 920}, {"image": "ground", "x": 3300, "y": 920}, {"image": "grass:4x1", "x": 420, "y": 794} ], "decoration": [ {"frame": 2, "x": 630, "y": 878}, {"frame": 2, "x": 663, "y": 878}, {"frame": 2, "x": 697, "y": 878}, {"frame": 3, "x": 756, "y": 878}, {"frame": 1, "x": 84, "y": 878}, {"frame": 0, "x": 252, "y": 878}, {"frame": 4, "x": 462, "y": 752} ], "coins": [ {"x": 147, "y": 899}, {"x": 189, "y": 899}, {"x": 399, "y": 773}, {"x": 357, "y": 794}, {"x": 336, "y": 836}, {"x": 819, "y": 899}, {"x": 861, "y": 899}, {"x": 903, "y": 899} ], "hero": {"x": 21, "y": 899}, "spiders": [ ], "door": {"x": 4800, "y": 920}, "copperkey": {"x": 899, "y": 710}, "silverkey": {"x": 800, "y": 874}, "goldkey": {"x": 500, "y": 674} } I currently have two levels, and it took me forever to get the x & y values correct when playing the game. Is there an easier way to do this, without having the x & y values if possible? I've seen examples on the Phaser site where the .JSON files have levels loaded with arrays of numbers and such, but I'm not sure if that'd work for me. Thank you to everyone in advance! P.S. IF anyone would like to see my progress on this project, check out the source code on GitHub: https://github.com/AidanPTD/Games