rich Posted June 23, 2014 Share Posted June 23, 2014 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 turnA, Zenryo, george and 5 others 8 Link to comment Share on other sites More sharing options...
ianmcgregor Posted June 23, 2014 Share Posted June 23, 2014 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 More sharing options...
feiss Posted June 23, 2014 Share Posted June 23, 2014 I love the docs being exported to json. Great job! Eager to see the new website too Link to comment Share on other sites More sharing options...
wayfinder Posted June 23, 2014 Share Posted June 23, 2014 Sounds great! Just to clarify: Will the docs now include stuff like the p2 vec2 functions etc? Link to comment Share on other sites More sharing options...
tackle Posted June 23, 2014 Share Posted June 23, 2014 Good choice on Laravel there - we use it a lot at work for stuff that isn't just a plain simple CMS (Wordpress).It's really easy to use and expand. Link to comment Share on other sites More sharing options...
muclemente Posted June 23, 2014 Share Posted June 23, 2014 Awesome news With the docs in json, it should be easier to build some kind of Sublime Text support for better autocomplete and tooltips. Link to comment Share on other sites More sharing options...
JHardin1112 Posted June 23, 2014 Share Posted June 23, 2014 Hey Rich, my question is a bit off-topic, but I was wondering if you were still planning on persuing making Phaser work for Wii U on the NWF? Sorry, I've been out of the loop for awhile and just wanted to catch up on this. Other than that, congrats on the popularity of Phaser! Link to comment Share on other sites More sharing options...
BitOfGold Posted June 24, 2014 Share Posted June 24, 2014 Online code editor is a great idea! Maybe you could join that with Phaser examples to start and fiddle with. Link to comment Share on other sites More sharing options...
mzamateo Posted September 17, 2014 Share Posted September 17, 2014 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? regardsMarcelo Link to comment Share on other sites More sharing options...
rich Posted September 17, 2014 Author Share Posted September 17, 2014 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. clark 1 Link to comment Share on other sites More sharing options...
mzamateo Posted September 18, 2014 Share Posted September 18, 2014 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 More sharing options...
rich Posted September 18, 2014 Author Share Posted September 18, 2014 dev branch Link to comment Share on other sites More sharing options...
Recommended Posts