Jump to content

[PINNABLE?] Phaser.io - Best Practices


imshag
 Share

Recommended Posts

Hi Phaser.io community!

 

I will keep this short and simple.

 

I am new to the phaser.io framework and just finished my first game.

Although it "seems" to be doing fine performance wise, i am still in doubt of my correct/incorrect usage of the framework's functionality.

 

Since i haven't found any article/documentation/example on best practices and after spending hours upon hours inside the source files i decided to "open source" my concerns/questions.

 

I am sure there are plenty of burning questions/topics to be discussed. I would love for the community to come together and gather insights and best practices. 

 

To start things off

 

What is the best practice for moving a sprite from point(x,y) to point (x1,y2), in regards to performance? 

Details:

I am currently using "game.physics.moveToObject()" for my sprite's movements, since it is used in the included example files.

Yesterday i stumbled upon the "tween" functionality. I quickly modified my code in order to make use of it, hoping for a huge performance boost, but somehow no notable changes appeared. Are these functions based on the same internal process for moving/setting x and y positions?

 

Best Practices Overview

 

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...