Owmyhead Posted August 3, 2014 Share Posted August 3, 2014 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 More sharing options...
eguneys Posted August 3, 2014 Share Posted August 3, 2014 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 More sharing options...
Manifest Posted August 3, 2014 Share Posted August 3, 2014 One option to consider is using Typescript instead of Javascript while you get to grips with Phaser, as IDEs like Visual Studio etc will provide you with Intellisense/autocomplete to help you find the things you want. Of course, then you might have to learn Typescript. Massemassimo 1 Link to comment Share on other sites More sharing options...
lewster32 Posted August 4, 2014 Share Posted August 4, 2014 Just to add, Visual Studio also supports intellisense with plain JavaScript. Massemassimo 1 Link to comment Share on other sites More sharing options...
Massemassimo Posted August 6, 2014 Share Posted August 6, 2014 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). clark 1 Link to comment Share on other sites More sharing options...
Recommended Posts