Jump to content

Is it possible to preview Phaser 3 game using Adobe Phonegap


tkohey_sad
 Share

Recommended Posts

Hello everyone,
I would like to develop a phaser game for mobile.
I want to use Adobe Phonegap to preview my game on mobile device.

https://build.phonegap.com/

but unlucky, my device doesn't display anything

it works on Phaser 2 about test the game on the mobile device using phonegap,
but not work on Phaser 3, any idea??? Thank you very much

My code:
www/index.html

<!doctype html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8" />
<title>Making your first Phaser 3 Game - Part 3</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser.min.js"></script>
<style type="text/css">
    body {
        margin: 0;
    }
</style>
</head>
<body>

<script type="text/javascript">

var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    scene: {
        preload: preload,
        create: create,
        update: update
    }
};

var game = new Phaser.Game(config);

function preload ()
{
    this.load.image('sky', 'assets/sky.png');
    this.load.image('ground', 'assets/platform.png');
    this.load.image('star', 'assets/star.png');
    this.load.image('bomb', 'assets/bomb.png');
    this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 });
}

function create ()
{
    this.add.image(400, 300, 'sky');
}

function update ()
{
}

</script>

</body>
</html>

 

1.png

Link to comment
Share on other sites

Notes that:

PhoneGap build is dead. 

As of Oct 1, 2020,  Adobe has discontinued PhoneGap Build and ended investment in PhoneGap and Apache Cordova.

if you want to remote preview your Phaser 3 game on your mobile device, please change to another WebView Testing Tool (eg: WebView Tester).

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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