Relating to the motion of objects through space (in 2 dimensions (x,y)) and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.
0
votes
1answer
51 views
Formula throwing a ball to destination [duplicate]
I am throwing a ball using this:
double v, vx, vy, alpha, t2 = 0;
if (Keyboard.GetState().IsKeyDown(Keys.Up))
{
alpha = MathHelper.ToRadians(60f);
v = ...
-1
votes
0answers
51 views
2D Game Engine Gravity [duplicate]
iam Building an JavaScript 2D Engine.
And iam trying to accomplish that my Character that iam controlling is walking on several Grounds that are on different heights.
I thought to do that by checking ...
0
votes
1answer
26 views
Moving a Box2D object in the direction it is facing using applyForce [duplicate]
I'm trying to apply force to a polygon physics object to move it. Whilst I can get it to move upwards easily enough, I'm trying to get it to move in the direction in which it is pointing.
Here's my ...
0
votes
3answers
173 views
how can we define dynamic Path of ViewObject(Bitmap) On Canvas
I am Currently working on One 2D Android Game,
In this game One ViewObject(Bitmap) is moving Across Screen On Parabola Path Like in this Image, But this Path is Static, the Static path is getting ...
0
votes
0answers
33 views
Box2D physics object rotating for no reason? [closed]
I have a physics object in LibGdx (Using Box2D). I'm applying an impulse of (new Vector2(0, 18f * MetersToPixels) (MetersToPixels is = 15f). The gravity in the world is equal to (0, -9.8f).
My ...
1
vote
1answer
32 views
Ring and Pole - Box2d
How I can make a b2Body in box2d so that it could form a ring which does not collide from the center just like a ring. like when we flick the object and there's another body (like pole), the pole can ...
2
votes
1answer
156 views
Movement & Physics in an entity-component system
I'm currently playing around with entity-components systems and got started on the movement/collision/physics parts and would like to have some pointers!
It's a basic 2D sidescrolling game, with the ...
2
votes
1answer
80 views
AndEngine - Moving Rectangle using Accelerometer
I'm learning how to create games with this great engine and I'm trying to put my knowledge in order to create a simple game. My first goal is to make a Rectangle moving using accelerometer and create ...
4
votes
1answer
140 views
How to simulate feather fall in box2d?
I am working with AndEngine with Box2d extension, but general answer or a concept idea will be appreciated too.
I have feather-like objects in a 2D side view world that I want to be part of the ...
-1
votes
1answer
126 views
“Car” movement in 2D dimension [closed]
I am searching for a simple tutorial how to add arcade car physics for my game.
Exactly same user units behaviour i found in next games:
Tank Hero: Laser Wars
Death Worm:
Video:
...
-1
votes
0answers
62 views
Collision between the player , stairs, ramps etc [closed]
i am making a game 2D in XNA 4.0. I have already made gravity , animations and the jump. Now i need the collision between my character and the objects (obstacles , stairs etc.) How can i do that? ...
0
votes
3answers
139 views
Gravity independent of game updates per second
Edit
Just for clarification, my sprite's 'movement' isn't the problem. If I set my Time variable to 4 seconds, then it will cross the screen in exactly 4 seconds regardless of logic updates rate per ...
4
votes
3answers
181 views
Calculating buoyancy force
I am trying to simulate a buoyancy force for objects submerged/suspended in a fluid in a 2D environment.
According to Game Physics: Engine Development: How to Build a Robust Commercial-Grade Physics ...
1
vote
2answers
88 views
Throw object towards predefined place? [duplicate]
I have a 2D side-view game with object attributes such as x, y, speedX, etc. Now I want to throw a given object from any place on the screen onto a defined goal place, in such a way that its ...
0
votes
0answers
72 views
Twine Engine with Libgdx
I am new at game development and want to know how can I implement twine engine in 2D games built in Libgdx ?Any tutorial or sample code can help me.
0
votes
1answer
83 views
Collision and gravity problems
So this is an easy question. I need to implement gravity in my game but where I'm stuck is what variables do I need in my Entity object for the calculations and a good algorithm that I can use for ...
1
vote
1answer
153 views
Swarm/crowd movement with box2d?
Apart from using b2Body::setTransform(), are there other ways to move a body around while keeping its dynamics ?
I want to move several bodies at the same time into one direction, pretty much like ...
-1
votes
1answer
125 views
Help with tile-based collision [closed]
I've been working on a 2D platformer using Flash. I've managed to get the collision detection working, but its not exactly perfect. Below is the code I'm using
//Get the speed of the player
...
2
votes
1answer
195 views
Realistic 2D Planetary Physics Engine?
I'm doing a spaceflight simulator in C++ (using Allegro 5), and I realised that I could just use a physics engine instead of writing my own physics.
So that's what I'm doing.
Since this is going to ...
1
vote
2answers
112 views
Moving Sprite With Physics Frame
Normally, a physics frame in pink (see image below) gives the body for detecting hit signal. It usually either falls down or lifts up depending on the gravity orientation. The question is: Is it ...
3
votes
2answers
183 views
Creating stable tentacle structures
I am using verlet integration to simulate some tentacles. So far it works great and I am satisfied with how it looks in general. Here is how a tentacle is built:
The very stiff sticks are colored ...
1
vote
0answers
104 views
Why won't my Box2d bodies collide? [closed]
I'm doing something wrong when trying to get bodies to collide using jBox2d & Slick2d. Here is have just my basic init, update, and render methods. Render and update seem to work fine for drawing ...
3
votes
1answer
191 views
Fluid Particle Grid
So recently I have been looking at some fluid simulation techniques, specifically Smoothed Particle Hydrodynamics. One of the key components is a grid to avoid O(n^2) searches. I have been having some ...
-1
votes
2answers
186 views
Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA
Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code
iceBoy.moveY++;
iceBoy.position.Y += moveY;
Now heres the ...
1
vote
2answers
108 views
limiting jump forces to achieve a maximum jump height [duplicate]
A player and the world are modeled using a physics engine. Jumping is modeled by applying a vertical upward force to the player's physics body when the jump button is pressed.
The upward force is ...
-1
votes
1answer
95 views
Bullets Spawning in same direction [closed]
I'm using XNA to make a Bullet Hell Shooter game, and I'm running into some troubles when I try to change the direction in which the bullets move. Been trying to debug for awhile, but haven't gotten ...
1
vote
1answer
138 views
Debug Render In Cocos2d Android
I want to implement debug render for cocos2d android.So I can view how bodies are created.
Right now I use gdx.jar file for box2d and load that jar file following way.
static {
...
0
votes
2answers
79 views
Problem with sensor in box2d [closed]
I have two bodies: one green static sensor (spikes) and one orange dynamic body (brick).
I have bullet and it's a dynamic body too, but with bullet flag set.
My problem is that when the bullet is ...
2
votes
1answer
276 views
Simple 2D hair simulation/manipulation
I would like to simulate very simple hair in a 2D environment, and will need to be able to "brush" the hair.
What I want to do: A 2D character is facing squarely towards the player. The player can ...
0
votes
2answers
68 views
Checking bounds of a quad
I want to know how would I tell if a quad touches another quad in my game built in Slick2D. I have a class that I named "Bounds" which has 4 "Point" objects which just store an X and a Y value and a ...
1
vote
1answer
204 views
In 2d game logic, should I use pixels or world coordinates?
Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed.
For example Box2D requires you to use ...
1
vote
2answers
131 views
Distribute circles evenly on Screen - circle packing
I want to evenly distribute a random amount of circles with random diameter on the screen for. This level doesn't scroll so the users screen resolution sets the limits. Further I would like the ...
2
votes
1answer
104 views
Physics movement prediction is way off [closed]
I'm making a simple, non-networked game. There are two players and a ball. In implementing the AI for the second player, I've run into a huge problem predicting where the ball will hit the ground. ...
4
votes
2answers
274 views
Whats the physics behind the doodle jump game?
I'd like to know how we can achieve the doodle jump type physics using andengine.
I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
0
votes
1answer
82 views
Increase restitution (bounciness) of an object in a JavaScript formula
I'm going slightly around the houses on this one. I originally started a thread over on Stack Overflow about it but then it seemed to diverge into mathematics, with no joy from the SO community over ...
1
vote
2answers
149 views
Collision detection for Monotouch [closed]
What I want to have for my Monotouch 2D projects:
simple collision detection and collision polygons working with UIViews
Sounds simple, isn't it? I've evaluated a lot of engines available on the ...
12
votes
3answers
646 views
Resolving a collision with forces
In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position.
Doing this "pushes" the first AABB ...
4
votes
2answers
248 views
Ball bouncing infinitely and constantly
Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm:
...
1
vote
1answer
232 views
Collision detection against specific sprite shape using XNA with Farseer Physics?
I am making a 2D XNA Game, using Farseer Physics for collisions.
I need collisions to be resolved against the actual shape of the sprite image, ignoring transparent pixels, rather than against the ...
-2
votes
1answer
108 views
Help finding a good XNA physics library? [closed]
I'm looking for a good physics library for XNA. Can anyone help me find something good, simple and easy to learn for XNA?
1
vote
0answers
80 views
What to do after detecting OBB-OBB intersection
I'm using this code to detect intersections between two OBBs. The problem is that i don't know what to do after detecting it. I tried using a simple algorithm:
if (collision detected) {
...
0
votes
0answers
90 views
3D-Engine for 2D Graph Visualization [closed]
I'm planning to use a 3D-engine to do visualization and animation of very large 2D-graphs of data (100k objects) using relatively simple shapes mainly boxes, circles, arcs, rounded-boxes, etc.
...
1
vote
2answers
184 views
Find the Contact Normal of Rectangle Collision
It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given.
Basically, I have two rectangles (AABBs) that ...
1
vote
1answer
200 views
Am I implimenting a sweep and prune broadphase correctly? [closed]
The code that I am using is:
std::vector <PhysicsBody*> physicsChildren; //containing all objects
...
std::sort(physicsChildren.begin(), physicsChildren.end(), sortByLeft);
...
1
vote
2answers
320 views
Non-physics character movement in a Box2d Environment
I am in the process of creating a physics platformer. However, I want the player movement to feel very old-school(as in: non-physics like), which means that the character:
Should always move equally ...
0
votes
0answers
132 views
An “AABB Physics Engine” [closed]
I've been working on the physics for my 2D game and for the past two weeks it's been doing my head in. I wanted something a little more complicated than what you see in 2D platformers, but I wanted to ...
6
votes
2answers
640 views
How could you create climbing movement in a 2D platformer?
Basically what I want to do is have a playable character that is able to "walk" on an organic surface at any angle, including sideways and upside-down. By "organic" I mean I want my levels to have ...
0
votes
1answer
92 views
Separating Axis Theorem fails at certain angles
I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
0
votes
2answers
99 views
Circle Collision class not positioning itself correctly
Ok I am using unity3D and the Futile framework. I have everything drawing and working correctly with Futile, but I am trying to attach a circle collision class to the FSprite that I have. I must be ...
1
vote
1answer
134 views
What physics engine support force fields and bodies represented as points?
I need a game engine that supports force fields in 2d or 3d, but suitable for 2d calculations, like bullet.
Each body I want to simulate is represented as a set of points. Each point has positive ...






