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.

learn more… | top users | synonyms

0
votes
0answers
6 views

What game engines support 3D graphics for 2D games [on hold]

The examples for such games would be: Trine 2, Super smash bros series, Donkey kong country returns, and such. I am aware that Unity would be a good engine for this, but I am looking for cheaper ...
0
votes
1answer
97 views

Mobile: Physics and movement actions

I've been using spritekit for a while for a few small games. One thing I've noticed is that spritekit is the first game framework I've used that allows me to apply move actions to physics bodies. ...
3
votes
2answers
102 views

A Star pathfinding algorithm, multiple node set optimization

I'm trying to determine if this is an optimization I should pursue or if this is way to complicated to be worth my time. I've successfully implemented the A Star Algorithm for my video game. I used ...
2
votes
1answer
128 views

How do I convert a partially transparent image into polygons?

I'm using GLEE2D, a level editor allowing me to import images, scale them, rotate them, and position them onto layers and export the data into XML format. However, it does not tell me objects' ...
1
vote
1answer
36 views

Numerical integration of multiple off-center forces on a solid body

I am trying to develop a little simulation (for the sake of learning a little bit about physics) involving a circle (mass m, radius r, regular density) and two forces f1, f2 that can be applied on any ...
0
votes
1answer
189 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
-1
votes
2answers
55 views

Speeding up sprite the second time it passes the screen [closed]

I'm a student studying Games Development. I want a sprite to speed up on it's second passing of the screen. How do I do this? Code I wrote so far: public class Game1 : Microsoft.Xna.Framework.Game { ...
2
votes
1answer
118 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
2
votes
2answers
132 views

Sprite Kit - containsPoint for SKPhysicsBody?

I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the ...
0
votes
2answers
298 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly affected on the Y axis and hardly at all on the x axis. I don't ...
2
votes
1answer
112 views

How can I simulate a magnet that attracts a ball in a 2D enviroment?

I am making a top-down game where you have to move a ball from point A to point B. You are attracting the ball using magnets that are standing still. The ball needs to get pulled by multiple magnets. ...
0
votes
0answers
22 views

How to determine positions to draw lines on a screen with AndEngine

I have a screen (480x800), M(mx, my) is a static point, and N(nx,ny) is a dynamic point on screen. Position of N(nx, ny) depends position of touch. I want to determine position of P(?,?) and Q(?,?) to ...
2
votes
1answer
158 views

Unity WheelJoint2D will not rotate when increasing motor speed

I have a wheel joint 2D attached to a game object in Unity: In its associated wheel script I am increasing the motor speed as described in the tutorial. public class Wheel : MonoBehaviour { ...
0
votes
1answer
96 views

Unity 2D, C# - Make object move diagonally by a certain angle?

I have a sprite object which I want to move in 8 directions. Left, Right, Up, Down, Left top, Right top, Left down, Right down. The view is 2D with a isometric projection. The difficulties I am ...
0
votes
1answer
33 views

Incosistent jump, stuttering

I've written this C# code to handle movement in my testing project. The game is supposed to be 2D, some kind of a platformer, just to get me started with Unity. However, it seems there's something odd ...
1
vote
1answer
112 views

Spritekit - gradually apply force vector in different direction (space ship turning)

I have a space ship that I'm applying a force vector to using a joystick for control. I would like this to smoothly fly around when I'm switching directions.. Exactly like minisquadron if you've ...
4
votes
1answer
80 views

Determining a sensible gear-like hierarchy for a series of connected objects

I would like a series of objects to behave in similar manner to a series of connected gears. This means that each black object in the diagram below will rotate at a speed based on the ratio of their ...
2
votes
0answers
45 views

Implementing a motorized hinge joint

I have a 2d physics engine, with three boxes: "body", "left wing" and "right wing". The wing boxes are connected to the body using a hinge joint. The physics world has no gravity. I'm attempting to ...
4
votes
1answer
2k views

How can I implement fixed joints in a 2D physics system?

I'm developing a simple, 2D physics system to complement an entity/component game object framework. So far, I have implemented some basic, tutorial-level physics. An entity that is affected by physics ...
1
vote
0answers
70 views

Ease Rotate RigidBody2D toward arbitrary angle

I'm trying to make a rigidbody2D circle return to an orientation after a collision. But there is a weird behavior I do not expect - it always orients to the same direction. This is what I call in ...
-1
votes
1answer
122 views

Trajectory Projectile with Collision Detection

Right now I am trying to create projectile for cannon in which I want to detect collision also. At present I have simple working projectile after using two references Unity – How to display ...
0
votes
1answer
66 views

Bullet - objects falling through

I have problem with bullet collisions. You can see problem on this video (around 0:18): http://goo.gl/DiVP8l Objects are "embeded" inside vertical bars - that is not correct - they should be ...
1
vote
1answer
104 views

Consistent Space Gravity Simulation

I have done some reading into this subject but haven't been able to come to a conclusion that I'm really satisfied with so far, so here is the situation. I have a game set in space, its top down and ...
0
votes
0answers
31 views

How to handle car game circuits in a top-down view?

I'm already using a physics engine (box2d) but i have no idea about how should I implement circuit's path with wall collision. I tought about checkpoints but this doesn't solve the wall collision.
1
vote
2answers
160 views

How to detect collision on specific part of the sprite node

I have a spike and a ball is falling down, when the ball touches the top point of the spike, I want to make the ball invisible, and when it touches on the other part i.e on the sides I don't want to ...
9
votes
3answers
4k views

Box2D Get Bounding Box of a Body

In Box2D, I was curious if it's possible to get a bounding box of a body already created in the world. So basically, the Body is created, it's interacting with the world and such. And I needed that ...
2
votes
1answer
91 views

Best practice for organizing the physics of objects?

Apologies because this is a long post and I am inexperienced. I would really appreciate the input from some experienced developers. These are my two goals for this project: To learn the best ...
0
votes
1answer
102 views

Resolution independent physics

I'm making a game like Doodlejump but don't know how to make the physics scale on multiple resolutions. I also can't find anything related to this on Google. Right now I'm scaling the game using ...
2
votes
1answer
81 views

Frame-rate independent friction on movement in 2d game

I have been trying to implement a simple physics system for a 2D space game I am making. I have it pretty much working, but I have encountered an issue with the way I apply friction. I have tried ...
1
vote
1answer
414 views

Ball Physics : Bounce height altered by elasticity of ball and bounce surface

I have created a bouncing ball simulator using XNA and I am happy with my use of gravity, acceleration, change of direction and friction/spin. However, I am now at a stage where I would like to ...
0
votes
0answers
44 views

Box2D collision damage calculation from postSolve or not?

I'm using postSolve to get impulse then calculate damage base on that impulse. But there's some issue: Stability The damage isn't stable. When the same ball is hitting with same speed, the damage ...
3
votes
0answers
90 views

How can I smoothly rotate a joint to an angle? [duplicate]

I would like to set the speed of my Box2D revolute joint on every update such that it rotates to a desired angle and stops. It should ramp down as its angle approaches the desired angle. My first ...
6
votes
3answers
3k views

Implementing Separating Axis Theorem (SAT) and Minimum Translation Vector (MTV)

I was following codezealot's tutorial on SAT and MTV and trying to implement it myself but I've come a cropper when it comes to getting the correct MTV. Here is my example: (Cue pretty pictures...) ...
1
vote
1answer
147 views

How do I calculate the motion of 2 massive bodies in space?

I'm writing code simulating the 2-dimensional motion of two massive bodies with gravitational fields. The bodies' masses are known and I have a gravitational force equation. I know from that force I ...
1
vote
2answers
109 views

How to Calculate Velocity in a 2D space game

I am currently using screenpos.X = (float)(screenpos.X + velocity * Math.Sin(r)); screenpos.Y = (float)(screenpos.Y - velocity * Math.Cos(r)); For my Movement with r being the Rotation in Radians. ...
0
votes
0answers
50 views

Particle friction with variable timestep in XNA

Alright, so I'm working on an engine of sorts in XNA (yes, it's deprecated, I know) and I'm implementing my own particle system. I've defined a "ParticleEffect" such that when it's supplied a GameTime ...
2
votes
1answer
143 views

Inverse Explosion with Unity2d

I am currently trying to make all other objects push away from the player when the player explodes. It currently works, but it pushes close objects a little and far objects very far. What I want is ...
9
votes
2answers
1k views

What is the best way to handle simultaneous collisions in a physics engine?

I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
16
votes
2answers
4k views

Why is RK4 better than Euler integration?

At the end of these great slides, the author compares all the different integrators presented. One way or another, they all fall short except for Improved Euler Integration and Runge Kutta 4 ...
1
vote
2answers
182 views

Collision detection via adjacent tiles - sprite too big

I have managed to create a collision detection system for my tile-based jump'n'run game (written in C++/SFML), where I check on each update what values the surrounding tiles of the player contain and ...
0
votes
2answers
181 views

How can I make an object's hitbox rotate with its texture?

In XNA, when you have a rectangular sprite that doesnt rotate, it's easy to get its four corners to make a hitbox. However, when you do a rotation, the points get moved and I assume there is some kind ...
1
vote
1answer
67 views

Reflection velocity

I'm trying to get a moving circular object to bounce (elastically) off of an immovable circular object. Am I doing this right? (The results look right, but I hate to trust that alone, and I can't ...
0
votes
1answer
110 views

Bouncing ball slowing down over time

I use the unreal engine 4 to bounce a ball off of walls in a 2D space, but over time the ball gets slower and slower. Movement happens in the tick function of the ball FVector location = ...
-1
votes
1answer
97 views

simple collision detection with box2dweb

im beginner in box2dweb that version of box2d for javascript i wrote simple gravity system and i want to detect the collision between the box and the ground , when the falling box hit the ground ...
0
votes
1answer
87 views

Can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?

In Unity2D, can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D? I would like to move my character using the circle physics (without fixed-angle), but display him always as if he ...
0
votes
0answers
34 views

Box2d not showing consistent behaviour with sprites

Box2D newbb here. My question is in regards to this create js project:http://mboyeman.com/dashingdog/ (runs best in IE...:3) I wrote a function(assignBlockBodies) to give 2D Edges to sprites based on ...
4
votes
2answers
444 views

How to circle a target at a constant distance

I have an AI ship that stops approaching when it gets within firing range, and starts strafing around its target. The problem is that it doesn't circle its target very well. The following code ...
1
vote
2answers
271 views

Platformer Collision Detection Order

I'm attempting to create a 2D Platformer Game and I'm having difficulty with the physics I have implemented. Each loop my code does the following: Apply the physics to a temporary X and Y ...
9
votes
2answers
1k views

How can I make a character walk on uneven walls in a 2D platformer?

I want to have a playable character who can "walk" on an organic surface at any angle, including sideways and upside-down. By "organic" levels with slanted and curved features instead of straight ...
1
vote
1answer
114 views

Mixing interpolation with extrapolation in multiplayer game

I am creating a multiplayer drag racing game and have difficulties mixing extrapolation and interpolation. To save network bandwidth i am getting information from the opponent only on his button ...