# Tagged Questions

Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

1k views

### Android Fling Gesture, Animation And Collision - Resources?

I'm starting work on a 2D Android game where the player will put their finger on a game piece and do a fling gesture to throw the piece across the gameboard. I've gone through some Android ...
5k views

### How to handle physics of moving platforms in a platformer?

So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you ...
7k views

### 2D Spatial partitioning alternatives to spatial hashes and quadtrees

I've been trying to implement a spatial partitioning algorithm in my game, but both spatial hashes and quadtrees aren't what I'm looking for. My level size is not supposed to have a limit (only Int32 ...
3k views

### Box2D Platform body not moving player body along with it

I am creating a game using Box2D (Javascript implementation) - and I added the ability to have a static platform, that is moved along an axis as a function of a sine. My problem is when the player ...
3k views

### Where to start for implementing vehicle physics? [closed]

A little background for myself. I am relatively experienced with 3rd part physics engines such as Havok, Box2D, Bullet and have successfully integrated them in custom engine(s). I have also made a ...
409 views

### Options available to a programmer on the Main Game Loop [closed]

Could someone please give me some insight into each one of the four topics listed below. I have a good idea about what passive and active rendering are, and that the use of active rendering is more ...
3k views

### How to calculate falling and accelerating velocity?

I'm thinking of making a lander game, where you control a spaceship and need to land it without crashing. What is a simple formula to calculate speed of falling or acceleration with relation to ...
1k views

### Are there well-known algorithms for fitting a polygon to an arbitrary shape?

I'm using the Chipmunk physics engine to make the levels for a 2D C game. I'd like to be able to fit a polygon to an arbitrary shape to serve as the collision mask. Given a black and white collision ...
1k views

### Resources of realistic water simulation?

I want to study water simulation, with a a demo with source code which using physically-based methods(Eulerian approaches or Lagrangian approaches). How can I get some examples?
675 views

### Physics for Android Game

I'm making a 2D game for the Android phone, one that involves falling balls. I want to use a physics engine to properly simulate the balls falling and hitting other objects. I'm currently using Phys2D,...
1k views

### Collision response for 2D racing game

The title is fairly self-explanatory. I have a 2D racing game that utilizes per-pixel collision detection (the track is essentially two bitmaps, one for the graphics, one for collision data). The ...
7k views

### 2D Platformer AABB collision problems

I have a problem with AABB collision resolution. I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png ...
2k views

### How could you parallelise a 2D boids simulation

How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu). In the above example, the non-coloured particles move around ...
694 views

### 3D game on a planet

Would it be much more work to create a 3D game on a planet rather than on a flat plane? What engines would support this and what techniques would I use? An example would be a small sphere the player ...
907 views

### Tracking Object Position - Firing on a Trajectory

How can I calculate the position of an object after "firing" it from a fixed point? I am to create a small game - most likely with canvas (pure HTML, JS based) or Adobe Flash - in which the player ...
1k views

### Homemaking a 2d soft body physics engine

hey so I've decided to Code my own 2D soft-body physics engine in C++ since apparently none exist and I'm starting only with a general idea/understanding on how physics work and could be simulated: ...
3k views

### 2D soft-body physics engines?

Hi so i've recently learned the SFML graphics library and would like to use or make a non-rigid body 2D physics system to use with it. I have three questions: The definition of rigid body in Box2d is ...
3k views

### Movement prediction for non-shooters

I'm working on an isometric 2D game with moderate-scale multiplayer, approximately 20-30 players connected at once to a persistent server. I've had some difficulty getting a good movement prediction ...
655 views

### Channelling an explosion along a narrow passage

I am simulating explosions in a 2D maze game. If an explosion occurs in an open area, it covers a circular region (this is the easy bit.) However if an explosion occurs in a narrow passage (i.e ...
1k views

### Physic of an arrow in flight

What are the formulas which represent the horizontal and vertical displacement of an arrow in flight (as well as it angle)? I would like to make sure that I take into consideration the arrow's fluid ...
2k views

### 3D Ball Physics Theory: collision response on ground and against walls?

I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept. Think Monkey Ball as an example of the type ...
658 views

### Problem with impulses in my physics engine

I'm currently developing a small 3D impulse-based physic engine for a CS project. It uses GJK for collision detection and is kind of stable at the moment. Nevertheless, I'm not satisfied with my ...
614 views

### Tried and true basic movement physics (jumping, not walking through stuff)?

If I sat down long enough, I'm sure I could make this happen, but I don't want to reinvent the wheel if I don't have to, especially if XNA has patterns in place for doing this. For now, I'm working ...
4k views

### How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
913 views

### Bringing a Box2D, Physics Enabled game Online?

Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea? Now if only sending ...
7k views

### How do I detect the direction of 2D rectangular object collisions?

After this question, I need some more help. How can I find out which side of a rectangle a collision came from and react accordingly? The blue arrows are the paths that some circular objects ...
4k views

### Angle of Reflection

I have this "Breakeout style" game. I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like: I've managed to get the collision per ...
487 views

### Determining player.isFalling() through change of y?

I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? Are there ...
458 views

### What maths should I learn for game programming, and what aspect of programming does it relate to? [duplicate]

Possible Duplicate: What math should all game programmers know? Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in ...
397 views

### Moving object through nodes in Quadtree

I'm working on my own quadtree for use in games for physics (collision detection to be exact) but am unable to move an object from one node to another node. What I'm doing is if some object is to be ...
778 views

### 2D game physics, doing it right

I have a ball that you can make jump, I have a sneaking suspicion I'm doing this wrong. It works now, to the extend that gravity pulls the object down toward the ground, but I'm having trouble ...
2k views

### Simple physics for modelling ship/submarine movement

for a first iteration of my sim, I need a very basic physics model for ship/submarine movement. I'd guess it might be a good approach to use vectors here (ship heading but also considering sea states ...
761 views

### Recreating retro/NES style physics with intentional imprecision

Background: I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate ...
2k views

### ways to make a physics engine

Hey so i've been looking into real time physics engines, which led me to the crazyLaggoa multiphysics engine by thiaga costa, and brought up the question of: What are some possible ways, ideas that ...
204 views

### Collisions between players at spawnpoints

I am working on a FPS/MMORPG and ran into a problem at spawnpoints, when I enabled collision detection between players. Neither player would be able to move if both spawned at the same time, because ...
5k views

### Why is my velocity decaying?

Programming in Java. Tinkering around with physics. My entities all have position and velocity. In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so: // add ...
1k views

### Are game programmers aware of all the physics derivatives?

I am trying to study XNA for game programming. XNA has many methods that can simplify developer's life, such as reflecting the vector when it hits a solid plane. I know these are good and developers ...
5k views

### How can I easily implement swinging in a platformer game?

I'm developing a game in which player can use ropes to swing (just like what Spiderman or Bionic Commando did) and I'm having problem implementing this behavior. Can anyone help me how to do this, I ...
8k views

### Is there a 2d physics engine that can model fluids and gases? [closed]

At this point the platform and programming language don't matter I would just like to know if something out there exists for this. Any help is appreciated.
582 views

### Collision Detection/Response in Vector-based levels

I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this: How would I detect that I'm colliding with one of these lines, and react accordingly (...
1k views

### Should I use animated objects or use the physics engine on iOS scenes with lots of rigidbodies?

I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to handle these kind of settings having in mind that you want the physics to be as realistic as ...
1k views

### Converting 2D Physics to 3D

I'm new to game physics and I am trying to adapt a simple 2D ball simulation for a 3D simulation with the Java3D library. I have this problem: Two things: 1) I noted down the values generated by the ...
1k views

### Correctly Implementing a “Double Jump”

I'm working on a 2D iPhone game using Corona (Trial version, so I can't use their forums). The game involves the character falling through the sky, and I'm trying to implement a "double jump" for the ...
433 views

### How to balance a ball on a rotating plane?

I'm doing some research and I really don't want a physics engine when a simple mechanism will do. I have a ball that will be balanced on a plane. The ball will always be "stuck" to the plane and ...
3k views

### What is your Unity 3D physics engine budget for iOS games? [closed]

I'm testing Unity for a game that I'm building, and I've touched its limit. My test scenario: a wanna-be house with 200 elements (cubes rescaled) no textures, box colliders and rigid bodies for each "...
349 views

### How do I rotate a segment + normal so that the normal is (0,-1) and the segment is now axis aligned

I have an arbitrary line segment, which may or may not be axis aligned along with its normal eg: Segment(Coord(-1,-1), Coord(1,1), Coord(-1, 1).normalize) which represents a line segment with a 45 ...
3k views

### in Unity3d, how to automatically create fixed joints in a wall of cubes?

I want to create a wall: width 6 cubes height 7 cubes therefore I have 22 cubes on the margins and 20 cubes inside. For each of the margins cubes(except the corners) I have to set 3 fixed joints, ...
266 views

### Controls for physics-enabled game object

I'm trying to put together 2D game on Flash ActionScript. Game objects positions are updated by physics library and I'm trying to control them applying forces and updating these forces every frame. ...