CtlAltDel

Members
  • Content count

    159
  • Joined

  • Last visited

About CtlAltDel

  • Rank
    Advanced Member

Recent Profile Visitors

900 profile views
  1. Load SQL database in Phaser

    At the top of getQuestion do: var self = this; and then use self.sendQuestion(result); inside the onload. Read up on scoping in javascript
  2. Assign transparency to sprite

    It means it is 50% transparent.
  3. Client and server should both run the same simulation. Server is authorative, so it sends the results of it's simulation including the point in time where that was and the client predicts from there again running the sim. I am not sure if p2 is suited for this. For my own multilplayer tech demo I wrote my own simple 'physics' it's a topdown shooter so basically only collisions with walls mattered and how they affect the character movement.
  4. This series explains it all http://www.gabrielgambetta.com/fast_paced_multiplayer.html
  5. P2 Space Shooter Dogfight AI Rotation

    What you need is: http://gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-seek--gamedev-849
  6. How to keep attributes on objects?

    I would suggest treating PIXI as a render engine, and keep data related to your game objects ( =/= display) in your game objects. I see no need for extending with custom attributes. But that's just me. Separation of concerns.
  7. createMultiple not working for groups

    http://phaser.io/examples/v2/groups/create-sprite-in-a-group so it should work.
  8. createMultiple not working for groups

    game.add.group();
  9. Is it safeto have many states in Phaser?

    garbage collect(or)(ion)
  10. Is it possible to dump container object (sprite) to a file?

    I think you should use a rendertexture to accomplish that. Render to that texture and dump the contents of that.
  11. Spacebar tap function?

    read: http://phaser.io/examples/v2/input/keyboard-justpressed for a lot of options
  12. For loops and object pools

    It's looking up the next invisible sprite that might be costly if you have a lot of sprites.
  13. For loops and object pools

    It is probably faster to use 2 pools, 1 visible and 1 invisible if you have lots of sprites, then you can just pop one from the invisible list and add it to the visible list. Keep in mind this requires you to toggle the visible flag via a helper function that does the moving of sprite between pools.
  14. Performance issues are making project unplayable

    Your create functions each foreach and in that again each foreach. Maybe define those functions outside the loop and call them instead of using anonymous functions. You also create an array [en] inside the foreach. You might want to do have one array this.hitTestArray and just this.hitTestArray[0] = en, and pass this.hitTestArray to the p2 check. Both might account for some garbage.
  15. Pixi v2.3 Apply Shader

    You could use 3.0 and the pixi-lights plugin, that has deferred shading in it.