Phaser and NetBeans IDE (Part 3)

In part 1 and part 2 I introduced Phaser a bit. Let's now set up our project so that Phaser objects such as "Sprite" can be seen in code completion, as shown below:

What you need to do is clone the Phaser sources into your project's "www/js/libs" folder. Then wait a bit for background scanning to complete, which is when the parsing is set up.

And then you can use code completion, as shown in the screenshot above (click to enlarge it). Another approach is to create a symlink to your project from the cloned Phaser sources. Yet another approach is to use a PHP project, instead of an HTML5 project, since the PHP project has an include path setting in the Project Properties dialog, where external sources can be included for editor purposes, where the "phaser/src" folder can be registered. 

The approach of using the Phaser sources actually conforms to the standard way of developing applications with Phaser, as stated here: "You should include phaser.min.js in your html when you deploy the final, finished version of your game. Until that point you should use phaser.js (the non-minified version) as you'll get accurate debugging / line numbers from it should something die internally." (See here.)


First method doesn't work at all for me with NB 7.4, PHP method works fine. Thanks!

Posted by Michael on January 26, 2014 at 10:45 AM PST #

Thanks for posting about Phaser, Geertjan! I started playing with it after the first post.

I am a Java developer by day and have worked with animations in Swing and JavaFx (as well as JavaFx Script). I have to say that the Phaser API is a nice way to write a game AND it is cross-browser and mobile friendly.

I wrote a mini-game that is a parody of Plinko! from the daytime show The Price is Right!

Check it out:

Posted by Roberto on February 25, 2014 at 02:21 PM PST #

Great to hear, Roberto. Nice game. Did you use NetBeans IDE for that?

Posted by Geertjan on February 26, 2014 at 12:55 AM PST #

Thanks! Yes I used Netbeans IDE to develop the mini-game, as a PHP project.

Posted by Roberto Marquez on February 26, 2014 at 02:12 PM PST #


im trying autocomplete like this, but not work for me,

pls check image:

Posted by axxion on July 19, 2014 at 08:16 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2016