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.
3
votes
4answers
328 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
3answers
387 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 ...
1
vote
1answer
537 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
316 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
5answers
678 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 ...
2
votes
3answers
877 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 ...
15
votes
3answers
795 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 ...
1
vote
1answer
4k 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 ...
15
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 ...
3
votes
2answers
430 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 ...
0
votes
1answer
582 views
Best Android gaming engine for Billiards game?
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 ...
1
vote
1answer
420 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
643 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
770 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 ...
1
vote
1answer
351 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
362 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 ...
4
votes
1answer
871 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 ...
8
votes
3answers
766 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.
You can try it ...
1
vote
1answer
680 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 ...
11
votes
4answers
612 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
1k 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
659 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
498 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 ...
3
votes
2answers
749 views
Why are my objects becoming permanently stuck to walls using Box2D?
I setup a simple simulation environment something like billiards. There are four circle balls (dynamic) and four box walls (static).
Simulation works... except one thing. Sometimes when a ball rest ...
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 ...
2
votes
1answer
428 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 ...
5
votes
3answers
511 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 ...
4
votes
2answers
689 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 ...
3
votes
2answers
966 views
When and how should I apply forces in a Cocos2D + Box2D game?
I have some small circles just rolling across the bottom of the screen in my Cocos2D/Box2D iOS app. The bodies are dynamic... so I make them roll by applying a horizontal force to the center of mass ...
-4
votes
1answer
588 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:
...
5
votes
2answers
2k 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
...
5
votes
4answers
493 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 ...
2
votes
1answer
658 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 ...
2
votes
2answers
618 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 ...
1
vote
4answers
1k 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 ...
7
votes
6answers
360 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
340 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
571 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
539 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 ...
0
votes
1answer
1k views
2D Gravity and jumping
I have a gravity handler that works pretty well:
//If gravity is active:
//Iterate through all subscribers and have them fall
//by the GRAVITY_VALUE modified by the subscribers gravity modifier.
...
2
votes
3answers
1k 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
338 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
233 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
223 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
839 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
291 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 ...
7
votes
1answer
2k 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 ...
5
votes
4answers
926 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 ...
