Search the Community

Showing results for tags 'tap'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 13 results

  1. I was posting this thread at the wrong place (it was in Phaser 2). OK, I am having a very bad time with clickable objects. It works perfectly on desktop browser but when I run it on my Android mobile the hot spot is totally off. Please refer to the attached picture to have an idea what I am talking about. The blue square is the clickable object (it's a .png picture). Tapping the object won't fire the input event but if I tap around the position where I draw the marquee it will. In other words, the clickable area is off of the picture. I found this thread where the OP had a similar issue and mentioned that is could be related to the mobile devicePixelRatio when using Phaser.CANVAS but I couldn't establish a coherent relationship between the DPR and the displacement (otherwise it could be "compensated" with code). I really cannot see how to solve this. I am about to give up Phaser and try a different engine. Any idea?
  2. I have this simple game for small children that consists on several images that when tapped should produce a sound. I got it working on the computer (mouse click) but not on mobiles (finger tap) and I suspect that's because I am listening to the wrong event. Could someone tell me how to listen to a image "tap"? My current working code for computers is: // I am adding the functions and listeners dynamically with a // loop so aAssets is an array containing the image elements // enable input window[aAssets[i]].inputEnabled = true; // create the function to be triggered by the listener window['lst'+aAssets[i]] = function (me) { alert (me.key); } // add the respective listener window[aAssets[i]].events.onInputDown.add(window['lst'+aAssets[i]], this); PS: I found the events "onDown" and "onTap" and tried them but both causes an error when added. Thanks!
  3. [Play Store] Cannons Warfare

    Cannons Warfare is a fun game of precision and a lot of skill, in which you are put under the command of tanks in games in which the aim and your strategy will take you to the victory. Combat in all kinds of landscapes with different climates that will play in favor or against your aim, enjoy eliminating your enemies. Test your visual acuity and control, destroy the opposing tank before he finishes you. Master all your battles. -Features: ♦ Easy Controls ♦ Player vs Computer with three difficulty levels ♦ Gameplay based on physical and shooting angle ♦ Player vs Player on phone Download --->
  4. Hi all It looks like the default time to register a tap on an object is indefinite. Meaning that a tap event is just simply just touch on and touch off, regardless of time between. Is this the case, or is there a setting to shorten it within the interaction manager?
  5. hi, i'm trying to implement this effect : i have a circle who's animating to incite the player to click on the screen. next the player click and release a pink player who go to an enemy ( the pink rectangle). I would like to let the player the ability to click several times to release multiple players and each time the player is inactive the animation of the circle to prompt him to click. The problem is that this animation launches several times at the same time as soon as the players are dead. How to code this to avoid this behavior? thanks for your help, because me i don't see the solution var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload:preload, create: create, update : update }); function preload() { game.load.image('circle', ''); game.load.image('rect','') game.load.image('player','') } var player=[] var enemy var circle var tw_name var tap_ready = true var flag=true var delay_circle_timer = 1500 var counter = -1 //effect on the circle : tween start_tw = (obj,tw_action,tw_name,f) => { tap_ready = true f=true tw_action(obj,tw_name) } // declaration of tw_action tw_action= (obj,tw_name) =>{ obj.alpha=.5 obj.scale.setTo(1,1) tw_name= game.add.tween(obj.scale).to({x:1.5,y:1.5},700,Phaser.Easing.Linear.None,true,delay_circle_timer,-1) tw_name = game.add.tween(obj).to({alpha:0},700,Phaser.Easing.Linear.None,true,delay_circle_timer,-1) tw_name.onStart.add(()=> {obj.visible=true}) } //stop tween stop_tw = (tw_name,f,obj) => { if(f){ obj.visible=false game.tweens.remove(tw_name) f=false } } //launch player and start counter launch_player = (obj)=> { counter++ obj[counter].body.velocity.y=-100 } hide_player_and_start_tw = (obj) => { obj.body.enable=false obj.visible=false start_tw(circle,tw_action,tw_name,flag) } tap = () => { game.input.onTap.add(onTap); function onTap(pointer, doubleTap) { if (!doubleTap && tap_ready){ tap_ready=false //stop the tween on the circle stop_tw(tw_name,flag,circle) //launch the player launch_player(player) //delay for reset tap_ready,() => {tap_ready = true}) } } } function create() { game.physics.startSystem(Phaser.Physics.ARCADE); circle=game.add.sprite(400,300,'circle') circle.anchor.setTo(.5) circle.inputEnabled = true enemy = game.add.sprite(400,100,'rect') enemy.anchor.setTo(.5) game.physics.arcade.enable(enemy) enemy.body.enable=true enemy.body.immovable=true for (var i = 0; i < 10; i++){ player[i]=game.add.sprite(400,600,'player') player[i].anchor.setTo(.5) game.physics.arcade.enable(player[i]) player[i].body.enable=true } //initiate first tween start_tw(circle,tw_action,tw_name,flag) } function update() { tap(circle) for (var i = 0; i < 10; i++){ game.physics.arcade.collide(player[i],enemy,hide_player_and_start_tw) } }
  6. Spaceix

    Spaceix is a simple and addictive endless runner game. Control the little rockets gliding through a beautiful exotic world. Collect coins and unlock cool in game rockets. Relaxed in the calm, zen-like background music. Hold and release so that the rockets takes off. Move away from the obstacles and pick up as many coins as you can.You get a score by traveling through the rings.The coins you pick up you can use in the game to buy rockets. Collect all the 40+ rockets. Be careful not to hit any obstacle or you will have to start again the game. Download on google play for free: .
  7. Karate Burger | Salt Chef

    My new Phaser game Karate Burger | Salt Chef. Tap around character to control him. same Phaser game in webview, generated in Android Studio with Firebase addons
  8. [Release] Myths N Heros

    Try my new game Myths N Hero : I Develop it using C2 and build to android using xdk :-D Myths N Heros is an idle games / clicker games / tap games. Myths N Heros tells the story of the earth is currently dominated by evil monsters. You are one of the several heroes who wants to save the earth from the evil monsters. In your adventure you find the ancient scroll to summon heroes from the past (Mythological heroes) like Sun Go Kong, Hercules, Gatot Kaca, and others. With their help grab your sword and slay as many evil monsters on this earth, and don't forget to collect equipment along the journey to make you and your allies stronger. ❖ How To Play ❖ - Tap/Click to attack, - Tap/Click to leveling up, - Tap/Click to summon mythological heroes, - Tap/Click to make you and your allies stronger, - Tap/Click to using your great skill, - Tap/Click to collect money, - Tap/Click to use equipment, - Tap, tap and tap to slay as many evil monsters as you can, - or just leave it and let your allies finishing your job . ❖ Plan for Future Update ❖ - More Levels, - More Monsters, - More Equipments, - More Mythological heroes, - More Skills, - Play with friends, - etc Feedbacks are most welcome :
  9. I have a canvas with a set aspect ratio of 16:9 and I am resizing the renderer every time the window size changes game.resize = function() { var original = _default_screenWidth / _default_screenHeight; var designer = window.innerWidth / window.innerHeight; if ( window.innerWidth < _default_screenWidth || window.innerHeight < _default_screenHeight ) { if ( original > designer ) { game.renderer.resize(window.innerWidth,window.innerWidth/original); } else { game.renderer.resize(window.innerHeight*original,window.innerHeight); } = game.renderer.width; = game.renderer.height; game.stage.scale.x = game.renderer.width / _default_screenWidth; game.stage.scale.y = game.renderer.height / _default_screenHeight; } }; window.addEventListener("resize",game.resize);Problem is if I tap certain buttons (PIXI.Container) , they are not firing, only if i tap a little bit lower, so it's only the Y axis that's off. Here is the code for the button if ( ) { button.container.interactive = true; button.container.buttonMode = true; button.container.tap = function() { button.Press(); }; }If the window does not need any scaling then everything works fine.
  10. phaser , Circle button

    im trying to make a circle button with tap event i used hitArea property from sprite class and using pixi Circle class i did that this.sprite = game.add.sprite(50,50,"cursors"); this.sprite.anchor.set(0.5,0.5); this.sprite.hitArea = new PIXI.Circle(50,50,84); this.sprite.inputEnabled = true;{ console.log("clicked"); }); }; it is not working at all so i tried removing this.sprite.anchor.set(0.5,0.5); input is work fine when there is no hit Area so what should i do note : phaser version is 2.2.2
  11. how to detect double tap

    I've seen that there is a double tap rate that can be set, but does anyone know how to read this? Thanks
  12. Problems with interactivity

    I'm working with PixiJS to create a web app with OS-like functionality (source here: so I obviously need to have stuff related to mouse and touch events. I've tried stuff like this (based on the examples): this.interactive = true;this.mousedown = this.touchstart = this.onClick.bind(this);this.mouseup = this.touchend = this.mouseupoutside = this.touchendoutside = this.onRelease.bind(this);But it's hit or miss. BitmapText will function normally but DisplayObjectContainers may or may not, and Graphics seem to never register clicks. Is there something I'm missing? It appears that all of these elements should support mouse and touch events.
  13. Hi all, I'm about to finish my first game made with Phaser, the very last issue left: Everything works well on desktop and iOS devices, but not Android (4.0). The game preloads, show the graphic and Play btn, but I can't tap it (at least nothing changes when I try to tap it). If I rotate the device, I see that the MainMenu screen is displayed normally (and the same for all the taps). So pretty much it reacts on the tap, but somehow doesn't display changes, only after I rotate the device.. I use Phaser 1.1.3 and Phaser.CANVAS in the game init. Any thought are welcome.