Doyban

Members
  • Content Count

    16
  • Joined

  • Last visited

About Doyban

  • Rank
    Member

Contact Methods

  • Website URL
    https://doyban.com/
  • Twitter
    doybangames

Profile Information

  • Gender
    Male

Recent Profile Visitors

868 profile views
  1. Is it possible to make Firebase working on apps compiled by Cocoon? Followed https://firebase.google.com/docs/auth/web/cordova tutorial, tested on the device with error that cordova-plugin-inappbrowser is not installed. Tried to many plugins, all of those which are available throughout “Plugins” in Cocoon’s developer account. Really it seems to be there is actually NO plugin, which can handle Firebase for Cordova, really?! Some of them had issues during complication, some of them after - including cordova-plugin-inappbrowser. Errors after compilation with error “cordova-plugin-inappbrowser is not installed”: @d2d/cordova-plugin-inappbrowser @types/cordova-plugin-inappbrowser cordova-plugin-inappbrowser-progressed cordova-plugin-inappbrowser-custom cordova-plugin-auth-dialog cordova-inappbrowser appgn.plugin.custominappbrowser appgn.plugin.customappbrowserbeta2 archriss-cordova-inappbrowser-ios archriss-cordova-inappbrowser-android Errors during compilation: com.brainfall.cordova-plugin-inappbrowser custom-inapp-browser-plugin cordova-plugin-sscinappbrowser cordova-plugin-inappbrowser-wkwebview cordova-plugin-inappbrowser-popup-bridge cordova-plugin-inappbrowser-orcas cordova-plugin-inappbrowser-notification cordova-plugin-inappbrowser-location-editable cordova-plugin-inappbrowser-engage-irishferries cordova-plugin-inappbrowser-engage-if cordova-plugin-inappbrowser-engage cordova-plugin-inappbrowser-bypassssl cordova-plugin-inappbrowser-adv cordova-plugin-ete-inappbrowser cordova-fork-inappbrowser-allow-all cordova-customplugin-inappbrowser com.taxiapps.cordova-plugin-inappbrowser com.shoety.cordova.plugin.inappbrowserxwalk com.dt-workshop.inappcrossbrowser
  2. Found temporary solution, the problem is actually I won't destroy the player in most cases, as once the player dies the most often times the gameplay (not whole game) is restarting, only after reaching some point in the game there is classical "Game Over" with possible back to menu, it took me too many hours already, I think will stay with that solution, at least it works. For others, if you'd have similar issues, maybe just in my case architecture is hard-coded already, and would need to change too much, including idea. // WORKING this.stick.visible = 0; this.buttonFireball.visible = 0; // OLD, THROWING AN ERROR // this.stick.destroy(); // this.buttonFireball.destroy();
  3. I tried to destroy it in many places, I see a hope that you know what can be wrong, I'm gonna to send you a bit longer code. Player.js YellowSidd.Player = function (game_state, name, position, properties) { ... this.pad = this.game.plugins.add(Phaser.VirtualJoystick); // Initialize VirtualJoystick Plugin. this.stick = this.pad.addStick(60, 340, 45, 'generic'); // Add stick for Virtual Joystick. }; YellowSidd.Player.prototype.update = function () { "use strict"; // Check player collision. this.game_state.game.physics.arcade.collide(this, this.game_state.layers.collision); // Layers collisions. this.game_state.game.physics.arcade.collide(this, this.game_state.groups.enemies, this.hit_enemy, null, this); // Enemies collisions. // The player automatically dies if in contact with invincible enemies or enemy fireballs. this.game_state.game.physics.arcade.overlap(this, this.game_state.groups.invincible_enemies, this.die, null, this); this.game_state.game.physics.arcade.overlap(this, this.game_state.groups.enemy_fireballs, this.die, null, this); if (this.stick.isDown) { // console.log(this.stick.forceX); if (this.stick.forceX >= 0) { // TODO: HERE IS THE ERROR // Move right. this.body.velocity.x = this.walking_speed; this.direction = "RIGHT"; this.scale.setTo(1, 1); } else if (this.stick.forceX < 0) { // TODO: HERE IS THE ERROR // Move left. this.body.velocity.x = -this.walking_speed; this.direction = "LEFT"; this.scale.setTo(-1, 1); } this.animations.play('walking'); // Play walking animation. // Play sound only if player button sound is as "on" mode. if (PLAY_SOUND) { this.walking_sound.play(); // Play walking sound. } if (this.body.blocked.down) { this.body.velocity.y = this.stick.forceY * this.jumping_speed; // TODO: HERE IS THE ERROR AS WELL // Play sound only if player left button sound as on mode. if (PLAY_SOUND && this.stick.angleFull > 210 && this.stick.angleFull < 330) { this.jump_sound.play(); // Play jump sound. } } } else { // Stop. this.body.velocity.x = 0; this.animations.stop(); this.frame = 3; } // Dies if touches the end of the screen. if (this.bottom >= this.game_state.game.world.height) { this.die(); } } YellowSidd.Player.prototype.die = function () { "use strict"; this.lives -= 1; this.shooting = false; // Destroy VirtualJoystick elements. this.stick.destroy(); this.buttonFireball.destroy(); // Play sound only if player left button sound as on mode. if (PLAY_SOUND) { this.lost_heart_sound.play(); // Play lost heart sound. } if (this.lives > 0) { this.game_state.restart_level(); // Player lost 1 life, but still have more then 0, so restart level eventually checkpoint. } else { this.game_state.game_over(); // Player lost all lives then game over. } }; TiledState.js (for restart_level and game_over methods) YellowSidd.TiledState.prototype.restart_level = function () { "use strict"; // Restart the game only if the checkpoint was not reached. if (this.prefabs.checkpoint.checkpoint_reached) { // Respawn the player in the last reached checkpoint. this.prefabs.player.x = this.prefabs.checkpoint.x; this.prefabs.player.y = this.prefabs.checkpoint.y; } else { localStorage.removeItem('heart_plus_one_once'); // Remove heart_plus_one_once from localStorage. localStorage.removeItem('jump_plus_one_once'); // Remove jump_plus_one_once from localStorage. localStorage.removeItem('speed_plus_one_once'); // Remove speed_plus_one_once from localStorage. this.game.state.restart(true, false, this.level_data); // Restart TiledState state. } }; YellowSidd.TiledState.prototype.game_over = function () { "use strict"; localStorage.removeItem('heart_plus_one_once'); // Remove heart_plus_one_once from localStorage. localStorage.removeItem('jump_plus_one_once'); // Remove jump_plus_one_once from localStorage. localStorage.removeItem('speed_plus_one_once'); // Remove speed_plus_one_once from localStorage. this.game.state.start('BootState', true, false, 'assets/levels/game_over.json', 'GameOverState'); // Start MenuState. // Play sound only if player left button sound as on mode. if (PLAY_SOUND) { this.game_over_sound.play(); // Play game over sound. } }; I'd say that this game went through many tests, has been deployed to itch.io and Facebook, so more or less it should be fine, just the stick causes problem, which I can't figure out...
  4. I did, the following snippet is in my die method. // Destroy VirtualJoystick elements. this.stick.destroy(); this.buttonFireball.destroy(); When destroy is commented this error doesn't occurs, however obviously the stick is multiplied every new initialisation of new game.
  5. Trying to implement Phaser Virtual Joystick (https://phaser.io/shop/plugins/virtualjoystick), however once player will die the game crashes with the following error Uncaught TypeError: Cannot read property 'length' of null at Phaser.VirtualJoystick.Stick.get (phaser-virtual-joystick.js:1042) at Phaser.VirtualJoystick.Stick.get (phaser-virtual-joystick.js:1063) at YellowSidd.Player.update (Player.js:90) It happens when joystick will be used at least once, while joystick is just added to the game, not used, the game works fine, on dead game is reseting. However, if I'll use at least single movement using joystick it throws an error on player dead. Player.js:90 and related code, line 90 is exactly on second if, more precisely "if (this.stick.forceX => 0)", while I'll remove it there is later on forceX, which has exactly the same behaviour. if (this.stick.isDown) { // console.log(this.stick.forceX); if (this.stick.forceX >= 0) { // Move right. this.body.velocity.x = this.walking_speed; this.direction = "RIGHT"; this.scale.setTo(1, 1); } else if (this.stick.forceX < 0) { // Move left. this.body.velocity.x = -this.walking_speed; this.direction = "LEFT"; this.scale.setTo(-1, 1); } ... Any ideas? Tried to write support@phaser.io, but no answer unfortunately, although it was send around 20 hours ago, hope so will got it finally During that time, maybe anyone here played with the joystick? The following game is on Phaser 2.6.2, tried 2.3.1 (default in joystick doc) and it's the same.
  6. Still, thanks for trying and feedback.
  7. @rich will try next time, maybe with Phaser 3?
  8. Looking for feedback for new game available at the moment on 3 platforms: Android itch.io Facebook Done with Phaser, includes sharing integration, FB invites, Firebase integration (not working on Android - please take a look https://forums.cocoon.io/t/compiler-error-cordova-plugin-browsertab/5941/3), LocalStorage, AdMob as ads and in-app purchases included also at the end wrapped with Cocoon.
  9. Hello Everyone! I'm so glad to present multiplatform game, which is playable through Android smartphones/tablets and Facebook. Technology stack: Apache Cordova, Cocoon, HTML5 Audio, Local Storage, Phaser. Integrations: Sharing, inviting friends, Admob, In-app purchases - for both versions, Android and Facebook. Link to game post: https://doyban.com/cashninja/ Direct link to Google Play: https://play.google.com/store/apps/details?id=com.doyban.cashninja Direct link to Facebook: https://apps.facebook.com/cash-ninja/ Looking for feedback, positive and negative, especially for bugs Ahh, didn't want to spam here with images, screenshots are visible through the first link to game post, HTTPS secure connection. Thanks!
  10. Free Multiplatform Game available on Android, Facebook and Chrome Web Store.Soon iOS and Windows Phone versions will be added.Project website: https://doyban.com/matchballoons/Google PlayStore: https://play.google.com/store/apps/details?id=com.doyban.matchballoonsFacebook: https://apps.facebook.com/matchballoons/Chrome Web Store: https://chrome.google.com/webstore/detail/matchballoons/pngjfjiicdgbphmjclejldaaiffofobmAny comments and suggestions are welcome!
  11. Is there any way to implement ads on Chrome Web Store? Anybody tried? I'm not asking about in-app purchases, I know it's working, just can't find anything about ads in official documentation for Chrome Web Store.
  12. Hey guys, Anyone knows App Links on Facebook is working with HTML5 games? In official Facebook documentation I found solution only for native apps. Ref: https://developers.facebook.com/docs/applinks
  13. Please close the topic, nobody helped =(
  14. Nobody? Now I see only one solution, that's add #fb_invite div in index.html, invite function inside .html and onclick call the function invite with request code. But maybe anybody know how to do it inside Phaser state? =(
  15. After many hours of looking on this forum and not only it's time to ask directly for help. So guys my problem is how to integrate game request after click on exactly button. Here is integration with Facebook via .html file and it works correctly, the problem is how to do request acction after click button. When I applied code for request in .html file it was good, the problem is, directly after login there was window to send request - I don't want like that, I want after click. <script> window.fbAsyncInit = function() { FB.init({ appId : '611658819003576', xfbml : true, version : 'v2.6' }); // ADD ADDITIONAL FACEBOOK CODE HERE function onLogin(response) { if (response.status == 'connected') { FB.api('/me?fields=first_name', function(data) { var welcomeBlock = document.getElementById('fb-welcome'); welcomeBlock.innerHTML = 'Hello, ' + data.first_name + '!'; }); } } FB.getLoginStatus(function(response) { // Check login status on load, and if the user is // already logged in, go directly to the welcome message. if (response.status == 'connected') { onLogin(response); } else { // Otherwise, show Login dialog first. FB.login(function(response) { onLogin(response); }, {scope: 'user_friends, email'}); } }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> Now it's time for phaser code, I tryed many many ways, it seems to me this is the closest create : function () { // this.onClick(); this.invite(); }, onClick : function () { window.open("http://phaser.io"); }, invite : function () { window.fbAsyncInit = function() { FB.init({ appId : '611658819003576', xfbml : true, version : 'v2.6' }); FB.ui({method: 'apprequests', message: 'Play with me in InfiniteHell!' }, function(response){ console.log(response); }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); } I guess it should be something with "window", the test "onClick" works perfectly. With Twitter share here should be just link, but with Facebook API I can't get it... - Intel XDK Debugger after click (with active "invite" function) doesn't show any errors, just blank page, - Firefox doesn't do anything, just stays in the same state - Menu, also without any errors in console - Chrome just shows this kind of error, nothing more, but I'm not sure it's about that... sdk.js:88 Uncaught TypeError: Cannot set property 'innerHTML' of null sdk.js:88 Uncaught TypeError: Cannot set property 'innerHTML' of null Any tips for beginner? It's my second game and first in Phaser, everything is working well expect integration with FB, maybe wanna help?