Jump to content

Search the Community

Showing results for tags 'controls'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





  1. I'm working on a camera that behaves as if tracking a spaceship. The Z axis rotation shouldn't affect looking up/down and right/left, as if I'm the pilot in the cockpit of the ship in space, up is always my local up. I tried the FollowCamera, but it only lets me rotate the target mesh so the camera yaws, but doesn't roll or pitch. I tried the Free/Universal cameras, but rotating the camera to roll skews the yaw and pitch, as if they're in global dimensions - instead of local. I couldn't find a local/global rotation option, or figure out using quaternions/matrices with it, no matter how mu
  2. Whether Camera is the parent of a Mesh (in example below), or the other way around (in my personal project), when moving "fast" at speed = 1000, eventually there is some (discrepancy) jitter visible on the mesh - although it's probably the camera that isn't set correctly (some matrix?) http://www.babylonjs-playground.com/#P1YTR#1 Just click, rotate some, then hold Up and Left arrows and wait til the jitters come, at a few seconds in. Just an example of keys used. Even after stopping, if you try to move a bit or look-around, the jitter is already there. A painful bug for my space
  3. Is there any way to pause a video immediately after creating the element with PIXI.Texture.fromVideo or fromVideoUrl? It looks like it might be bugged currently, because under some circumstances the paused flag is set but the video doesn't actually pause. I noticed in the fromVideoUrl function it will call play() before returning, and at one point console.log'ing the baseTexture.source element showed instead of the HTML tag, an object with a pixi_id or something. I'm not sure if that is relevant, but I haven't been able to repeat that, so I'm not sure if it was just a one off (but it makes
  4. Hi! Thanks for joining me from my previous thread or if you're new here! Previous thread: MAJOR GOAL: Create a multiplayer game using websockets. GAME CONCEPT: Attempt to be the last ball surviving as other balls and environmental effects attempt to knock you off the platform. STATUS: Finessing the single-player version where it is just player vs. environmental effects. Check out the current incarnation of the single-player game here: http://aaronjanke.com/ballGame/ Github: https://github.com/ballAndBoardInc/ballGame CHALLENGE #1 Currently, I'm lookin
  5. I'm developing a game that will have grid based maps - levels and the player will be moving through it one block per keystroke. I'll be using the keyboard as input just for the start, I'll add others later on. Every level is generated from a double array filled with 1 & 0. So I want to do here is for example: if I press W the player will move one block forward. if I press Q the player will rotate anticlockwise by 45 degrees.
  6. Hi! First post here. I'm currently experimenting with the gamepad API and I'm trying to capture the motion/orientation of my dualshock 3 to build controls for a new game project. I was wondering if anyone had manage such a thing and managed to make it work in the browser? It seems that WebVR makes use of the motion data using the gamepad.pose object and so far I've been unlucky to reach it on a regular controller. Has anyone managed such a thing and could help? Thank you!
  7. The title might be a bit misleading but that was the best I could come up with. So now to the main part. I am having a hard time making the controls for a game which was inspired by Ball Wars By Brackeys and a classic of game of Capture the Flag. Basically you either shoot and kill your opponent or be the first one to capture their crystal by standing on top of it. The controls are what I could decipher from the video. But I am having a lot of difficulty aiming because of the way I implemented the game by seeing the video. Also I want both the players to play from the same keybo
  8. What I want to achieve: as long as the mouse button is pressed, character follows it when a player releases mouse button character moves to the position, where the cursor was during release when a player clicks the mouse button character moves to that position of cursor using pathfinding on longer distance The first two points work suprisingly well with the use of arcade physics. I keep setting velocity each time mouse position is changed and store the last mouse position, so it can be used when the mouse button is released. I can drag character around the map this way,
  9. Hi there, I'm new here. First of all: Thank you to all of you guys contributing to Babylon.js, it's an amazing project! I'm using it mainly to set up interactive 3D visualizations for scientific purposes and it works like a charm! Here's my question: So far I mainly use the ArcRotateCamera. There's nothing wrong with that camera, but the restriction that I cannot rotate over the 'north/South Pole' is something that bothers me, because it limits the exploration possibilities of the user. Further, although one can see the target from any position around it, one cannot see the target in all
  10. Hi, When the cursor keys are pressed the player moves in the correct direction, however, it keeps moving even if the key is released. Can anyone help? createPlayer: function() { this.player = new ZPlat.Player(this, 100, 100); this.dude = this.add.group(); this.dude.add(this.player); }, update: function() { if(this.cursors.left.isDown) { this.player.body.velocity.x = -this.RUNNING_SPEED; this.player.scale.setTo(1, 1); this.player.play('walking'); } else if(this.cursors.right.isDown) { this.player.body.velocity.
  11. Could someone help me? I am trying to figure out why about my problem with 2 players controls here is the whole game could someone please help me fix the Level1 Mobile App.rar This is the part where i am so confused and idk which one to fix.
  12. 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.
  13. I want to add controls like buttons and range sliders into the babylon.js scene. I am making an interior scene of a room. Can anyone share a link or page where i can find any info about that.
  14. Hello, everyone. This is my first post on the HTML 5 Game Devs forum. I'm currently working on a top-down shooter using Phaser, and this forum has been very helpful on this project. However, there is one problem to which I can't seem to find the solution. In my game there are vessels, and the vessels have engines. The engines determine vertical and horizontal acceleration and maximum speed. Everything is working wonderfully, but I'd like to create sprites that aren't just facing straight up or down. In other words, I'd like to replace vertical and horizontal movement with forward and
  15. I couldn't find the mouse controls in the source. Is there a way to set the mouse up event to the html element as opposed to the canvas element? And would it have to be a custom build to do so? Thanks in advance. --Nevermind I see they are all within the cameras. -P
  16. Hi. I'm new to phaser, and I'm working on a game where I need to add a dpad for mobile players. If I have a game size 600 x 800, how can I limit the drawing size of the tilemap to 600x600 so that I can use the other 600x200 to controls? Something like this: https://gyazo.com/8dc44f343c8d70370f66c0d2497d5fc0 Thanks!
  17. Hello Everybody, I am trying to switch active cameras from the Virtual joy stick camera to the Arc rotate camera and back. Is there a good way to just hide the virtual Joy stick camera controls instead of removing them with the dispose function? Right now I am using the dispose function and creating a new camera every time I want to switch between the two cameras. But I want to just toggle on and off the joystick camera controls any ideas?
  18. hello, I seek an example that loads a character with multiple animations and play an animation when you click on a button and played another when you click on another boutton. I want an example Three.js. thank you for helping .
  19. I am very much new to Phaser and Game Development in general and I had a quick questions about player controls through multiple states. I recently made a small "game" that had a player walking through different levels that I created using different states. But I just copied and pasted the code for movement in the update function for each different state. I assume there is a better way to do this, maybe in a separate function somewhere, but where? Any help would be greatly appreciated.
  20. http://codepen.io/anon/pen/qEKONO?editors=001 I am trying to add controls so if the mouse is anywhere on the left side of the character the character goes to the left and vise vera I am following this example http://examples.phaser.io/_site/view_full.html?d=input&f=follow+mouse.js&t=follow%20mouse The reason I want this is so it works on mobile. I copied the example and my game crashes :/ http://codepen.io/anon/pen/qEKONO?editors=001 Is this because follow mouse can't only make a character move vertical?
  21. Hello everyone, I'm fairly new to Phaser, and I'm just starting to figure things out. I made a simple prototype that uses "game.input.keyboard.createCursorKeys()" to listen and process the keyboard's cursor keys. Basically I have a sprite that moves up, down, left and right depending on input. Now I'm trying to achieve the same using touch events: when I swipe left, the sprite moves left; when I swipe up, the sprite moves up, etc.... but with no success. I've managed to detect swipe using a solution that user @imshag posted in this topic: http://www.html5gamedevs.com/topic/3862-swipe-to-
  22. brianwik

    Tap to move

    Hi all, so I'm still very new to Phaser but I really want to learn this! So my first question is ... instead of holding down the left or right key to move I want to set it so that you have to repeatedly tap the right button to move right instead of holding it down. So every time the right key is tapped a small like 1 frame animation will happen and the character will move say 3 pixels forward. so this will continue every time you tap. hope I made this clear enough and thanks in advance!
  23. Hello! I'm migrating from AS3 to HTML5 and decided to use Phaser. That's great, many thanks for creating it! I have a question about organizing the MouseDown event listener. Let's say I have 100 sprites on the screen, and if the player click on any of them, the sprite's data should be traced. In AS3 adding event listener to each of the sprites I could do: stage.addEventListener(MouseEvent.MOUSE_DOWN, onMDown);......private function onMDown(e:MouseEvent):void{ if (e.target is Sprite){ trace("you clicked on: "+(e.target as Sprite).name); }}Is there such a way in Phaser? I understand, that
  24. how do you change the camera rotate speed so that moving the mouse less rotates the camera more. i'm using a free camera if it's different. (not with camera.inertia).
  25. Hello together, I'm currently trying to figure out how a player (avatar) on a topdown map may interact with other objects on screen by pressing the action button. And I'm totally locked in a stalemate. Here is my set up: A player sprite with a body (arcade) which is movable with a facing direction (up, down, left, right) a isLocked flag (if he interacts, prevent new interaction) A group of NPC, each sprite has a body with an interactionType (dialogue, shop, none) an optional dialogueList [dialogues [{speaker, spokenText}, ..], ..] to choose from. an optional shoppingList [{item, price,
  • Create New...