• Content count

  • Joined

  • Last visited

About veggis

  • Rank

Recent Profile Visitors

688 profile views
  1. Spawn Sprites as they get close to player

    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.
  2. 2.5D platformer?

    @Raggar @vtange Great examples! This is definetity what i'm looking for. I'm thinking it would probably be easier to implement it with a 3d phsyics engine. But probably better performance wise with something like p2. Im not sure. Thanks everyone!
  3. 2.5D platformer?

    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
  4. body touching callback?

    I have a class that extends phaser.sprite, and in update i want to do something to the object that its body is touching. Is there a way to get the sprite/object from body.touching? .. If that makes sense.
  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? Thanks
  6. Is this project going obselete? There hasn´t been any update since 2.4.4 and im wondering if this project is dead. I tried to contact them about the 2.6.2 update a couple of days ago, but I haven´t got any answered as of yet.
  7. Subpixel render / pixelart scaling

    @hexus Yeah it totally makes sense. But wouldnt roundPixels take care of that?
  8. Subpixel render / pixelart scaling

    After some messing around, it seems like you get this effect only when the game is scaled by a non-integer.
  9. Subpixel render / pixelart scaling

    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?
  10. 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? Thanks!
  11. one jump.

    Since update is checking for if keyjump.isDown, you can rather add a function when input is pressed. Add this in create method: keyJump.onDown.add(someJumpFunction, this);
  12. Dynamic speed on tween

    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? Thanks
  13. @flahhi Are you sure its caused by post-rendering? Have you monitored what eats up the process?
  14. World size smaller than screen size

    @Starcluster You want to set worldbounds to be equals or smaller than the screensize? You can use viewport to get it;
  15. World size smaller than screen size

    If you want the canvas to rescale to screensize you can use game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; in your preload.