Jump to content

Phaser build issue


jotaSe
 Share

Recommended Posts

Hi, I'm new on the forum so, Let me introduce myself, I'm a noobie gamedev, I'm a java developer and my work is, you know, make apps for clients, but I'm taking my free time to start to create game, I just start using Libgdx, because of java, and because i only work in backend. My frontend background is to little, and I guess I'm having some problem with that, I just create a Flappy Bird clone game, forking another project, and I customize it and implemented more stuff, The game is great, but when i tried to build it for mobile devices i got a lot of problems, 

 

  1. Using phonegap I lost fps and the audio doesn't work, I'm loading a audio sprite with diff format "mp3,wav,ogg,acc", but still not working

 

  2. Using Intel XDK, it doesn't load images, the screen it's always black, but it make the sounds well

 

  3. Using CocoonJS, the same thing with XDK, but worse, it even make any sounds, just it's a black screen

 

  I'm using a div to enclose the game, iis it that for?

 

  This is my index.html

<!doctype html><html>    <head>        <title>Flappy Free!</title>                <meta name="viewport" content="width=device-width, user-scalable=yes">        <meta name="apple-mobile-web-app-capable" content="yes">        <link rel="apple-touch-icon" href="assets/icon.png">        <link rel="apple-touch-icon" sizes="120x120" href="assets/icon-120.png">        <style>            body {                background-image:url('background.png');                background: #abc;                margin: 0;                padding: 0;            }            #screen {                margin: 0 auto;                max-height: 800;                max-width: 460;                            height: 100%;                width: 100%;                        }                        </style>         </head>    <body>                <div="screen"></div>        <script src="phaser.min.js"></script>        <script src="main.js"></script>           </body></html>

Using a browser in my pc the game works really fine you can test it here :

GAME

 

P.D The div is in the 3rd page, and I know ain't the same index.html, but the original above is what i'm using for build.

 

I hope you can help me with this, I'm actually in love with the framework, but if can't solve that, I have to only work with native code :/. Cheers !

Link to comment
Share on other sites

Well, I started all over new the project, and i use the code to scale that was provide her in forum, now the game on the mobile it's much better, but it doesn't make any sounds yet, I'm using howler.js to create the audio sprites usont ogg and wav format, any advice for this? I'm testing it in a Android 4.2

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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