Jump to content

How to use phaser documention


Go to solution Solved by valueerror,

Recommended Posts

im new to game development and i began with phaser which seems to be a great framework but i can't understand it's documention very well. Lets talk about phaser groups.

How you understand how to use groups based on the documention ? Examples are clearer but limited they dont cover everything.

Link to post
Share on other sites
  • Solution

you will get the grip on the docs eventually..  they are easy to read if you already know phaser and how it is structured. for a beginner they are totally confusing.. at least in my opinion..  

 

lets talk for example about something very common..  the physics body..  you probably know that you have to enable it for every sprite by calling    game.physics.p2.enable(somesprite);

 

then you can access it throug somesprite.body

 

if you now want to find out what you can do with the body.. what the available methods and attributes are you go to the docs..  find the menu "physics" chose your system "p2 physics" and then "body"

 

it will then tell you where you are on top of the page: 

Phaser.Physics.P2. Body

everything on the right side (the table) can be used directly on the body.. of course you do not write "Phaser.Physics.P2.Body.angle = 45;"   but "mysprite.body.angle = 45;"

 

 

another approach to the documentation is phaser chains:

http://phaserchains.boniatillo.com/

 

it automatically searches for .. for example "body"  in the docs the moment you start to write "body"

the one very nice thing for beginners is that on the right side (scroll down probably) it shows several use cases of the word body from real code examples from the official examples :)

Link to post
Share on other sites

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...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...