fabricator Posted August 27, 2015 Share Posted August 27, 2015 Hello friends!Here is my first Phaser game -- Minesweeper. Game: http://blog.francis.wang/minesweeper/Source: https://github.com/go717franciswang/phaser-ms (Because I am still learning Phaser and Google Play game service API, I was experimenting with a lot of things. As a result, the code base was a horrendous mess ) I chose to remake minesweeper because it is one of my favorite games, and it has simple logic. I used Google Play game service to enable persistent leaderboard and achievement.Some difficulties I had during development:I didn't have a good way to listen for simultaneous left and right mouse button click because onInputDown would only trigger one time when both buttons are clicked at the same time. My workaround was whenever onInputDown was triggered, game engine checked if the other button was clicked around the same time (https://github.com/go717franciswang/phaser-ms/blob/master/js/play.js#L192).Just found out this doesn't work on all browsers. Looking for a more reliable way to solve this.I tried to add Google Play game service event tracking for the number of clicks, flags, wins, etc to show some interesting stats in the achievement page. The Google API did not allow sending event data once per game because each game window may be too short or too long to be a valid API request. So I wrote an event manager that sends new data every 60 seconds (https://github.com/go717franciswang/phaser-ms/blob/master/js/gapiEventManager.js). I welcome all feedback, and am looking forward to making more Phaser games! Francis Quote Link to comment Share on other sites More sharing options...
vez Posted August 28, 2015 Share Posted August 28, 2015 Really cool! The google+ integration worked fine, and the leader board is a nice touch. The game itself was a good replication of minesweeper but I missed the scared face when you left click on an unknown space. The graphics are a bit ugly in my opinion, mainly because of the smoothing. Overall though a really nice implementation of an online minesweeper fabricator 1 Quote Link to comment Share on other sites More sharing options...
fabricator Posted August 28, 2015 Author Share Posted August 28, 2015 Hey vec! Thanks for your kind words. They are very encouraging! I completely forgot about the scared face. I'll try to add it next.I am a pretty terrible drawer, especially with Gimp. I tried to turn off smoothing with game.stage.smoothed = false;I guess that didn't do the job. Do you know a good way to turn off the smoothing?EDIT:Just found an example: http://phaser.io/examples/v2/display/render-crisp#gv. It mentioned the following:// Or across the whole stage, like this:// game.stage.smoothed = false;uncommenting the 2nd line didn't pixelate the melon in the game, but when I addmelon.smoothed = false;It did the job. So maybe game.stage.smoothed is buggy .EDIT2:moved game.stage.smoothed = false to the preload function, now smoothing is successfully disabled. vez 1 Quote Link to comment Share on other sites More sharing options...
AlgoGames Posted September 5, 2015 Share Posted September 5, 2015 Nice implementation of a classic game.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.