Jump to content

PhaserEditor2D
 Share

Recommended Posts

1- Hello my Project Explorer looks empty. I setup the workspace in the mian folder (where there is index.html and subfolders of js)i have to open every file through open file . i want to use the editor with an existing project....i made something wrong?

2- Can this thread be pinned?

 

Answer 1) This "existent project" is it a project you created with Phaser Editor? The workspace cannot point to a project, a workspace is the folder where the projects are created, it is the parent of the projects. I recommend to create a workspace in a new path, it will create the folder for you. Then you can create the projects via File > New > Phaser Project.

 

Answer 2) I don't know, I guess only admins can pin a thread. For me it is fine :)

Link to comment
Share on other sites

Answer 1) This "existent project" is it a project you created with Phaser Editor? The workspace cannot point to a project, a workspace is the folder where the projects are created, it is the parent of the projects. I recommend to create a workspace in a new path, it will create the folder for you. Then you can create the projects via File > New > Phaser Project.

 

Answer 2) I don't know, I guess only admins can pin a thread. For me it is fine :)

1-ok thanks i did'it that way and worked.

2- admin are you there?

3- i have 2 issues:

 

a)intellisense autocompletes when a i create some of your functions (like add a new sprite) but it doesnt for something more common for the language, like console.log or if  i write game.add,sprite and press control space shows the message no template proposals.

B) i added a new js file and it is not recognized as js file.

 

 k2Al90C.png

 

so i ended working with php storm that does it recognize as js

Link to comment
Share on other sites

Hi @DonFrag,
 
Yet I am writing the quick start tutorial, it will help to explain how Phaser Editor works. From your picture I see that you are not using a Phaser Project, else a general Project. To make JavaScript to work you should create a Phaser Project.
Look that a Phaser Project has a JS overlay icon. Like this:
 
post-8392-0-53699200-1442233087.png
 
Also note it should show the JavaScript Resources node under the project.
 
>  but it doesnt for something more common for the language, like console.log
 
Yes you are right, I should include one of the browsers runtime (maybe the one of firefox), I will do it for the release.
 
 
>  if  i write game.add,sprite and press control space shows the message no template proposals.
 
Please if you can send me your whole project or at least the file you say it is not working. If the file is not working is the one you have in your picture I see some "problems" there.
Remember JavaScript is dynamic so the type inference engine is not "magic", you should provide static information to your vars. In the quick start I am writing I explain this with more details.
For example, if you have a method like:
 
function killEnemy(enemy) {}
 
If you write
 
enemy.
 
it is not possible to show all the methods of the sprite enemy, because the type of enemy is not specified. But you can do the following:
/** * @param {Phaser.Sprite} enemy */function killEnemy(enemy) { enemy.}

It display all the methods of Phaser.Sprite:

 

post-8392-0-23644300-1442234084_thumb.pn

 

You can "declare" the type of a var declaration with the @type tag:

/** * @type Phaser.Game */var game = ...;

When you import a game made with other tool than Phaser Editor, probably the vars are declared in a way that is hard to compute the static type of them. However, if you use the Phaser Editor templates, all is written in a way that vars are annotated with the type information. Also you can try adding new files with the JavaScript Source File wizards. You can create custom sprites, groups and game states:

 

 

 

post-8392-0-17758800-1442234422.png

 

I will try to deliver a tutorial as soon as possible. In the mean time you can watch the preview video and follow the same steps to create the projects and the js files.

 

Thanks for your comment!

 

 

Link to comment
Share on other sites

The doc search is awesome,but the auto completion doesn't work well.

In most case i type all the code and see no completion at all.

By the way,where can i find the example asset in you editor?

 

Please can you show here your code? I can help you with the coding style that the inference engine "understands". Also you can read the answer to @DonFrag.

 

What is the "example asset"?

 

You can create a Phaser Project based on one of the Phaser Examples (http://phaser.io/examples). Just go to File > New > Phaser Project, it opens a dialog, there you can find all the examples there, just browse the tree. Select a templete and press the Next button to write the name of the project.

Link to comment
Share on other sites

im currently downloading The zip file but seems its only available for windows users, right ?

will you publish a Mac version too ?

 

Yes, this preview edition is only for Windows x64, but I plan to release it to OSX and Linux as well.

When? I don´t know yet, maybe in one or two months, I am now working on complete the product and writing the user guide.

Link to comment
Share on other sites

 

Hi @DonFrag,
 
Yet I am writing the quick start tutorial, it will help to explain how Phaser Editor works. From your picture I see that you are not using a Phaser Project, else a general Project. To make JavaScript to work you should create a Phaser Project.
Look that a Phaser Project has a JS overlay icon. Like this:
 
 
Also note it should show the JavaScript Resources node under the project.
 
>  but it doesnt for something more common for the language, like console.log
 
Yes you are right, I should include one of the browsers runtime (maybe the one of firefox), I will do it for the release.
 
 
>  if  i write game.add,sprite and press control space shows the message no template proposals.
 
Please if you can send me your whole project or at least the file you say it is not working. If the file is not working is the one you have in your picture I see some "problems" there.
Remember JavaScript is dynamic so the type inference engine is not "magic", you should provide static information to your vars. In the quick start I am writing I explain this with more details.
For example, if you have a method like:
 
function killEnemy(enemy) {}
 
If you write
 
enemy.
 
it is not possible to show all the methods of the sprite enemy, because the type of enemy is not specified. But you can do the following:
/** * @param {Phaser.Sprite} enemy */function killEnemy(enemy) { enemy.}

It display all the methods of Phaser.Sprite:

 

attachicon.gifParamTypeAnnotation.png

 

You can "declare" the type of a var declaration with the @type tag:

/** * @type Phaser.Game */var game = ...;

When you import a game made with other tool than Phaser Editor, probably the vars are declared in a way that is hard to compute the static type of them. However, if you use the Phaser Editor templates, all is written in a way that vars are annotated with the type information. Also you can try adding new files with the JavaScript Source File wizards. You can create custom sprites, groups and game states:

 

 

 

attachicon.gifJavaScriptSourceWizard.png

 

I will try to deliver a tutorial as soon as possible. In the mean time you can watch the preview video and follow the same steps to create the projects and the js files.

 

Thanks for your comment!

 

Thank so much your Editor Rocks!

 

my fear was that i had an existing project so when i choosed New project i found this

4Kecqcf.png

 

So i feared that any choice would Replace what i had done so far. But i made a leap of faith, choose empty and target my work folder and voila! all worked fine for now.

I don't know if i was lucky or it was the way to do it but it worked anyway.

 

Thanks a lot your editor Rocks!

 

 

ADMINS SHOULD PIN THIS PLS!

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Omg, the sprite preview feature is Awesome.

Why no make it open-source??

The power of and program make for programmers on github can really boost it.

 

Hi @webcaetano,

 

Thanks, yes I am planing to open it under the MIT license. I am preparing the release candidate for Oct 31.

 

You can subscribe to the newsletter to be notified when the release is ready and the source is open.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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