mapacarta

Members
  • Content Count

    44
  • Joined

  • Last visited

1 Follower

About mapacarta

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://mapacarta.com/

Profile Information

  • Gender
    Male

Recent Profile Visitors

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

  1. mapacarta

    Is there a problem with phaser time

    Thanks for the explanation, I didn't know phaser smooths out the delta time but that make sense when I think about it. Otherwise with a low fps, tweens would go crazy. I will see what I can do to make the game run faster at the beginning. About the physics, I already use x+=velocity*dt. The velocity doesn't depend on delta. I typed x+=speed just to express that I didn't use physics engine. Velocity depend on delta can cause really weird behaviours I guess
  2. mapacarta

    Is there a problem with phaser time

    I experienced some problems with the phaser time(delta value mostly) when developing a game with lots of images on the screen. The delta value on the update function always has values around 16.6 (which means game has close to 60fps I guess). But since my game has lots of images, some frames take longer to execute so I tried to fix the movements by multiplying them with delta*60/1000 (when the delta is around 16.6 this value is nearly one so no fix is applied). Because delta value is always around16.6, this didn't help me. So I calculate the delta time between frames with new Date().getTime() and by using this new value movements became much better. (Btw, my game doesn't have any physics in it so I move the objects with classic x+=speed type of way) Here are the values phaser delta and getTime() produces: (phaser delta is on the left always 16.6 as you can see): I have experienced another weird issue in my another game which may also seem time related, I have a real simple game and nearly for all movements it uses tweens. When I test the game on my android device it starts pretty slow for the first 10-15 seconds. At the start there are 2 tweens which normaly should last something like 0.5 seconds but it took seconds to complete. After the first 10-15 seconds the game runs perfectly. But the first 10-15 seconds are quite important for my game. So is it possible that there is a problem with the phaser internal time? I don't know how tweens work but if they are using the same value with update method's delta, this may be the reason.
  3. mapacarta

    tween: appear and disappear

    It should be targets not target this.tweens.add({ targets: man, x: -416, duration: 2000, ease: 'Power1' });
  4. mapacarta

    resize question

    Since english isn't my native, it is a little hard for me to explain the problem. It is working 1 time because the way you add the resize function to the event listener is wrong. When you add it as this.resize(), it runs the function and adds the returned value (it is undefined in your code) as the callback function for the event listener. So it doesn't call anything. If you want to access this(scene) in the resize function you can use bind or old that=this method Bind is usually a more elegant solution, so this should work in your case: window.addEventListener("resize", resize.bind(this), false);
  5. mapacarta

    New to phaser - scoping issue

    In phaser 3, game.add doesn't refer to object factory (it is undefined actually). Instead you should use this.add (this refer to scene) Something like this should work: var config = { type: Phaser.AUTO, width: pageWidth, height: pageHeight, scene: { preload: preload, create: create, update: update } }; var game = new Phaser.Game(config); function preload () {} function create () { createBoard.call(this); //var icons = this.add.group(); //Works here } function createBoard() { var icons = this.add.group(); }
  6. mapacarta

    how to decelerate sprite arcade physic

    As far as I know when damping set to true, setDrag takes value between 0-1. I don't know how it works when damping is false
  7. mapacarta

    how to decelerate sprite arcade physic

    You can try using drag or you can calculate it yourself in update method. Here is how you can do it with setDrag: sprite.body.useDamping=true; sprite.setDrag(0.99);///takes value between 0-1 you can also set x,y seperately setDrag(x,y)
  8. mapacarta

    Matterjs collision breaks at high speed

    It is tunneling. Physics engines have ccd(continues collision detection) to detect such collisions but matterjs doesn't have . You can try increasing position and velocity iterations but they probably won't be enough for too fast objects. this.matter.world.engine.positionIterations=20; this.matter.world.engine.velocityIterations=20;
  9. mapacarta

    [Phaser 3] Chase of Boxes

    Thanks. I will fix it. The shaking bothers me a lot actually, I will probably reduce or remove it completely.
  10. mapacarta

    [Phaser 3] Chase of Boxes

    Thanks for letting me know, I will look into it. That level also a little confusing I think
  11. mapacarta

    [Phaser 3] Chase of Boxes

    I released a new platformer game yesterday. It is a little game, I couldn't find much time since I started working full time a month ago. Hope you like it: https://www.kongregate.com/games/mapacarta/chase-of-boxes Any feedback is appreciated. Because I don't have much time to work on new ideas these days, I am thinking about making small platformers like this one in the future.
  12. mapacarta

    inheritance in phaser 3

    Thanks, it helped a lot.
  13. mapacarta

    inheritance in phaser 3

    I still couldn't find how to add a custom arcade sprite properly I am just using some workarounds and stuffs like that. Here is what I am currently using: var customObject = new Phaser.Class({ Extends: Phaser.Physics.Arcade.Sprite, initialize: function customObject (scene, x, y) { Phaser.Physics.Arcade.Sprite.call(this, scene); scene.physics.world.enableBody(this,0); scene.sys.updateList.add(this); this.setTexture('object'); this.setPosition(x, y); } }); Is this the right way to add inheritence or is there any better way?
  14. mapacarta

    [Phaser 3] Protect The DOJO

    I got this little game idea a few weeks ago, I thought it would be fun to make a fighting, upgrade type of game. So, I developed the game and released it 2 days ago, here is the game: https://www.kongregate.com/games/mapacarta/protect-the-dojo
  15. mapacarta

    Hello

    Hello and welcome