Mickety

Members
  • Content Count

    49
  • Joined

  • Last visited

About Mickety

  • Rank
    Advanced Member
  • Birthday 03/14/1990

Profile Information

  • Gender
    Male
  1. So I'm making an online game with socket.io and phaser and I run into a little problem: Everything moves faster on PC while android devices lag behind. I use game.physics.arcade.moveToObject to move to a waypoint but the same problem occures with moveToXY and other methods. Here is logic: Two players are on the map in the same X position but different Y positions. Player one on PC clicks on a location to the right a few pixels and starts moving to right on both screens of PC and Android device. Player one arrives to desired location earlier on PC while still moving on Android. Movement implemented with constant speed of 32 in update scope if player's current position is not equal to corresponded player's waypoint which is updated via websocket signal from server. game.time.advancedTiming is set to true and desiredFPS to 35. This did help but only a little. How should I approach this? Is there such a thing as delta speed? I could also periodically update player's location that server would keep track of but last time I checked there was no phaser module for node.js, so I can't really calculate player's location serverside.
  2. Ermm... You can't use Phaser with anything except JavaScript (afaik?) Did you mean like compiler languages like CoffeeScript or am I missing something?
  3. Afaik Phaser doesn't do 3D right now (like at all. Maybe you could emulate DOOM's fake 3D engine but that is as far as one would go). So go for three.js. Might also want to check bablyon.js , I think it is a tiny bit easier to grasp. Also it doesn't matter which service you use to host/construct a website, as long as you can put code on some pages in it's iternal editor or via ftp you're good to go.
  4. You are welcome. Hope it helps.
  5. it sounded like you've messed up the scoping rules of JavaScript (since I don't see the whole code that would be the best assumption) untill you mentioned that disabling "fixedToCamera" fixes the issue. I'm at a loss now.
  6. Could you provide a console error when you try to use setScreenSize() ? From what it seems it looks like setScreenSize() is deprecated (and one should avoid using it directly in the first place). Try using updateLayout() it seems to do the thing you want.
  7. There is no way to absolutely hide ANY javascript code or objects handled by JS in any way. If one desires to find something in your code enough - they will. You'll might want to switch to a compiling language and build executables where code is hidden like C++ or whatever. It may work, reverse engineering to get the initial code is never fast but it's still possible. You could use Phaser for only visual representation of a game or a project and hide the logic on a server with libs like socket.io but for that you'll need to rent a server at least, so there is that. Hope it helps
  8. What exactly do you mean by "Phaser backend"?
  9. This is not strictly a Phaser thing. This gives context to whatever you assign it and depends on where you call it first. Read about it a bit more here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this You could use let for instance, but whatever variable you assign with let for instance in "create" cycle it will only be visible there and not in update or render cycle or wherever else. If you use this just by it self it will represent the object in context of which it has been called. It's hard to explain this in the first place so I'd suggest you read tutorials about it. Hope it helps.
  10. Phaser 3 is ready to use AFAIK, but people have complained about lack of examples or docs that even beginners can understand. So if you are good at development in general and can read docs well enough you can go for Phaser 3. Also Phaser CE (2) uses PIXI.js while Phaser 3 uses it's own custom renderer AFAIK
  11. It would be nice to know how you did it if it's not over 9000 lines of code. Anyways it is great that you've figured it out youself - very good for the learning experience.
  12. Might want to check this too. It's a version of PhoneGap but free (?) https://cordova.apache.org/
  13. Yeah I have the same problem. Almost made me want to forget about zooming at all
  14. I think the collision box is a little wider. Try moving right and jumping BEFORE you hit the wall. Once you do, character will hit a ceiling, that is not there. Hope this gives you some insight.