• Content Count

  • Joined

  • Last visited

Posts posted by veggis

  1. Hello!

    I'm really intrigued by the idea of having a node server running phaser as authority for a multiplayer game. I'm not sure if thats a viable option or possible at all. So I'm asking if anyone tried that before? What really is the purpose of headless?

    I found this package, which looked promising.

  2. This question has been brought up before but most threads I could find were relatively old, so i thought i might bring it up.

    I'm wanting to do a lightweight multiplayer platform shooter and i'm thinking running some authorative physics/logic on the server would be the best approach. But after digging around abit it didn't look that feasible with arcade physics. Like in this thread where its stated that running phaser headless is a bad idea.

    Do someone have experience with this, and to keep things as fast as possible and relatively scaleable, what would be the best approach to a game like this?



  3. In your game are the enemies scattered around the map outside of the camera boundaries? If so enabling autoculling on the enemy sprites might solve some performance hits.

    If the enemy class do alot in its update method then that might be a problem too. Killing and reviving the enemy when outside camera boundaries is another solution. You should look into object pooling.

  4. I've been looking for a framework for an idea i have. I want to create a 2d platformer with 3d objects for web and mobile.

    Babylon is attractive, but i'm unsure if there are any physics engine that can handle constraints and also suitable for a platformer in that way.

    Any ideas?

    Is unity the best way to go here?

    Thanks :)

  5. Hello! I want to implement the equivalent of p2's distance constraint with arcade, but I'm having trouble getting started.

    Most of the information I could find about this was the physics part, which i can't really wrap my head around. But since arcade have the velocity and the gravity acting on that object, i thought this might be simple to do.

    I'm basically trying to do a simple rope swing (tarzan) with a constant distance between the player and a point, much like a pendulum.

    Does anyone here know how to do something like this?




  6. Thanks for the reply!

    @BlitZ - I've experimented with different sizes, but it didn't seem to change anything. I also tried to make sure that the canvas width and height can't be an odd number to make sure aspect and pixels per row are allways the same. (since 480x320 %2 == 0)

    @samme - The game gets scaled. In other words the canvas and everything with it. I could do it the other way around, but that seem like unnecessary work.

    @douglas - I can't quite see the relevance. Are you saying i have to create sprites from a tileset?


  7. So i've encountered a problem when it comes to rendering low res sprites and upscaling in phaser. I'm pretty sure this issue has been tackled many times, but i haven't found any good solutions to it.

    The problem is that some pixels are getting wider than others. Like this:


    My game is at 480x320 and im scaling the game with SHOW_ALL.

    I've tried settin roundPixels to true and various CSS tricks. But nothing seem to change.

    Anybody know a swift solution to this?



  8. Hallois

    Is there a way to dynamically change speeds with multiple points in a tween?

    Lets say i have this tween:

    game.add.tween(sprite).to({x:[400, 200],y:[400, 200]},1000); 

    The problem here is that the speed will differ when moving to n position in array since the distance gets shorter. Is there a way around this?
    I could use onUpdateCallback function and detect when the tween is moving to a new position in array, but I can't seem to find a way to do that.

    Any ideas?



  9. @jilonor

    Yes. There isn't much difference between forcing to webgl or canvas when using tilemaps. Canvas might perform abit better on phones.

    This is how i fixed it:

    function tilemaps() {
        map = game.add.tilemap('level_1');
        spriteBatch = new Phaser.SpriteBatch(;
        blockedLayer = map.createLayer('blockedLayer');
        background = game.add.tileSprite(0, 0, 768, 288, 'background');
        foreground = game.add.sprite(0, 0, 'foreground');
        map.setCollisionBetween(0, 12, true, 'blockedLayer');


  10. @rcoaxil

    Thanks for your suggestion. I tried using spritebatch but they didn't render with the camera. Instead it resultet with black parts where it should've rendered. (I might have done this wrong)

    Anyways, I tried something else which worked. I added the tilelayers inside a spritebatch that isn't put to stage. Then i export an image from Tiles and then handling them as a sprite overlay. It might be a strange way to do it, but it improves the performance significantly,

  11. @nobody

    Afaik canvas has to render for every layer, which means that it has to render twice as much as with one. And then ofcourse its better to use as few layers as possible.

    I think its abit missleading to not adress this with the tilemap examples.

    The best solution is probably to not use tilemaps at all, and rather use another third party program that stores sprites properties. Like overlap2d, or mighteditor.

  12. Has anyone else encountered this before?

    I've tried some approaches, like stripping everything down to one layer and using tilesprites as background/foreground layers. It helps, but not close to what I want. I also tried phaser-tiled, it helps, but it doesn't support arcade physics yet. There probably are some rendering techniques I'm overlooking, but I'm not that experienced with Pixi. Any input is appreciated! Thanks!