Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

From cocos2d-html5 to Phaser


Bruno Assarisse
 Share

Recommended Posts

Hey, guys!

 

This is my first post here, and that is because I will start porting a code I started on cocos2d-html5 to Phaser. Basically, I'm not happy with the performance and I will try rewriting it so see how it turns out on this lib =)

 

Here's what I built so far, pretty simple: http://bassarisse.com/webgames/platformer-test/

 

Firstly, I would like to know if anybody has some tips to learn the API easily (or any other tips that could help on this transition). Like, cocos2d-html5 don't have a good docs, but as I have read the docs from (and used) cocos2d-iphone, and the API is almost the same, I started coding without problem. If I go and read the Flixel API, would it help for me to know my way around Phaser? Well, I'm currently messing with the examples to get me started, good thing there's a lot of them =)

 

Secondly, my main question: does Phaser supports sprite sheets generated by Zwoptex? I saw this template to export to JSON, but I'm not sure if it works.

https://gist.github.com/darktable/1444795

 

Thanks in advance!

Link to comment
Share on other sites

Hi,

 

The docs are coming really soon! We've nearly finished marking up the entire library. I fully expect we should be able to release them all next week. We are also producing as many new examples as we can, as I think you need both really. API docs will be great, but they don't show you how it should all glue together. The examples will.

 

Zwoptex exports to JSON, so as long as it follows the Texture Packer way of handling things it should be fine. Try it and see - if it doesn't send me a PNG and JSON file that Zwoptex outputs and I'll look at supporting it. I'm sure it won't take long to add to the parser.

Link to comment
Share on other sites

Zwoptex does not exports to JSON out-of-the-box and I couldn't find a template that worked on Phaser, so I created a new one based on the one I linked before.

Here's the code if anybody need it:

https://gist.github.com/bassarisse/6709659

Also, the new version of cocos2d-html5 really improved the performance on iOS: http://bassarisse.com/webgames/platformer-test2/

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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