Jump to content

Stuck on learning Phaser (beginner question)


Owmyhead
 Share

Recommended Posts

Hi all,


I recently started learning phaser framework by following online tutorials.


 


I am struggling to understand the process to construct the codes. As an example, here's a line from one tutorial:



this.timer = this.game.time.events.loop(1500, this.add_row_of_pipes, this);

I understand what this line does, but I don't get how game should be joined with time with events and end it with loop? None of the tutorials explain how one would traverse through all an object's members to find the right methods. 


I can consult the API but I still wouldn't know what to search for when writing my own codes.


 


Could you share some tips? Thanks!


 


tl;dr I know what I want to do, but don't know how to find things I can use.


 


 


Link to comment
Share on other sites

What do you specifically want to do?

 

Can you get a basic game going?

 

Do you understand how Phaser.Game works, how Phaser.State work, how you add game objects (Phaser.Group, Phaser.Sprite, Phaser.Audio, Phaser.Image etc..) to the game world?

 

Do you use Phaser.Physics, do you use Phaser.Tween, do you use Phaser.Timer.

 

These are basic questions you might want to ask.

Link to comment
Share on other sites

I really like Typescript with phaser since that makes it easier to realize bigger projects.

 

Also, since typescript "accepts" pure javascript, you don't even need to learn TS beforehand. You could just rename your js files to ts and it would work fine (even though that would defeat the purpose of using TS in the first place).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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