Software Archive
Read-only legacy content
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
17065 Discussions

Phaser game gets stretched inside emulator

Vladimir_Z_
Beginner
141 Views

My game is not properly stretched inside Intel XDK emulator

It is a Phaser 2.2.2 game but I haven't used Intel XDK template for Phaser games. The strange thing is, live layout mode and even when I install the apk on my Nexus 7 device, the game properly fits inside viewport.

The game size is 720 x 480.

What should I do to the emulator or to my game code to improve this?

SI-IntelXDKEmulator.png

 

0 Kudos
5 Replies
Dale_S_Intel
Employee
141 Views

does it look different in landscape vs portrait mode?  You can change that in the emulator with the buttons next to the blue "back" button.

 

Vladimir_Z_
Beginner
142 Views

Strangely in landscape the game its not stretched or squeezed. 

Just to note, I haven't included init-dev.js neither app.js. Does this has something to do with this issue? I am including phaser.min.js like any other js script and I have my own custom made application structure. 

I have init() function which creates game object and initializes all things on "DOMContentLoaded" event. 

SI-IntelXDKEmulator2.png

Vladimir_Z_
Beginner
142 Views

I haven't tried Debug mode but now i did and I have two screen-shots which also show strange behavior. Event with these settings: 

This code inside all android config files:

<platform name="android">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="SplashMaintainAspectRatio" value="false" />
    <preference name="windowSoftInputMode" value="adjustPan" />
    <preference name="configChanges" value="orientation|keyboardHidden" />
    <preference name="loadUrlTimeoutValue" value="700000" />
</platform>

And this is in index.html

<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1, initial-scale=1, user-scalable=no">

Any ideas how to prevent the keyboard to stop squeezing the game viewport?

Should I use some  sCordova plugin?

This is when the keyboard is down:

SI-IntelXDKEmulator4.png

This is when the on-screen keyboard is up

SI-IntelXDKEmulator3.png

Vladimir_Z_
Beginner
142 Views

But it works well on my Nexus 7 tablet :)

DSCN0357 - small.JPG

DSCN0355 - small.JPG

PaulF_IntelCorp
Employee
142 Views

What happens if you try using the Ionic keyboard plugin to control the behavior of the keyboard?

Reply