Jump to content


  • Content Count

  • Joined

  • Last visited

About Hadik

  • Rank
    Advanced Member

Recent Profile Visitors

1361 profile views
  1. Thank you for your reply, this should be very helpfull I appreciate it
  2. With both method I got almost same FPS. Can arcade hold physics like this (video bellow), I need simple physics, when I will simulate "blocks" in zero gravity space, unfortunetly I will also need joints for connect these blocks together, and make complex strucutres. On the other hand, in game will be around 50 000 blocks, but on the view, will be only about 500 maybe less, but I trying in P2JS disable physics out of camere view but withou success. Also only few block require full P2JS, rest of block will be out of screen, I want make complex strucutres from these blocks, but o
  3. I create a lot of game in Phaser.IO (for example very popular IO game mudwars.io - about 20k visitors per day) and I am now prepareing for next project, when I need some kind of P2JS system, where I can simulate huge number of blocks. But when I place about 3000 blocks, game performace is poor, on my (i5-4460 and AMD R9 270X) I got only 16 FPS.. So phaser is unusable, and I planning use much more counts, like 50 000 blocks. Then I try same thing in the Unity engine (2D), and with same numbers of blocks, I got full FPS(without vsync around 120 FPS). So is there any
  4. Unfortunately no, it's weird. I have only one solution recyclate this objects, kill and revieve in next time is require. I read lot of articles about this problem on stackoverflow. Developers which make games in the JS, have same problesm, where create and destroy instance over again (60 times every second), and after few minutes game crash. Most recommend use recyclating of this intances. Also this solution use Rich in his examples, for example /Games/Tank use this method.
  5. Thank you, but We are looking in dev tools a lot of hours, but we see only this. http://prntscr.com/cg5u02 (comparsion between two snapshost 30 seconds) Emitter not solve this problem, For example we have a bullet object, which is created when player press key, and destroy also with timer, same problem, if player will shoot for 30 minutes, memory will be filled and game crashed.
  6. In another object extends from sprite, call in update new SmokeEffect(this.game, exhaustPosition.x, exhaustPosition.y, this._onDirt, isMoving); and object player is global variable, I create instance of object Player (object extends sprite) We are desperate with this problem, it ruined are release plans
  7. Hello, I have simple exteneded object from sprite. Its simple smoke effect with tween alpha for some effects, after tween ends, call this.destroy(), for destroy and remove this sprite from game. But somethink vierd happends. I call this every tick, but memory increase more and more, and after few minutes browser crash. When I dont use this object, game run OK and memory not increase. I think there must be somethink, and this think not allow GC clear this instance. But I try clear object as example, only create sprite nothink else, and on the end put this.destroy(), same m
  8. Thanks both for post lewster32: Very interesting information, Where you find it ? I trust you, but I want more information, if is possible So, I will use three.js or try hack pixi to make what I want, but I could be very hard to solve it.
  9. Hello is there any option how sprite or bitmapdata disorate like this ? http://prnt.sc/cbta2h (Original image: http://prntscr.com/cbtabn) I know how to make skew, with few hours hacking pixi http://prntscr.com/cbtahj But its not still what I want I want to create fake 3D like in the GTA1/2 Move this sprite I cane done with paralax, but I still need some method how transform sprite to first image I know that there is some options
  10. OK I found best solution var length = 150; var realAngle = this.angle + 180; var radians = realAngle * Math.PI / 180; var x = this.x + Math.cos(radians) * length; var y = this.y + Math.sin(radians) * length; Works perfectly
  11. feudalwars: Thank you, good solution It's not fully clear solution, but better than nothink or complex math
  12. How I can get X and Y in the game like on this screen: http://prntscr.com/ay1k10 I will have rotated sprite which can be rotated and move by this.body.velocity.copyFrom(game.physics.arcade.velocityFromAngle(this.angle, 300)); and rotated by this.body.angularVelocity = -300; How Can I get coords forward this object forwared at axis X + 20 px, depends on rotation ? I try pivot and anchor to 2nd help sprite, but coords of this sprite is on center, not where is realy lays. Like this: http://prntscr.com/ay1jbw
  13. I use that (Read full topic ) But I found solution, not solve everythink, but it enough.
  14. Is there any option how to keep runing game (update function) when will game lost blur, switch tab. Yes I use game.stage.disableVisibilityChange = true; (in create, preload and also update) nothink change. I try avoid pausing in source code in the Phaser, but nothink change. Any solution which I found is: start own loop outside Phaser funtions, and when will lose focus (copied from Phaser source code) call update function. It works but its not clear solution. setInterval(function () { if (document.hidden || document.mozHidden || document.msHid
  • Create New...