Jump to content

Search the Community

Showing results for tags 'sensor'.

  • 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
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 4 results

  1. Hello, I am working on a catch and run game, and I have cat and rat meshes along with a height map that creates walls for me. I have the locations of rat and cat, also my objective is using websocket to play this game, so I should know information about locations. Simply, I want to send some information to the users so, they can decide which way to go. In Gazebo simulation program, LaserScan that has distance array to the obstacles with decided view of angle such as pi radian is used for deciding which way to go with no knowledge of the world. How can I achieve this goal? How can I get the distances to obstacles which provided with some decided angle of view. I want to do this in that way, because any indexing can be wrong for some situations like roundoff errors may occur, but any suggestions is welcomed. Please consider the fact that I will send this information to users, and wait them to understand quickly.
  2. Background: I am a newbie in game development I'm creating motion sensor game Air Table Tennis on Babylon.JS in which user can control the paddle of table tennis with his/her smartphone. I am using gyroscope/rotational data of mobile in the form of Quaternion to avoid Gimble Lock and sending the data to server(nodeJS). So Gyro data is coming from mobile through node JS. Problem: So, I am using Quaternion, But I am unable to map my paddle as my device. (paddle is not exactly in the position where my mobile is currently now, although moving on x,y,z axix give me correct result). So my question is how to calibrate/Map 3D object same as my mobile device? @[email protected]@Deltakosh Sir kindly help me, I'll be very thank ful. Thanks in Advance
  3. First, let me introduce myself, I'm a web developer since a few years ago, this year in particular my work started to get tedious and boring so I decided on my spare time to try something new (game development), and while searching for options I stumbled upon Phaser. Since I'm familiar with HTML5 and Javascript I'm advancing at a fast pace, I already made some tutorials and small simple games, but as my current challenge I decided go forth and make an clone of a NES game. My game is a standard 2D plataform game were you control a ninja. Currently have my player class working (using a sprite atlas, with all the controls that I need), my level using tiles (using tiled as a level editor), and now I started to work on enemies. In my previous games the enemies were simple (if the player hit them, they simply dissipated, so it was a simply collision test against the enemy group). The thing is, in this game the enemies are a little bit more complex: they patrol and they stay on a platform, they can "fall" into lesser platforms (based on certain conditions) and they can fire at the player if he's in range. I haven't actually started programming them yet (just a generic enemy class), Looking for answers I found an image (IMPORTANT: NOT FROM MY GAME) that can help me out convey what I'm trying to do: Let's assume I want to add an enemy like this. This enemy has a small collision box (the blue box in the center), two sensors (blue at the bottom) for detecting if the floor is there, and two (red) sensors to determine the patrol distance (and if the player is in range, triggering the attack), I want to implement this but I'm not sure if this is even possible on phaser. So my question are: - How can I add sensor on phaser (its this approach even possible?) - What physic system I must adhere to make this work (currently using ARCADE physics)? - its a good idea to have all those sensors on a single sprite or the memory will explode and the game will lag? - There's a "good way" or a standard practice to write enemies/behavior? Any help on how to tackle this issue will be greatly appreciated! and thanks in advance
  4. Hi! I'm using p2 physics to implement a platformer. One of the things I want to do is latch the player onto the (polygonal) path when he's not jumping or falling, and basically treat it like a straight horizontal in terms of movement. I have successfully implemented a system to get the current angle of the ground and move the player tangentially to it, but I'm having trouble with the player's behavior when he lands. I would like to avoid him bouncing back upon impact, so I set restitution to 0. Still, there is some bounce because the shapes overlap on impact and are only separated in the next step. I played around with the relaxation parameter, but at 0 the player shoots out of the shape, and at higher values than 1 he gets stuck in the shape for a little while and slowly eases out of it. So I'm keeping it at 1. I added a long, narrow rectangular p2 body to my player, which I orient in his current movement direction (so that if he's falling down, it's pointing down, when he's walking left, it points left, etc). I use the collisions this body provides to find the shapes that the player would impact with if he continued to move in his current direction. I then check the distance of my player's body to these shapes, and I want to limit the velocity at which he goes precisely so that instead of overlapping the shape on impact, he comes to rest flush against the ground/obstacle/ceiling in question. And there's my problem: I cannot seem to set the right values at the right time. Here are two consecutive frames of an impact: Fig.1 Fig. 2 The orange line is a record of my player's position, the red line is the narrow rectangle feeler. As you can see, the player dips into the ground pretty severely there upon impact. The green line is drawn between the point on the player's circular p2 body that was closest to the impact surface BEFORE the impact (in Fig.1), and the point where it would impact if I managed to do it right (i.e., the shortest vector between the player and the ground). The black line is drawn from the aforementioned hull point into the direction of movement. I don't know why it only drew those after it already had impacted - the data is available in the update function while the pre-impact frame is still visible, and I do set the velocity so that it SHOULD not overlap in the next frame. And yet it does. Do you have an idea why that should be?
  • Create New...