About vastron

Recent Profile Visitors

Make sure you provide the correct file name,
this.load.image('boat',' 'assets/bubble.png ')'
Also, I can not see your create method. Is it similar to this?
create: function(){
var boat = this.add.sprite(game.width/2,game.height/2,'boat');
boat.anchor.setTo(0.5);
}

Hello,
I created a pwa with Phaser 2, following this tutorial https://phaser.io/news/2018/10/progressive-web-apps-tutorial.
I face a problem with how the game scales on mobile.
In my game I use these Phaser 2 methods:
game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
game.scale.pageAlignHorizontally = true;
game.scale.pageAlignVertically = true;
When I click the localhost link in my mobile,
the game is way too big and when I 'download' it to act like an app, it gets really shaky at first, scaling up and down until it settles to the correct size.
The game dimensions are 1280x720.
It looked very nice before I converted it to a PWA.
I did an audit for a PWA in Chrome's dev tools and it showed this notification:
The viewport size is 1280px, whereas the window size is 412px.
Do you have any idea on how to fix this issue?

Guys I did not get this to work, can you please help me?
This is my code:
<link rel="stylesheet" href="lib/fontawesome-free-5.0.13/web-fonts-with-css/css/fontawesome-all.min.css" />
<script src="lib/phaser.js"></script>
<script src="scripts/game.js"></script>
this.computer = this.add.text(100, 100, '\uf108 ', { fill: '#4286f4', font: '30px FontAwesome' });
console.log(this.computer.text);
All I get is this :

@GSB Take a look at this tutorial.
https://www.joshmorony.com/part-2-building-a-word-search-game-in-html5-with-phaser/
It is a very good game but to my understanding it does not place specific words in the grid. It randomly places letters from the alphabet in the grid and if the player finds a word, it checks if such a word exists in a text file that is loaded to the game.

@GSB Take a look at this tutorial.
https://www.joshmorony.com/part-2-building-a-word-search-game-in-html5-with-phaser/
It is a very good game but to my understanding it does not place specific words in the grid. It randomly places letters from the alphabet in the grid and if the player finds a word, it checks if such a word exists in a text file that is loaded to the game.

Hi guys,
I have created some input fields in the DOM and I place them above my phaser game with css. In my game I use
game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
so I use media queries to control the position of the input fields.
I do it like this =>
#inputs {
position: absolute;
top: 30%;
left: 40%;
width:100%;
}
@media only screen and (max-width: 560px) {
#inputs{
top: 35%;
left: 20%;
transform: scale(0.8,0.8);
}
}
But it is almost impossible to follow the Phaser scaling!If you have any tips, please share!

It is a great plugin but unfortunately it does not work on mobiles.
Edit!!!!!!!!!!!!! It does if you put <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, width=device-width" />
on your html file.