Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

learn more… | top users | synonyms

2
votes
1answer
1k views

2D physics performance on iPhone/Android using Unity 3D?

I've been looking into making 2D games with Unity. One thing which concerns me is the performance of the physics engine. Since Unity is a 3D game engine I'm going to have to assume it uses a 3D ...
18
votes
4answers
4k views

How to deal with corner collisions in 2D?

I'm writing a top down 2d XNA game. Since its my first I'm trying to write the physics and collision stuff myself to learn it. Whenever my player sprite character attempts to move into a position ...
4
votes
1answer
1k 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
2answers
558 views

Variable physics step, bad idea?

Currently, when I update the entities I calculate the time passed since the last update, and then pass that to their update function. They will in turn pass that duration to all their components. ...
5
votes
2answers
1k views

Calculating the angular direction from velocity

I'm trying to calculate the angular direction of a projectile, knowing it's X and Y velocity I can find the magnitude of its movement, but I'm having a hard time wrapping my mind around getting the ...
2
votes
2answers
485 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 ...
0
votes
1answer
180 views

Is it possible (from the vertex shader) to always draw at specific pixels?

I am wondering if I can (if possible) make a vertex shader that will always make the pixel shader draw everything in 1 pixel, at position 0,0. I know this sounds crazy, but it's needed in the ...
1
vote
4answers
2k views

Solving for velocity in the x/y/z axes?

In a 3D environment I have an object with a displacement x that I know I need to traverse in a given time interval. I have the object's heading and elevation and I want to figure out the distance the ...
12
votes
3answers
4k 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
1answer
647 views

Projected trajectory of a vehicle?

In the game I am developing, I have to calculate if my vehicle (1) which in the example is travelling north with a speed V, can reach its target (2). The example depict the problem from atop: There ...
3
votes
1answer
165 views

How to get the physics just right in a physics driven game

I'm working on a physics driven game using a java port of Bullet (JBullet). In our game we have a ball that can have collisions with the other objects, including the objects that define the ...
10
votes
3answers
792 views

Random map generation - strategies for scattering/clustering random nodes

I am doing a simple 4X strategy game in space where each node is a point-of-interest (a planet, an asteroid and etc.). To randomly generate a map, I would follow the steps below Decide how many ...
8
votes
1answer
772 views

OpenGL vs physics?

I am very new to game programming and I am in my first project. I have come to a point that I need expert advice: Now for the game physics to be able to work on objects, it needs to know each ...
6
votes
2answers
453 views

Is it possible to have concurrent collision detection where every entity acts at exactly the same time?

There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity. If we make a triangle a,b and c. We have 2 entities at a and b ...
15
votes
3answers
6k views

What is a good book on physics for game development?

I'm looking for a good beginners' book on the subject of physics in game development. Something that focuses on 2D games would be preferable.
11
votes
4answers
663 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 ...
4
votes
3answers
686 views

Designing the main classes in a solar system simulation game in C++

If this is not the right place for this question, could you please direct me to a more suitable site/forum? I'm a beginner in game development (and in the use of this site). I've worked with C++ only ...
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 ...
5
votes
3answers
2k views

2D Platformer Collision/Physics Problems

I'm making a 2D platformer similar to Terraria, although I'm having some problems with some collision detection code. I'm using the code from the AppHub Platformer sample, but tweaked so it fits with ...
1
vote
1answer
592 views

Dynamic bodies with Parallax Scrolling

I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. ...
1
vote
1answer
832 views

Can you help with collision detection and response in a 3D car racing game?

I am trying to implement the collision detection and response in 3D car racing game. I have a car model, for collision I am assuming my car as a cuboid. my collision detection with walls is quite ...
18
votes
5answers
16k views

How can I implement gravity?

How can I implement gravity? Not for a particular language, just pseudocode...
1
vote
1answer
397 views

Perlin noise example the same on CPU as GPU?

I am looking for an example site with a Perlin Noise implementation in both CPU and GPU, that generates somewhat the same results in those two places. I see many CPU implementations of Perlin Noise, ...
28
votes
2answers
2k views

How'd they do it: Destructible environments in BF:BC2 and BF3

How did the folks at Dice create the destructible environments in the more recent Battlefield games? Did they just assemble the buildings out of predefined sub-regions that break apart when there is ...
22
votes
4answers
2k views

Momentum and order of update problems in my physics engine

This question is a "follow-up" question from my previous one, regarding collision detection and resolution, which you can find here. If you don't want to read the previous question, here's a ...
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
180 views

Implementing material deformation

I want to implement deformation of plastic material, like plasticine for example. Where should I start to study? What technique should I use? Thank you for any advice. EDIT I want to use it in ...
8
votes
1answer
4k views

How to handle physics of moving platforms in a platformer?

So after a few hours of searching on the internet, I have yet to find a pleasing answer on how to handle moving platforms in a 2d platform game. So I decided to make a simple prototype where you ...
9
votes
4answers
5k views

2D Spatial partitioning alternatives to spatial hashes and quadtrees

I've been trying to implement a spatial partitioning algorithm in my game, but both spatial hashes and quadtrees aren't what I'm looking for. My level size is not supposed to have a limit (only Int32 ...
12
votes
3answers
2k views

Where to start for implementing vehicle physics? [closed]

A little background for myself. I am relatively experienced with 3rd part physics engines such as Havok, Box2D, Bullet and have successfully integrated them in custom engine(s). I have also made a ...
-3
votes
1answer
389 views

Options available to a programmer on the Main Game Loop [closed]

Could someone please give me some insight into each one of the four topics listed below. I have a good idea about what passive and active rendering are, and that the use of active rendering is more ...
9
votes
3answers
2k views

How to calculate falling and accelerating velocity?

I'm thinking of making a lander game, where you control a spaceship and need to land it without crashing. What is a simple formula to calculate speed of falling or acceleration with relation to ...
10
votes
1answer
781 views

Are there well-known algorithms for fitting a polygon to an arbitrary shape?

I'm using the Chipmunk physics engine to make the levels for a 2D C game. I'd like to be able to fit a polygon to an arbitrary shape to serve as the collision mask. Given a black and white collision ...
11
votes
2answers
931 views

Resources of realistic water simulation?

I want to study water simulation, with a a demo with source code which using physically-based methods(Eulerian approaches or Lagrangian approaches). How can I get some examples?
47
votes
7answers
5k views

2D Platformer AABB collision problems

I have a problem with AABB collision resolution. I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png ...
11
votes
5answers
1k views

How could you parallelise a 2D boids simulation

How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu). In the above example, the non-coloured particles move around ...
5
votes
3answers
572 views

3D game on a planet

Would it be much more work to create a 3D game on a planet rather than on a flat plane? What engines would support this and what techniques would I use? An example would be a small sphere the player ...
-4
votes
3answers
812 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: ...
6
votes
2answers
3k 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 ...
33
votes
4answers
2k views

Movement prediction for non-shooters

I'm working on an isometric 2D game with moderate-scale multiplayer, approximately 20-30 players connected at once to a persistent server. I've had some difficulty getting a good movement prediction ...
3
votes
2answers
2k views

3D Ball Physics Theory: collision response on ground and against walls?

I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept. Think Monkey Ball as an example of the type ...
4
votes
1answer
563 views

Problem with impulses in my physics engine

I'm currently developing a small 3D impulse-based physic engine for a CS project. It uses GJK for collision detection and is kind of stable at the moment. Nevertheless, I'm not satisfied with my ...
4
votes
1answer
592 views

Tried and true basic movement physics (jumping, not walking through stuff)?

If I sat down long enough, I'm sure I could make this happen, but I don't want to reinvent the wheel if I don't have to, especially if XNA has patterns in place for doing this. For now, I'm working ...
17
votes
2answers
3k views

How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
7
votes
1answer
800 views

Bringing a Box2D, Physics Enabled game Online?

Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea? Now if only sending ...
8
votes
5answers
4k views

How do I detect the direction of 2D rectangular object collisions?

After this question, I need some more help. How can I find out which side of a rectangle a collision came from and react accordingly? The blue arrows are the paths that some circular objects ...
10
votes
1answer
3k views

Angle of Reflection

I have this "Breakeout style" game. I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like: I've managed to get the collision per ...
0
votes
1answer
404 views

What maths should I learn for game programming, and what aspect of programming does it relate to? [duplicate]

Possible Duplicate: What math should all game programmers know? Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in ...
16
votes
1answer
686 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 ...
1
vote
1answer
2k 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 ...