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
1answer
413 views

BOX2D Kinematic Platform with parallax layer

I am using a kinematic body for my moving platform on x-axis, so I set the linear velocity to b2vec2(5,0). When the player jump on the platform, it works like it is suppose to. But the thing is ...
1
vote
1answer
1k views

Making an object swing from one rope to another

I am trying to make a Tarzan like game with Cocos2D and Box2D. I am having issues with the physics - making an object swing from one rope to another. I am not really sure how to do this. Could anyone ...
-2
votes
1answer
546 views

Using Vectors for 2d animation [closed]

I've decided that it's best to start using vectors in my games instead of the xPos += xSpeed and yPos += ySpeed approach. I'm posting some of the code from my basic model class which handles movement ...
3
votes
1answer
803 views

How to simulate backspin or topspin in a box2d billiard game?

I am designing a simple billiard game with box2d. I think I can easily simulate hitting left or right side of a ball. Since box2d is not 3D, however, I am not sure how to simulate hitting upper or ...
7
votes
4answers
14k views

2D character controller in unity (trying to get old-school platformers back)

This days I'm trying to create a 2D character controller with unity (using phisics). I'm fairly new to physic engines and it is really hard to get the control feel I'm looking for. I would be really ...
0
votes
3answers
5k views

2D games on Unity and collision detection performance

I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier. I have narrowed my selection to just 2, 2d toolkit and ex2d. ...
3
votes
4answers
468 views

When connecting a physics engine to another engine, should you do all your logic in the units used by the physics side or the rendering side

I'm currently intergrating pygame and pyBox2D, and am wondering which side is best to try to keep to in terms of game units of size. Box2D is Meters PyGame is Pixels At the moment I am thinking I ...
10
votes
4answers
799 views

Player moving up, is he jumping or climbing?

In a 2D physics-based platformer game that has ladders in it, how do you determine whether the player moving up is caused by a jump or him climbing a ladder, such that you know what animation to play? ...
4
votes
1answer
442 views

Making a multi-pieced rectangular breakable body with Farseer

Using Farseer 3.3.1 I want to create a rectangular BreakableBody with many pieces. Right now here is my code: Vertices polygon = PolygonTools.CreateRectangle( 2.5f , 1.25f ); List<Vertices> ...
13
votes
2answers
4k views

2D Planet Gravity

I'm trying to make a simple game where a spaceship is launched and then its path is effected by the gravity of planets. Similar to this game: http://sciencenetlinks.com/interactives/gravity.html I ...
2
votes
2answers
897 views

Canvas Rotation collision detection on a sprite

I am using this code to detect collisions between two rectangular sprites. intersect: function(other) { return this.x < other.x + other.width && other.x < this.x + this.width ...
2
votes
2answers
992 views

2D physics engine for WP7?

I'm looking for a 2D physics engine for Windows Phone 7. Is there a port of something existing for use?
2
votes
3answers
2k views

How do I change my gravity and jumping logic to put the character at a specific height at a specific point in time?

I'm making a 2D platformer on Android using libGDX. One thing I've had a problem with recently is gravity and jumping. I found a few tutorials on the internet and was able to come up with this... ...
27
votes
11answers
5k views

Do 2D games have a future? [closed]

I'm currently working on a 2D soft-body physics engine (since none exist right now -_-), but I'm worried that there's no point to spending what will most likely be years on it. Although I love ...
1
vote
2answers
1k views

2d engine/library for android in C#

I'm looking for a good 2d engine or library (that supports physics) for Android. I have a restriction - language should be C#. It's not a requirement to use Mono Droid, but it seems that it is an ...
4
votes
1answer
654 views

Implementing jumping and heightmaps in 2D RPG/Adventure style games?

I've been putting together, albeit slowly, a traditional style game engine in flash/AS3 along the lines of Alundra/Final Fantasy 3/etc etc.. Everything so far is working smoothly (maps from XML data, ...
0
votes
2answers
532 views

Ways to define a curve

I'm trying to give shapes in my physics engine roundness/ curvature. I am aware of various methods for mathematically defining curves; such as bezier-cruves, ellipses, etc. However I am not sure ...
2
votes
2answers
662 views

Physics in carrom like game using cocos2d + Box2D

I am working on carrom like game using cocos2d + Box2D. I set world gravity(0,0), want gravity in z-axis. I set following values for coin and striker body: Coin body (circle with radius - ...
3
votes
3answers
368 views

Collision filtering techniques

I was wondering what efficient techniques are out there for mapping collision filtering between various bodies, sub-bodies, and so forth. I'm working on a physics engine and I need ways for a user to ...
1
vote
2answers
583 views

Axis-Aligned Bounding Boxes vs Bounding Ellipse

Why is it that most, if not all collision detection algorithms today require each body to have an AABB for the use in the broad phase only? It seems to me like simply placing a circle at the body's ...
10
votes
2answers
1k views

Continuous Physics Engine's Collision Detection Techniques

I'm working on a purely continuous physics engine, and I need to choose algorithms for broad and narrow phase collision detection. "Purely continuous" means I never do intersection tests, but instead ...
1
vote
1answer
739 views

Game Physics With RK4 Implementation For A 2D Platformer

I been reading about RK4 for physics implementation in a game, so I read in some pages and all people recommend me this page: http://gafferongames.com/game-physics/fix-your-timestep/ This page shows ...
2
votes
1answer
395 views

How can I make a car follow the terrain in a 2D (side-view) game?

I'd like to create a game where a car drives over a 2D terrain. Which algorithm to use so the car will follow the mountain incline?
2
votes
1answer
1k views

How to resolve concurrent ramp collisions in 2d platformer?

A bit about the physics engine: Bodies are all rectangles. Bodies are sorted at the beginning of every update loop based on the body-in-motion's horizontal and vertical velocity (to avoid sticky ...
19
votes
7answers
2k views

Optimizing gravity calculations

I've got a bunch of objects of varying size and velocity which gravitate towards each other. On every update, I have to go over every object and add up the forces due to gravity of every other object. ...
1
vote
1answer
619 views

Is there a 2D soft-body physics engine for Flash?

I'd like to write a small physics game by using ActionScript, but do not want to write my own physics engine. Does anyone know a ready-to-use 2D soft-body physics engine with a Flash port?
2
votes
5answers
924 views

How do I set up moving platforms in a 2D side scroller to interact with the player properly?

Edit: I changed the way that gravity was applied so that it is applied even when a player is standing on a block, so instead of the game outputting that you are stepping on a tile as true and false ...
6
votes
3answers
2k views

Is there a good existing starting point for realistic 2d racing car physics?

I'm trying to get a realistic behaving racing car into my 2d top-down game. Making a very simple car that drives around is straight forward but I want a reasonably sophisticated model that models ...
2
votes
3answers
1k views

How do I move a 2D top-down racing camera smoothly and show what's ahead of the player?

I'm trying to make a camera that follows a race car. Right now, I'm smoothing the camera movement out by moving the camera's position a fixed percentage lerp'ed from the camera's position to the car's ...
19
votes
3answers
1k views

How does one avoid the “staircase effect” in pixel art motion?

I am rendering sprites at exact pixel coordinates to avoid the blurring effect caused by antialiasing (the sprites are pixel-art and would look awful if filtered). However, since the movement of the ...
3
votes
1answer
9k views

How to use rigid bodies for characters?

First off, I am making a game similar to SSB, which relies heavily on physics, even though it is a sidescroller. I am currently using Unity. In Unity there are "character controllers" which are used ...
16
votes
1answer
2k views

Ideas for 2D Water Simulation

I am looking for any input on simulating water in 2D, against a rather large (call it) blocked/not blocked array (viewed from the side). I have come up with the following ideas: Cell Automata Do a ...
2
votes
3answers
2k views

Car movement in arcade racing game

I am finishing a very basic 2D racing game with top-down perspective. I can't get the appropriate formulas to make the movement of the cars fun and addictive... Do you have tips on how to achieve that ...
3
votes
2answers
851 views

How can I implement revolute (hinge) joints in a 2d physics system?

Further to my previous question on fixed joints, I am now going toe-to-toe with hinge joints in 2D physics. Though the answer to the previous question was excellent, I have come across a few problems ...
3
votes
1answer
1k 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 ...
3
votes
3answers
1k views

Equation to make small number big and big number small (gravity)

I have a sprite that I want to speed up as it gets closer to another object. I really want this to flow well and don't want a series of if statements. All I can think of is to take the distance and ...
4
votes
1answer
941 views

How to make a 2D Soft-body physics engine?

The definition of rigid body in Box2d is A chunk of matter that is so strong that the distance between any two bits of matter on the chunk is completely constant. And this is exactly what ...
2
votes
1answer
457 views

Shapes and sprites in SVGs

I understand SGV images are used in 2D games to store shape data for the physics engine of the game. I'm unsure though, should the raster sprite also be stored in the SVG or should it be separate? ...
2
votes
2answers
464 views

Physics in a 2D oblique perspective game

So, just to clarify, because I'm still fuzzy on the terms for perspectives in older games myself, examples of an oblique perspective can be seen in many older RPGs (Earthbound, Final Fantasy, Secret ...
-1
votes
1answer
658 views

Best Android gaming engine for Billiards game? [closed]

What is the best engine/way to go with when implementing a 2D billiards game? I am thinking about Emini Physics Engine, which is free for use and stuff, but maybe you can give me some pitfalls about ...
5
votes
1answer
1k views

Creating similar effects of Geometry Wars in 2D only

I want to create a game with similar effects to that of "Geometry Wars"... for those who have never played the game, basically, massive amounts of 'bending' and 'warping' effects are done on the ...
12
votes
3answers
3k views

2D game collision response: SAT & minimum displacement along a given axis?

I'm trying to implement a collision system in a 2D game I'm making. The separating axis theorem (as described by metanet's collision tutorial) seems like an efficient and robust way of handling ...
8
votes
3answers
922 views

Tiling Physics using Farseer

I'm having a problem with the Farseer Physics Engine, where in a tiled environment, my object will at times interact with corners of others objects, even if they align perfectly. I've read about ...
11
votes
4answers
652 views

How to get object to lose less velocity as its speed increases

I'm developing a game in Flash and I need a little help. It can be considered a math problem. My object is flying with speed X and my object can collide with stones. When it collides with a stone, I ...
1
vote
1answer
2k views

How can I cancel a contact in a b2ContactListener?

To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin ...
1
vote
1answer
1k views

Bodies are colliding but refusing to rotate in Box2D

I'm running box2d in C++ and hooking it up to C# via p/invoke. All physics stuff occurs in C++. My problem is that bodes know when they are colliding and do so with great precision. However if I have ...
4
votes
3answers
566 views

2D physics library that supports curved surfaces and inverse or boolean shapes?

I've been using box2D for a few months, but I now badly need a physics library which can use boolean shapes (ie; cutting a circle out of a square) and/or curved surfaces. Does anyone have any ...
2
votes
1answer
571 views

Need help with collision detection/resolution in a 2D simulation of 'worm-like' creatures

(originally posted this on regular stack overflow, somebody pointed this forum out :-) ) Hi there, I'm implementing a physics engine for the simulation of worm-like creatures. Problem is, is that ...
1
vote
1answer
2k views

2D Physics Engine for Platform Games - Riding on a Platform

I have a number of questions relating to using a 2D physics engine in a platform game, but one main one that I'm grappling with at the moment. I managed to somewhat integrate the Physics2D.Net engine ...
1
vote
1answer
873 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 ...