Jump to content

A quick Phaser update


rich
 Share

Recommended Posts

Hi all,

 

Just thought I'd share the current progress with Phaser, and what's going on at the moment.

 

I've done a lot of work on 2.0.6, which is nearly ready, but still needs some further testing and a few more priority issues from the issues list resolved before release.

 

I haven't updated it significantly in the last week or so because I've been completely working flat-out on the new Phaser web site. Initially I thought it was going to be WordPress based, but the more I worked with it, the more I realised it just wasn't flexible enough for my needs and would hamper my workflow.

 

What I came to realise is that in order to be really efficient (in terms of my ability to update it quickly), I needed a markdown and flat-file based site, not a WordPress one. But of course there are still lots of parts of the site that are dynamic, so I couldn't go all out an use a static site generator like Jekyll either. What I settled on was learning Laravel 4 and coding it myself. I've done php dev for, err.. decades now (man, I feel old) so all I had to actually do was learn how Laravel operates - and I'm really thankful I did. It's a beautiful system: powerful Blade templating, very smart router and lots of great user auth / ecommerce things built in.

 

I've managed to build the site exactly how I wanted it to work now. It's got loads of great new content, is extremely flexible, and most important of all: it's super fast for me to add new content to it. I'm very nearly finished and hopefully this week will be the final week I'm working on it. Oh and yes, it's got a full on-line code editor now :) So you can tweak all of the examples directly on the site.

 

New docs

 

As a nice side-effect of doing the site work I ended-up writing my own Phaser documentation generator. I was fed-up with the jsdoc approach, the weird structure of the html template and how parts of it just didn't work (like line numbers were never correct for example). I understood why: it's because it worked by actually parsing the javascript code, but then it never showed things like the Pixi level properties for example. In the end I wrote my own jsdoc parser that scans the Phaser source files and builds its own definitions up.

 

There are several benefits to this: 1) I'm still using jsdoc notation in the source code, that hasn't changed. 2) I can now output the docs into a format much more suitable for both the new site and just for generally finding stuff, and most fun of all: 3) The whole docs are now dumped out as a json file too. Which means if you don't like the new layout you're totally free to parse the json file into your own preferred style. Or even use it included in an online editor to provide the help system.

 

I'll also include the ability to export the docs into other formats, maybe plain text, un-styled html, etc. Anyway the json docs will be part of the 2.0.6 release.

 

So that's it for now. Feel free to post questions if you've got them.

 

Cheers,

 

Rich

Link to comment
Share on other sites

 

 

Oh and yes, it's got a full on-line code editor now  :) So you can tweak all of the examples directly on the site.

 

Wow. This is going to be such a useful tool for adapting or testing out variations of the examples before putting the code into the game itself. Thanks Rich!

Link to comment
Share on other sites

  • 2 months later...

hi,

wish i see this post before...

 

i've been working on docgen php files to achieve some of the tools mentioned in this post (online examples editor with autocomplete, tooltip, contextual help)

 

it's seems docgen is "typo sensible" (ie a single extra space in js comments causes malfunction) and will require initial tiding up and careful later editions of js comments

 

anyway will be great to reduce learn efforts and time

 

can i help in any manner?

 

regards

Marcelo

 

 

 

 

 

 

Link to comment
Share on other sites

I've been working on docgen a lot these past few days, and I'm happy it's now stable enough to parse every file in the Phaser and Pixi codebase and export them to json. I've two issues remaining that I need to address (multi-line parameter definitions and merging extended methods and properties) and then I'll dump out the documentation as json and see what everyone makes of it.

 

I don't really care that it requires accurate jsdocs in order to work, as jsdoc itself does the same.

Link to comment
Share on other sites

Great!

 

 

is it on github.com/photonstorm/phaser? at phaser-master\docgen? (10 days ago or so)

 

i worked with them yesterday and see some issues when parsing core/Game, geom/Rectangle and others

 

but may be i dont know where is your recent work (im bad using github...)

 

Thank you

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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