Search the Community

Showing results for tags 'touch'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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 91 results

  1. Hello and <ping> Q: about Touch.... Getting an Offset of the Pointer on the lower right: The grey dot draws the blue line at offset upper left. Reproduced using Chrome in the Chrome Emulator. But first experienced it in a site using BJS 3.0 with both Hand and then PEP - on a Google Pixel. Replicated in a local sandbox, I'll build a playground... It uses this code: scene.onPointerObservable.add(function(){ console.log('movin') },BABYLON.PointerEventTypes.POINTERMOVE); //TODO - initPickEvents = function // ----------------------------------------------------Register Pointer Events. var meshes = centerTiles; //TODO rename tiles and move up with other code. for(var i = 0; i < meshes.length; i++){ mesh = meshes[i]; mesh.actionManager = new BABYLON.ActionManager(scene); // trigger actions mesh.actionManager.registerAction( new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickDownTrigger, function(){ // debugger; console.log('DOWN') }) ); mesh.actionManager.registerAction( new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickUpTrigger, function(){ console.log('UP') // debugger; }) ); } with this: <canvas id="renderCanvas" touch-action:"none"></canvas> Any tip on things to try? : ) SOLUTION: gotta use meta tag to set device-width. Zing.
  2. Hi, The touch controls in Three.js allow you to move the camera horizontally/vertically using three fingers. I noticed that the ArcRotateCamera in Babylon behaves similar to the Orbitcontrols in Three.js (using the right mouse button you can move horizontally/vertically ) but it does not have the three-fingers gesture implemented. Is there some other way to move the camera using touch or should I file this as "bug"/feature request on github?
  3. Pointer Off on Android w/ Recent Phaser 2 Versions

    I'm using PhaserCE 2.10.0 and I've setup my game in (256) x (256*aspectRatio) in portrait mode using the SHOW_ALL scale method to size up to the screen. Everything's been going pretty well, but now I've run into a weird issue. I'm just not sure if it's a bug I should report or if I should just be doing something different. On android(in chrome and the cocoon dev app) pointer coordinates(read via input.pointer#.x|y) max out at 104. On desktop, it works just fine, with x coordinates maxing at 255 and y maxing dependent on the screen aspect ratio. Here's a debug shot of my input dev view where I touched 2 fingers down near the center of the screen and moved them to opposite corners of the view. I've tried a few different versions of Phaser 2.10.1, 2.7.10, and 2.4.9 and found that the issue goes away with 2.4.9. Obviously, I could just use an old version for now but... I don't wanna. Anyone with more Phaser experience know what might have changed to cause this? If it helps, here's my init call: App.game = new Phaser.Game({ width: scale.width, height: scale.height, renderer: Phaser.AUTO, antialias: false, resolution: 1 }) Boot state setup: Boot.prototype.create = function _Boot_create() { this.game.time.advancedTiming = App.debug this.game.renderer.renderSession.roundPixels = true this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL this.game.scale.pageAlignHorizontally = true this.game.scale.pageAlignVertically = true this.game.scale.refresh() this.game.state.start("load") } Play state create: Play.prototype.create = function _Play_create() { var scale = Util.scale() this.world.resize(scale.width, 5*scale.height) this.physics.arcade.gravity.y = 750 this.stage.backgroundColor = "#aaddff" this.player = new Player(this) new Floor(this, this.game.world.height) new Platform(this, 64, this.game.world.height - 64, 64, 1) this.camera.follow(this.player.sprite) this.controls = new Input(this) } Input setup for Play state: var Input = function _Input ( scene ) { this.scene = scene this.cursors = this.scene.input.keyboard.createCursorKeys() this.scene.input.gamepad.start() this.pad1 = this.scene.input.gamepad.pad1 this.p1 = this.scene.input.pointer1 this.p2 = this.scene.input.pointer2 this.butt = 0 this.scene.input.gamepad.onDownCallback = function (e) { this.butt = e } }
  4. I've been working with Pixi for quite sometime with V3 up until now. Recently decided it was time to move some code over to version 4 but have been experiencing some issues with interaction events. I have a button class that originally used both listeners for touch and mouse events to a.) change the visual state of the button on up/down etc b.) perform an action on click/tap. This had been working perfectly fine in version 3 and I could have multiple buttons in a class/container. Switching to version 4 this caused issues with click/tap area where only the last button to be added to a particular class/container will fire this event. All buttons will fire the up/dwn start/end events still though. On upon researching I tried converting them all pointer events and still experience the issue. I'm currently using V4.7.0. I've been trying to pick my way through the PIXI source trying to figure out why the event doesn't fire but it's not clear to me. All I can see is that it doesn't seem to have 'trackingData' when processing the up portion when it does on the one that does fire the tap/click. I've being using Chrome only at this point for Dev tools and tried but desktop and mobile/tablet emulator, both having the same result. I know interaction was reworked for v4 but can anyone give me any pointers as to why those changes have affected my code thus. I don't understand well enough the changes to be able to find the right place to look for a solution. I can't provide the exact code at the moment as it's not a personal project and corporate rules prevent me from doing so. But can give an overview. The class is structured with a parent container (essentially a stage) to add class container to and a class container to display the current button state (current button state can be a graphic, sprite, animation). The current button state container has all the interaction events attached to it. These call binded functions within the class which either change the current state sprite or call a function on click/tap that has been passed in the settings on instantiation (event data is sent to this function). As stated if the event is fired, which it is on the last button added, the function is fired but event doesn't trigger for click/tap on the others. All other events fire normally on each button. I've possibly just overlooked something simple as you get to that 'wood for the trees' state. Any thoughts, suggestions would be grateful.
  5. GUI suggestion for desktop version

    I'm working on a project where on mobile version you can use two fingers to zoom in and out, pan and rotate a rectangle. How would that work on a desktop or laptop computer with a mouse? Any suggestions?
  6. Hello, I want to show my latest game, Freaky Brothers, the game is created with Construct 3. If someone tries it, I would appreciate sincere comments, about mechanics, graphics etc ... I try to improve with each game, thanks. The html5 version can be played from any device, smartphones, iphones, pc, mac etc ... I also leave the Android version and the Itch.io version. Play Html5: Freaky Brothers Html5 Google Play: Freaky Brothers Google Play Play on Itch.io: Freaky Brothers Itch.io
  7. Mobile screen touch controls

    Hello, I would like to know if it is possible to have screen touch controls on mobile instead of the buttons? In my game i tried having buttons to jump and it functioned correctly... however I am looking for a way to make my character jump wherever we actually touch the screen and not just one specific button. is that possible? Also is it possible to have movement controls such as the attached in Phaser? is this a good example: https://phaser.io/examples/v2/input/virtual-gamecontroller Thank you!
  8. Physics with touch to move player

    I am making a maze game where the player drags their finger to control a ball moving through a maze. I would love to use Phaser physics to block the ball from moving through the walls. Is there a way to do this with Phaser physics and if so, which physics type would be the best suited for this?
  9. [Construct 2] Basket Slam Dunk

    Hello again community, I want to show you this little success for me, Basket Slam Dunk, has been the game that has played the most of all that I have done. It has more than 100,000 games played, a record for me. It is a casual game, easy to play and playable on any device. You have to throw the player and put in the basket, very easy to play, and with unlockable balls. I hope you like it Link : https://html5.GameDistribution.com/1e114557c82349ffa04089dcbfb0605b/
  10. Input Events for touch screen

    A game I made that is playable here: http://gametheorytest.com/gerry/ Has the input events defined as such: this.sprite.events.onInputDown.add(onInputDownTile, this); this.sprite.events.onInputOver.add(onInputOverTile, this); this.sprite.events.onInputOut.add(onInputOutTile, this); On a computer it works great. On a touch device, there seems to be a lack of sensitivity. So sometimes if you tap and move your finger, it doesn't register a touch at all. Sometimes it will register the first touch, but not pick up the onInputOver on the next tile. Any ideas why this would not be accurate on touch?
  11. touch control

    Hey:-) Im new to babylon (and html5 in general) I'm trying to change camera control to universal camera to enable touch, but can't get it to work.. could someone pls help me on how to get touch (and keyboard) controls to work? here's link to the code: http://www.libak.dk/customizer/ Any help would be much appreciated - phanx :-)
  12. Trump Burrito

    Trump Burrito Make America great again and Catch the Burritos! Touch the screen and Trump go left or right to catch the burrito. Don't miss the burritos. Beat your friend's scores! Get it for Free: iOS ⇨ https://itunes.apple.com/app/trump-burrito/id1234357590?l=de&ls=1&mt=8Android ⇨ https://play.google.com/store/apps/details?id=com.atilladeniz.trumpburritoHey, friends! This is my new game called Trump Burrito.Completely excited to share with you guys!
  13. Are there any way to enable touch panning for ArcRotateCamera? now we have 1 finger rotate,2 finger zoom,maybe 3 finger for panning?
  14. Multi Touch Rotate?

    Hi there, I am new here, and am just digging into Phaser. I was wondering, if anybody succeeded in adding rotation with two finger touch gestures into their games? Any help appreciated :-) Thanks, Jamirokwai
  15. Hello, I'm very new to Javascript (and coding). I just finished my first game, a clone of Pong. I have it controlled via the mouse movement, now I'd like to add code that will let the user swipe up or down on a touchscreen and have that relate the to controls for the mouse. Any Help would be appreciated. Thanks in advance. Here is what I have for my mouse controls. window.onload = function() { canvas = document.getElementById('gameCanvas'); canvasContext = canvas.getContext('2d'); var framesPerSecond = 30; setInterval(function() { moveEverything (); drawEverything(); }, 1000/framesPerSecond); canvas.addEventListener('mousedown', handleMouseClick); canvas.addEventListener('mousemove', function(evt) { var mousePos = calculateMousePos(evt); paddle1Y = mousePos.y - (PADDLE_HEIGHT/2); }); } code help.tiff
  16. Hi All, I have a mesh that is a background, and you can move the other meshes on top of it (and a record the movement). It's very similar to this example: http://playground.babylonjs.com/#U0YL2#0 what I would like to do is keep the smaller mesh contained within the larger one. Ideally, I would like to allow users to move the smaller mesh outside the larger one, but not completely off of it (there would still be like a 25px edge of the mesh so you could still touch it and move it). I am sure I can just compare the xy of the smaller mesh and compare it to the area of the larger mesh, but I'm wondering if there is something that is already being computed that I can use. Thanks, Jeff
  17. My last game, Faraon, created live, about 35 hours of video.Playable from any browser, smartphones, iphones, mac, pc, tablets etc...Rescue your friend through the dangerous rooms hidden in the pyramid of Pharaoh.Test your skill in this fun platform game, Are you a hero? Prove it.Funny and fast platform game.- 55 levels.- 3 different finishes.- Easy to play, one-touch control.- Many traps and enemies await you in the pyramid.- Great and original soundtrack.- Adapted for keyboard and touch screen.- Playable from any device.- Pixelated graphics. Faraon trailerPlay on Itch.IO: Faraon Itch.ioPlay on my Web: Faraon
  18. Hello everyone, I'm new to the game development realm. I am in the process of creating a game that will receive touch input from a PQ Labs Multi-touch overlay screen. The screen will support 32+ touch points. I would like to ask if anyone has tried creating or created a game with a similar type of multi-touch screen. If yes, could you share your insights and advice? This display comes with its own drivers and provides various SDKs, none of which is in JavaScript. I am not sure if the input is considered by the system as native touch, since I don't have the screen yet (I'll have it in a week or so). Supposing I overcome the issue of reading input from the screen and using it in my Javascript application, what could be the best way to go about using Phaser's input methods with this screen? Would I need to hack into the Input api? I hope what I ask makes sense. Thanks for the help in advance.
  19. Hi, I implemented a two finger zoom using the game.camera.scale propierty to zoom the game. I also implemented a drag functionality using game.camera.x and game.camera.y propierties. But now I need to add static floating sprites, such that they are always in the same position on the screen regardless the zoom or the drag movement. But when I add them as sprites (game.add.sprite) they are affected by the camera propierties (x,y,scale). I read this and set fixedToCamera to true, it works partially, the (x,y) is static, but the when I zoom in (increase game.camera.scale) the size of the floating sprites also increases. Is there any way I could add sprites that are not dependent on the camera? Thanks!
  20. Phaser + Mobile app

    Hi guys, i'm starting with phaser and i'm reading a couple of tutorials. I create an app with one of these tutorials and I'm using Intel XDK to test on my smartphone. I'd like to ask you, what I need to use at the script to recognize the touchscreen to walk. On web I can use the keyboard (up down left right) to walk. If you can link me any tutorial that helps with this, or a link from a question on this forum too, i'll be thanks. Thank you.
  21. Hey, I have some videos I need manual control over. For non iOS devices, they're working fine. But with iOS devices the videos all automatically play simultaneously on user interaction (which is touch unlocking them). Is there a clean way to flag off autoplay on touch unlocking? Cheers
  22. Crazy Racers

    Hello everyone, this is Crazy Racers. It's my first personal project [Play the Game] The game is an fast-pacing racing game. Features: 12 Different tracks 6 Different Cars (each car has it's own style) Different Obstacles 3 different game modes Leaderboard Game modes: Grand Prix: You race a number of tracks, the racer with more points win a trophy Quick Race: Race one track with 5 other opponents Time Trial: Race alone to try to get to the leaderboard Feedback are welcome, I hope you like this game Game is Available for Non-exclusive License and Re-skins, contact me for me details and for the full version of the game Cheers,
  23. viarbox vr

    Hi I have viarbox vr http://www.viarbox.com/b2c-viarbox-google-cardboard-shop Which camera sould I use "Web VR Free Camera" or "VR Device Orientation Free Camera" ? Is there any example(s) or tutorial(s) or playgound(s)? How can we have touch events on phone screen for navigation (moving roration) in scene? Can anybody help me to try this with babylonjs? Is there any blog or documentation how to do that. Especially how to move/rotate with touch events on mobile screen? Greetings Ian
  24. Iorana! I have just a little question about onInputOut behaivour in mobile/touch devices. I have this scenario in Phaser 2.6.2: A small lovely Sprite with inputEnabled activated to handle events, connected with events.onInputOver and events.onInputOut, just for hover actions. No problems there. If I test it in desktop, the signals are dispatched correctly if I move the mouse over the sprite and then move it away from it. But in mobile/touch the behaivour is different. Obviously, you can't "move" a touch Pointer like a mouse, but anyways if you tap the sprite events.onInputOver is dispatched. BUT, after that, if you tap other place somewhere in the screen there's not any events.onInputDown signal, resulting the game acting if there's still hovering the sprite. But keeping pressed the touchscreen and move Pointer it dispatch the desired signal. I know one can make workaround to handle this (if it is mobile check in the next tap, if the pointer is inside bounds of the sprite: If not, manually dispatch events.onInputOut signal), but I have the doubt in mind if this is the correct behaivour of the signal or not. (Probably not, but there's always a bug possiblity). I checked the docs and there's not much thing to say about the event: As yoy can see, the docs don't cover this particular case. If someone explains me this well if this must be work or not... Thanks in advance
  25. My post about control mechanisms in JavaScript games was just published on Mozilla Hacks blog. It introduces a series of MDN articles about Implementing game control mechanisms: Mobile touch controls Desktop mouse and keyboard controls Desktop gamepad controls Unconventional controls The basic examples are available on GitHub at github.com/end3r/JavaScript-Game-Controls And the articles are using Phaser-based game Captain Rogers: Battle at Andromeda demo as a case study.