When a site is moved from HTTP to HTTPS which is already indexed by Google, we must add a new property for the HTTPS URL in Goolge search console. When Google tries to index the site and it finds HTTP URL indexed for the same page, it will mark the HTTPS pages as canonical. We should use “301 Moved Permanently” to tell Google that HTTP URLs are moved to HTTPS and Google should prefer HTTPS over HTTP. Here is a sample code to be used in an ASP.NET web application for 301 moved status
If you have made an HTML5 game and have compiled the game to an APK using Cordova and now want to add Play Games Services to your app to use Leaderboard and Achievements from Play Games Services, you need to follow a set of steps to make it work. If you want to learn how to use cordova to compile HTML5 game to an APK and publish to the Google Play Store, follow the steps @ https://www.netexl.com/blog/use-cordova-to-compile-html5-games-to-android-app/ Assuming that we have installed all tools for cordova on our system and can compile the game to the APK, we will follow next steps for the Play Games Services integration. First we need to find a cordova plugin which integrates the Play Game Services API and add it to our project. Go to NPM and search for the latest plugin for the Play Game Services integration. If you have not already created[…]
I recently wrote a HTML5 webgame utilizing simple canvas apis and added both mouse events and touch events to make sure it can be played on both desktop as well as mobile devices which led to the issue on mobile where touch events were getting called twice and not just once. The code I used to add events was as following It seemed like mouse events were geting called in addition to the touch events. After debugging this issue for hours and trying many suggestions found online, nothing worked so I switched to simply add only one set of events based on the device type. If it is mobile, call touch events and if it is desktop, call mouse events. Here is the modifed code I used which is wroking perfectly on both mobile and desktop devices.
I recently had to publish a game on my website which was written by another developer and was in public domain. My website was responsive and worked great for PC, tablet and mobile but this game came in a fixed size and was not responsive. It was using canvas which could not be resized inside an iFrame to fit in the available space so I looked for options to fit this game in my website layout and make it work for all devices (PC, tablet, mobile). The idea was to use something which would work similar to how mobile devices use viewport to fit the content in its browser. CSS3 comes with the support for scaling of iFrame content which works perfectly in my scenario so the embeded game/page is scaled down to fit in the iFrame. There is some computation required to scale the embeded page correctly. The article[…]
In puzzle games where we need to add borders to our puzzles and mark various zones, we can use Phase Path to draw those lines. For this example we are going to draw something like the image below Let us start by creating our html file and including Phaser 3 js and our game js in it. Now our JS code for would be Try running this locally in your web server and you will see the result as shown in the screenshot.
A useful code I found online. Posting here for future reference.