• 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

515 profile views
  1. Visual Studio Code - Intellisense for Phaser.js?

    Yes, sir. Exclude works like a charm. Thanks again.
  2. Visual Studio Code - Intellisense for Phaser.js?

    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.
  3. Visual Studio Code - Intellisense for Phaser.js?

    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?
  4. 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
  5. The Evolution of Phaser 3 and Lazer

    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.
  6. The Evolution of Phaser 3 and Lazer

    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
  7. How good the performance on mobile devices?

    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
  8. 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.
  9. Phaser: green shadow on my sprite *.png s ??

    Using the debug puts a green border around your sprites so you can tell real vs. apparent size.
  10. 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
  11. Cheatsheets for Phaser v2.4.4

    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.
  12. 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
  13. Backends?

    Here's another thought. It's free as long as your transactions are lower. (it's free up to 30/second, which would amount to 2,592,000 per day - IF you could keep transactions to exactly 30/second. There will be peak times for users. But if you have high transactions, hopefully by then, you're bringing in income from your app(s). It may not be a bad place to start, then move to other hosting later. You'll really want to keep the number of transactions down to logins and maybe high score updates. It amounts to about $0.14 per hour you are above 30/second (per 10/second you are over). It has login logic built in, even allowing users to log in with Facebook or other social media, and keeps it safe. Check out the CORE and scroll down a little bit to see the login info. Also, here's an example app that does all of this so you can look at the source code. I am considering trying this out. There's also a class on tutsplus that shows Intel XDK with for $9, but I am not sure it is necessary. I have not taken the course, just bookmarked it in case I am struggling to make it all work. Digital Ocean is another more cost effective option. They have plans as low as $5/month. But you pretty much have to develop your own Hope this helps, -Chad
  14. Loading Objects from Tiled

    Have you tried changing the settings to Orthagonal, and XML format. Then export the Tiled files in JSON format? Preload: this.load.image('tiles', 'assets/images/spritesheet.png'); this.load.tilemap('level1', 'assets/levels/level1.json', null, Phaser.Tilemap.TILED_JSON); You also need to link up the spritesheet and the JSON data in your game state 'create' section. // Create a tilemap = this.add.tilemap('level1'); // Link tileset name to'spritesheet', 'tiles'); Where 'spritesheet' is the name of the tileset in the JSON file below. "tilesets":[ {[...snip...] "name":"spritesheet",{...snip...]} I borrowed this from Zenva's course on HTML5 gaming (module 7).Hope this helps,-Chad
  15. Backends?

    Using HTTPS encrypts everything going between the client and server. So it helps a lot. It is not perfect, but generally agreed as one of the best first things to do to improve security. It makes it more difficult for a sniffer, etc to see what you're sending. Vs. Http, which sends passwords as plain text so it is completely readable.