• Content Count

  • Joined

  • Last visited

  • Days Won


cdelstad last won the day on December 31 2015

cdelstad had the most liked content!

About cdelstad

  • Rank

Recent Profile Visitors

1204 profile views
  1. All, Use Case: I want mobile users player data to save to either Game Center or Google Play depending on whether they have an iOS or Android device. I want their game data saved so if they get a new device they do not lose their progress. I am also trying to avoid requiring a user to explicitly login to some account. Is there a tool that makes this easy so I do not need to write OS branching logic, etc? Also, what are folks doing to handle this use case when they have mobile games on both OS'es? Any help would be greatly appreciated. -Chad
  2. Where is your lib folder with the phaser files, not just the typedefs?
  3. Will the Phaser 3 API's eventually be added to the Phaser API's page with the 2.x versions, or will they be located elsewhere? Do they exist anywhere now? There seems to be a Phaser 3 API page in a different location, but the last updated dates are last February, June, or August. Thanks in advance, -Chad
  4. Yes, sir. Exclude works like a charm. Thanks again.
  5. OK, I got it to work. I had to move some folders around. I moved my lib folder under the js folder to be at the same level as the defs folder. So all of my JS files were under the js folder structure. Thank you! Works slick.
  6. It is not working. I am using the 2.6.2 versions of phaser.js and *d.ts files. The latest version of VSCode 1.8.1. Also included are the extensions i have installed. I don't need to tell it to look for the defs folder anywhere do I? Will VSCode find the ts files?
  7. Does anyone know if there has been an Intellisense implementation I can use with Visual Studio Code for Phaser.js (vanilla JavaScript)? I know there are TypeScript definition files maintained, though I do not really want to use TypeScript. I think it would be considered a Language Extension - using the VSCode vernacular. Anyone know what it would take to create a VSCode extension for Phaser? @Arian FornarisYou created a plugin for Sublime, would you have any input on this? Thanks in advance, -Chad
  8. I was thinking about this last night after posting. Realistically, any es6 code would be transpiled to es5, for now, so I am not even sure es6 upgrade would be a breaking change. And as mattstyles brings up, if the api isn't a breaking change, it isnt a breaking change. The internals are just that. I am just breaking down the es6 effort, not trying to push you into changing direction. Honestly, which parts of es6 would you want to implement? If you already have js modules, so do you need to refactor them to classes? Seems like not enough value for the effort. I can definately see using let and const, Symbols can be very handy, though you're already using prototypes. A lot of the code you have does not become invalid or no longer a best practice because of es6. Most of es6 are just more handy ways of doing the things you are already doing. I can see es6 changes where their counterparts are more performant than es5, but there are not many of those atm. Talking es6 as a whole sounds like a huge effort, but if you broke down which parts you want/need to use, and where it needs to be implemented, I bet it seems a lot more managable.
  9. Wonderful explanation. I really appreciate you spelling it out for us. Here are my thoughts. I would honestly say if you are going to go through a big shakeout cycle for Phaser 3, you may as well go full es6 and only do one shakeout cycle instead of two. I know you said not to suggest it. I am just bringing up an 'on the other hand' point of view. How many people are going to want to use it knowing not to far down the road there will be breaking changes again, ala Angular 1 to 2. And two huge shakeouts is a long time for Phaser not to be stable. Using semver, won't the CE version hit Phaser 3 as well, or will it be retired as soon as Phaser3/Lazer is operational? It may cause some confusion having two v3's. Going back to Angular. They announced they were going to be following semvar and Angular 4 and 5 are scheduled for 2017 releases. Now, it wont be a complete rewrite like 1 to 2, it just means there are breaking changes. So you could either make phaser 3 include es6 out of the box - mostly to reduce multiple shakeout cycles, or make Phaser3 as is and make Phaser4 the es6 version. Just me two bits. -Chad
  10. The answer is it can have near native performance, imperceptibly near, but honestly, it depends on what you are doing, and if you use performance minded tricks like spritesheets, minimizing what you need to load, no copies of same objects/images, how well you clean up after yourself rather than defer to the garbage collection on the browser, etc. If you want to try an example, create a project in Intel XDK for the Phaser Tile Based Game (either standard html5 and html5+cordova can be built for mobile, it just depends on whether you need to use cordova plugins), Build and side-load it to your device, then give it a play. I think the controls are a bit rough and could use some re-work, but the gist of the game is there and works nicely. Hope that helps, -Chad
  11. The left/right movement is in the update(). The this.player was just an example. truth02Sprite.body.velocity.x should work, similar to other places in your code you use truth02Sprite.body. Hope that clarifies.
  12. Using the debug puts a green border around your sprites so you can tell real vs. apparent size.
  13. Have you tried something like this for checking for collision with the world bounds? In the init(): I think you need to set the world bounds. And I believe you need to use arcade physics for this.,0,360,700); In create(): this.player.body.collideWorldBounds = true; As far as flipping an image horizontally, Moving left: this.player.body.velocity.x = -this.SPEED; <-- Note the negative in front of the speed. this.player.scale.setTo(1, 1);'moving'); Moving right: this.player.body.velocity.x = this.SPEED; this.player.scale.setTo(-1, 1); <-- Note the negative in front of the first parameter.'moving'); Hope this helps, -Chad
  14. All - I uploaded a new PDF version with a couple minor changes. For the "Main Objects", I added verbiage that states they are Accessed via local references only. You do not actually create these, and you wouldn't want to create multiples of these. Thanks Rich for pointing that out.
  15. Here's a good article in understanding the 'this'. I believe Phaser usually uses this to pass the 'context.' Understand JavaScript’s “this” With Clarity, and Master It Hope this helps, -Chad