Doyban

Members
  • Content Count

    19
  • Joined

  • Last visited

About Doyban

  • Rank
    Member

Contact Methods

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

Profile Information

  • Gender
    Male

Recent Profile Visitors

978 profile views
  1. With exactly the same codebase I have perfectly working Facebook events on Android. However, on iOS it doesn't works. I'm using https://github.com/jeduan/cordova-plugin-facebook4 for this and tried to set some alerts to see the error code or something (note `alert` in the code, for debugging purposes), but there is no action. In essence, I can't see any error, it just doesn't works. The following code: this.options = { method: 'apprequests', message: 'Play YellowSidd with me!' }; this.onSuccess = function(result) { alert("Success with invite, result: " + result); }; this.onError = function(msg) { alert("Failed with invite, msg: " + msg); }; facebookConnectPlugin.showDialog(this.options, this.onSuccess, this.onError); In the Xcode in Build Phases -> Compile Sources I do have FacebookConnectPlugin.m. In Build Phases -> Link Binary with Libraries I do have also the following: libsqlite3.dylib (added by me), Security.framework (added by me), Accounts.framework (added by me), Social.framework (added by me). Also, the FBSDKCoreKit.framework, FBSDKLoginKit.framework and FBSDKShareKit.framework. These last 3 were already in that project.
  2. After successful delivery In-App Purchases (IAPs) on Android using Apache Cordova and https://github.com/j3k0/cordova-plugin-purchase I can't get it working properly on iOS. The problem is that once the item is clicked the price shows its details etc., but if use clicks "Cancel" then the user can't purchase anything anymore. Unless restarting the game, as far as I'm aware I should handle rejection/cancellation events. Tried these, but so far no success. This is how I was trying to handle these events (rejection/cancellation), including playing with store.refresh() in different locations of the code and without it as well: // Handle rejection and cancel events. store.when("com.XX.YY.gems5").rejected(function(order) { store.refresh(); that.game.state.start("GemsState"); store.refresh(); }); store.when("com.XX.YY.gems5").cancelled(function(order) { store.refresh(); that.game.state.start("GemsState"); store.refresh(); }); Code, which correctly works on Android (the handling wasn't required there in order to work properly): 'use strict'; var that = this; // Prepare product. store.register({ id: "com.XX.YY.gems5", alias: "Gems 5", type: store.CONSUMABLE }); // Purchase product. store.order("com.XX.YY.gems5"); store.refresh(); store.when("com.XX.YY.gems5").approved(function (order) { order.finish(); store.refresh(); // Add extra gems. localStorage.gems = parseInt(localStorage.gems) + 5; // Add 5 gems. that.upgrade_sound.play(); // Play upgrade sound. that.game.state.start("GemsState"); that.menu_items[1].select(); // Select second item. }); I'm using Phaser 2 & ES5.
  3. 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
  4. 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();
  5. 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...
  6. 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.
  7. 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.
  8. Still, thanks for trying and feedback.
  9. @rich will try next time, maybe with Phaser 3?
  10. 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.
  11. 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!
  12. 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!
  13. 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.
  14. 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
  15. Please close the topic, nobody helped =(