Jump to content

Ulbast

Members
  • Content Count

    22
  • Joined

  • Last visited

About Ulbast

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Decreasing the value of collisions of bullets vs bullets and changing blocks into one type solved a thing, 60 fps now! Thank you guys!
  2. Hi, in my finished game I've found a thing, that slows my game from 60 to 30 fps. Too many collisions handlers. Well I need them to control whole game, to call all essentiall functions, but they are sloooooowing game drastically. game.physics.arcade.collide(bullets, layer, resetBullet); game.physics.arcade.collide(grenades, layer, resetBullet); game.physics.arcade.collide(ebullets, layer, resetBullet); game.physics.arcade.collide(chest3, chest5, chesting); game.physics.arcade.overlap(bullets, ebullets, resetBullet); It's for bullets to destroy chests, bullets with themse
  3. Thanks for your answers. Rendering from atlas is somehow complicated for me, the clearest , official tutorial have no basic explanation of it. But I've found a thing, that could be crucial here. Too many collisions handlers. Well I need them to control whole game, to call all essentiall functions, but they sloooooow game from 60 to 30 fps. game.physics.arcade.collide(bullets, layer, resetBullet); game.physics.arcade.collide(grenades, layer, resetBullet); game.physics.arcade.collide(ebullets, layer, resetBullet); game.physics.arcade.collide(chest3, chest5, chesting); game.ph
  4. Hi, I present you my game made in Phaser, here u are: redplanetgame.prv.pl I've finished it 3 months ago. It's a platform game, to collect all goals and kill enemies. When I was creating it, it worked fine, I mean, on full fps, but when I reach the end it drastically slowed down. I started few topic about this problem. I think, it's too many bullets or sth.(or my weird structure of code). When u inspect the browser, on bottom u can see all of my phaser code I've used. It's this: <script type="text/javascript" src="functions.js"></script> <script type
  5. Deleting the checkWorldBounds make game a lot faster, thanks a lot!
  6. When the bullet leaves the screen, in next second eventually it collide with wall and die. In addition, checkworldbounds is set true. The shooting look like this: //CREATE //ENEMY BULLETS ebullets = game.add.group(); ebullets.enableBody = true; ebullets.physicsBodyType = Phaser.Physics.ARCADE; game.physics.enable(ebullets, Phaser.Physics.ARCADE); ebullets.createMultiple(50, 'enemy_bullet'); ebullets.setAll('checkWorldBounds', true); ebullets.setAll('outOfBoundsKill', true); ebullets.forEach(function(bullet){ bullet.body.collideWorldBounds = true;
  7. When I'm increasing the pool, the game goes slower and slower. Any other ideas?
  8. Well I solved the problem, the issue was in Tiled Editor, where the important was the name of tileset. Thanks for answer
  9. Both files are present on the server. E: the 404 log somoehow dissapeared, but the other remain: phaser.min.js:20 Phaser.AnimationParser.spriteSheet: '[object HTMLImageElement]'s width/height zero or width/height < given frameWidth/frameHeight spriteSheet @ phaser.min.js:20 addSpriteSheet @ phaser.min.js:20 fileComplete @ phaser.min.js:21 loadImageTag @ phaser.min.js:21 loadFile @ phaser.min.js:21 processLoadQueue @ phaser.min.js:21 asyncComplete @ phaser.min.js:21 fileComplete @ phaser.min.js:21 loadImageTag @ phaser.min.js:21 loadFile @ phaser.min.js:21 processLoadQueue @ phaser
  10. Hi, in my platform game I want to load map from Tiled. Everything was working fine, with this example: function preload() { game.load.tilemap('level1', 'assets/level8.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tiles-1', 'assets/tiles-1.png'); } function create() { //MAP SETTINGS map = game.add.tilemap('level1'); map.addTilesetImage('tiles-1'); map.setCollisionByExclusion([ 13, 14, 15, 16, 46, 47, 48, 49, 50, 51 ]); layer = map.createLayer('Tile Layer 1'); layer.resizeWorld(); } It worked perfectly, but when I just edited tilesheet
  11. After update, nothing changed. The function is not working ;/
  12. Creating objects while running? As my hero is copying himself every sec. or stth like that? Everything was working perfectly, since more objects come to life. Now when I'm removing a few bullets, everything goes faster. But it sounds ridiculous if this little amount of objects can slow the whole system...
  13. By increasing amount, as I suspected, its even worse, the game runs slower, because it has more objects to handle... Bullets are killed with collision with objects, like this: function resetBullet (bullet) { bullet.kill(); } game.physics.arcade.overlap(bullet, sth, resetBullet);
  14. Hi guys, my game was working fine, fluently, etc and I was expanding it. It's platform, where a lot of bullets are flying, also many spikes hang from the upper platforms. Now, when I add more spikes and more bullets, when the turrets shot them, the game drastically slows. Is too many object there? And what can I do to make it faster again? Creating spikes: function create_spikes ( x , y , number, angle, vertical) { for (i=0; i < number; ++k, i++) { if ( vertical != 'yes' ) { spikes[k] = game.add.sprite((x+i)*16, y*16, 'kolec'); } else
  15. I just realised that I'm one update behind. I will update, then.
×
×
  • Create New...