Jump to content

Pixi.js on Windows Phone HTML5 App


enpu
 Share

Recommended Posts

I just tried to port my Pixi.js game to Windows Phone 8 and ran into one big issue.

 

In Windows Phone HTML5 App, you cannot use XMLHttpRequest to access your applications local files,

so you cannot load bitmap fonts, spritesheets or Spine animations :(

 

Here is a thread about it:

http://social.msdn.microsoft.com/Forums/windowsazure/en-US/cd2d798c-39f0-4cb5-bb11-340dcf069310/getting-xmlhttprequest-to-work-on-windows-phone-html5-app?forum=wpdevelop

Link to comment
Share on other sites

I gave it a try, and after couple hours finally got it working.

 

Here is the code that you need, if you want to get your Pixi powered game to work as Windows Phone 8 App.

 

Add this to your pixi.js:

https://gist.github.com/ekelokorpi/8181436

 

Add this to start of every PIXI-loaders (JsonLoader, SpriteSheetLoader, BitmapFontLoader, SpineLoader) load function:

https://gist.github.com/ekelokorpi/8181458

 

And here is the MainPage.xaml.cs file for your Visual Studio Express project:

https://gist.github.com/ekelokorpi/8181474

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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