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

7
votes
6answers
405 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 ...
3
votes
1answer
371 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 ...
0
votes
1answer
685 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 ...
16
votes
1answer
595 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 ...
2
votes
3answers
2k views

2d Collision detecton axis aligned boxes

I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find ...
8
votes
5answers
3k 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 ...
1
vote
1answer
1k 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 ...
4
votes
1answer
377 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 ...
1
vote
1answer
244 views

Mouse joint isn't restricting the ball from going to the other part of the screen

I'm developing a application in cocos2d using the Box2D framework, but unfortunately I am having issues. I'm not able to restrict the orange ball in the half screen area, taking the image below as ...
6
votes
1answer
235 views

How do I change the speed of an object without changing path travelled?

I have a ball which is being thrown from one side of a 2D space to the other. The formula I am using for calculating the ball's position at any one point in time is: x = x0 + vx0*t y = y0 + vy0*t - ...
2
votes
2answers
1k views

Find meeting point of 2 objects in 2D, knowing (constant) speed and slope

I have a gun which fires a projectile that has to hit an enemy. The problem is that the gun has to be automatic, i.e. - choose the angle in which it has to shoot, so that the projectile hits the enemy ...
3
votes
3answers
314 views

Adding 'swerve' to a direction

I'm not much of a maths expert, so this is probably quite straight forward. I was playing a soccer flash game where you take free kicks. You provide Power, Swerve and Direction. I'm reading up on ...
8
votes
1answer
3k views

Basic Box2D collision detection

I don't understand how to listen for collisions in Cocos2D/Box2D. Say I have two dynamic circle bodies. One is very small and the other is relatively large. When the small circle collides w/ the ...
6
votes
4answers
1k views

Determing an object's position along a curve over time

I have some objects in my game which are "thrown". At the moment I am trying to implement this by having these objects follow a parabolic curve. I know the start point, the end point, the vertex and ...
7
votes
1answer
530 views

Finding the point of collision

I'm writing a 2D rigid body simulator. The objects being simulated are convex polygons. My question involves how to decide on the "point" of collision, so that when I apply a response force, I can ...
4
votes
1answer
223 views

Box2D stable range and position

Box2D marks stable range of object size is 0.1M ~ 10M. This specifies object size range. How about space size? If I make an 1M object at (1000.0f,1000.0f) position? Is it can be stable? Or should I ...
8
votes
3answers
897 views

Forces on a wire in a 2D environment? (Physics)

Assume I have a physics primitive I am going to call a "wire" wrapped around a 2D environment (as described in this question). Here's an illustration of what that might look like: In the example ...
5
votes
1answer
437 views

Pseudo-magnet implementation with chipmunk

How should I go about implementing "natural" magnet on a certain body in chipmunk space? Context is of simple bodies lying in the space (think chessboard). When one of the figures is activated as a ...
4
votes
1answer
365 views

Good book or tutorial for learning how to apply integration methods

I'm looking to animate a graph layout using edges as springs and nodes as weights (a node with more links will have a bigger weight). I'm not capable of wrapping my head around the usage of ...
1
vote
0answers
495 views

Cocos2d and Body with few collision shapes using chipmunk

I'm using Cocos2d (0.99.5) with chipmunk physics engine. Currently I'm trying to place a body into space which is combined from few circle shapes. Let's say I have a corresponding sprite image with ...
2
votes
2answers
1k views

Using box2d DrawDebugData with multi layer scene?

In my Game, a Scene is composed by several layers. Each layer has different camera transformations. This way I can have a layer at z=3 (GUI), z=2 (Monsters), z=1 (scrolling background), and this 3 ...
1
vote
1answer
200 views

2D Game Physics: How to evaluate when an accelerating ray is close to a point?

Given a ray in a 2D world at position p with initial velocity u and acceleration a how can I tell when it's within a certain distance r from a certain point.
1
vote
1answer
572 views

How to use the chipmunk physics-engine?

I am developing a game demo where I want a physics simulation with balls and obstacles. I know that this is possible with the chipmunk physics-engine but I don't know how to use it. Can anybody give ...
6
votes
1answer
1k views

How does 2D Game Physics work? [duplicate]

Possible Duplicate: How do I build a 2D physics engine? If we take the game Angry Birds that had big success lately I were thinking how do they implement the physics in a game like that? ...
3
votes
3answers
718 views

2D Ragdoll - should it collide with itself?

I'm working on a ragdoll fighting game as a hobby project, but I have one dilemma. I am not sure if my ragdoll should collide with itself or not, i.e. if ragdoll's body parts should collide. 2D ...
1
vote
5answers
8k views

which is the best physics engine for flash as3? [closed]

i am a game programmer and i use actionscript to do all my collision checking, boundary checking etc...but recently i noticed there are things called "physics engines" that help me concentrate more on ...
1
vote
1answer
269 views

Determining relative velocities on impact?

I'm trying to figure out a way to determine the relative velocity of a body colliding with another in a 2D environment. For example if one body is moving at (1,0) and another traveling behind it ...
9
votes
5answers
2k views

2D platformers: why make the physics dependent on the framerate?

"Super Meat Boy" is a difficult platformer that recently came out for PC, requiring exceptional control and pixel-perfect jumping. The physics code in the game is dependent on the framerate, which is ...
1
vote
3answers
2k views

Collision Detection for 2D

I am working on a simple game, where I need to do a collision detection of two Texture2D. The code I have written is: bool perPixelCollission = false; Texture2D texture1 = ...
9
votes
1answer
1k views

Who know how to implement the 2D bone animation showed in the game?

I wonder how do they implement the bone animation in the flash game http://www.foddy.net/athletics.swf Do you know any study materials which I can start to learn 2D bone system from? I just ...
5
votes
1answer
452 views

Strangeness when simulating a chain

I'm using box2d and I simply hook up 10 points each with a similar length constraint to the adjacent point. When I move 1 point, the others follow just like a rope/chain. Just like one would expect. ...
13
votes
1answer
6k views

Quad tree vs Grid based collision detection

I'm making a 4 player co-op r-type game, and I'm about to implement the collision detection code. I've read a lot of articles and stuff about how to handle collision detection, but I'm having a hard ...
2
votes
2answers
221 views

I'm trying to learn the “digital physics” required to do a floating network of spheres

If that is even what it is called. What I am trying to do it: http://asterisq.com/products/constellation/roamer/demo Can someone please point me to towards a book or in vaguely the right direction? ...
8
votes
2answers
1k views

How to implement 2d explosions that will cause damage taking into account covers and distance?

How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal ...
5
votes
4answers
346 views

How do I model a gooey sprite?

I happened to see this structure of a gooey player character made in flash. Can anybody suggest onto what computer science concept I should use to make a goo make it behave like a goo Thanking ...
6
votes
2answers
1k views

How can I implement rectangle collision response?

I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of ...
8
votes
4answers
901 views

Not sure how to handle “deceleration”

I say "deceleration" because I'm not using acceleration at the moment (it is being calculated, it's just set to 0 0); what I mean is moving the velocity back towards zero, eventually stopping. I'm ...
14
votes
3answers
2k views

How do I handle moving platforms in a platform game?

I don't want to use box2d or anything, I just want simple moving platforms (up-down, left-right, diagonal and circular paths). My question is to handle the update order / control hierarchy so that the ...
8
votes
1answer
415 views

How can I copy or back-calculate definitions for an entire b2World?

I'm working on a platformer where I'd like to be able to move or copy bodies between multiple Box2D b2Worlds. The desire has cropped up three times now - moving objects between documents in my editor, ...
4
votes
2answers
1k views

How to create simple physics for a group of balloons colliding in the screen (2D)

The game is 2D, how can I make simple physics for a group of balloons colliding in the screen. What I need is the balloons not to overlap and to bounce when they reach the limits of the screen or ...
3
votes
2answers
294 views

Good ways to edit arbitrary collision shapes for 2D physics engine?

Assume you have several 1024x1024 textures which contain an arbitrarily shaped and relatively complex cave system whose walls need to have collision polygons defined. The polygons need to be convex to ...
4
votes
2answers
869 views

A good place to learn about Game Programming with Mathematical Vectors?

I am looking for a place in the web where I can turn my current game development process into a vector based approach. I am sorry If this question has been asked once. According to my google search ...
5
votes
4answers
5k views

2D AABB collision response

I'm making a simple platformer, and I wanted simple collision handling. So I gave all my objects an AABB hitbox and tried to resolve collisions. However, I can't get it to work. My main character has ...
7
votes
2answers
1k views

Box 2D Set Origin

I'm trying to set the origin of a box2d shape. By default, a shape rotates around the center. But I'm trying to get it to rotate around the left of the shape. Like a clock for example. I've heard of ...
5
votes
3answers
2k views

Implementing a 2D Platformer Game Engine

Any ideas where I can find info about making 2D jump & run games? I need some general ideas, so I wouldn't reinvent wheel (at least where game design is concerned). Another point is that I am ...
4
votes
1answer
344 views

How to take into consideration the effect of initial rotation of a ball hitting & reflecting off a surface

Hey all, I am trying to take into consideration the effect of inertia of the initial rotation of a ball, hitting a surface, into the exit velocity vector of the ball. My current theory is this: ...
4
votes
1answer
768 views

Problem with box2d at beggining

I have problem with simple box2d physics: I have two bodies : 1 - static box , 2 - dynamic box. I only want to this dynamic box fall on this static, and lay. But now it looks like that at end , ...
6
votes
2answers
5k views

Using The Box2D Polygon “Set()” function?

I'm using the Box2D physics engine. And there's a type of shape for box2D called b2PolygonShape. In this class, you can create polygons. There is also a Set() function that takes an array of points ...
2
votes
4answers
885 views

Good way to implement really basic physics in Flash?

I'm making a somewhat simple side-scroller in Flash. The way I'm currently doing the really basic physics(you don't fall through floors/can't walk through walls) is that I have a big symbol of all the ...
6
votes
2answers
1k views

How to calculate the exit speed of ball bouncing off a solid surface

Hey all, I am working on a simple game to include some rigid body dynamics, involving placing (moving & rotating) some springs to bounce a falling ball into a target area. My problem is correctly ...