1
vote
1answer
28 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 youve ever ...
2
votes
1answer
99 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 ...
0
votes
1answer
92 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 ...
0
votes
2answers
163 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 ...
4
votes
1answer
438 views

Algorithm for randomly generating reachable platforms

I want to randomly generate reachable platforms on the fly for a 2D game. Right now, I am just creating platforms at random x,y positions. Only 4 platforms can exist at once, so once the 5th one is ...
2
votes
0answers
52 views

How should I model rotation caused by bounce friction? [duplicate]

In my Java2D simulation, I have a disc which, when it bounces off the boundary of a 2D region, begins to rotate, as if it had gotten some spin from the wall. I'm having trouble relating the ...
0
votes
0answers
462 views

Slope polygon collider 2D causing box collider 2D to 'bump' while sliding on it

I'm doing procedural terrain generation. So far I've created the mesh, and attached a 2D polygon collider to it. The terrain is made up of hills going up and down. After doing so, I put a 2D rigid ...
2
votes
3answers
284 views

How should I implement basic spaceship physics?

I am new to 2D game development. I've made several games, but they've made almost no use of physics. Now I want to try making a game that uses some basic physics to look more realistic. The game ...
1
vote
3answers
404 views

Calculating 2D Physics Prediction of Shot Angle with Moving Velocity of both targets

I currently have the math right to hit a moving target with 99% accuracy as long as I don't move. When I start moving the aim is nearly 80%, it should also be 99% accuracy because the target is moving ...
1
vote
1answer
164 views

AABB vs Rectangle

I'm trying to wrap my head around 2D physics and stumbled upon Axis Aligned Bounding Boxes, and I have a couple of questions regarding them. In all AABB structs I could find out there, people prefer ...
0
votes
2answers
106 views

very simple math destination and speed calculation

My player goes to (destinationX, destinationY) His position is: (x,y) and the player has an update event function update() { this.x = this.x + dx; this.y = this.y + dy; } what is the formula ...
1
vote
3answers
345 views

Bouncing ball isssue

I am currently working on the 2D Bouncing ball physics that bounces the ball up and down. The physics behaviour works fine but at the end the velocity keep +3 then 0 non-stop even the ball has stopped ...
3
votes
1answer
373 views

How to implement throw curve with virtual height in a 2D side-view game

I am working on a 2d side-view soccer game that looks like this image: But now I stuck on how to implement parabola pass ball. I have found many questions corresponding to my problem: Calculating ...
0
votes
1answer
145 views

Formula throwing a ball to destination [duplicate]

I am throwing a ball using this: double v, vx, vy, alpha, t2 = 0; if (Keyboard.GetState().IsKeyDown(Keys.Up)) { alpha = MathHelper.ToRadians(60f); v = ...
0
votes
3answers
369 views

how can we define dynamic Path of ViewObject(Bitmap) On Canvas

I am Currently working on One 2D Android Game, In this game One ViewObject(Bitmap) is moving Across Screen On Parabola Path Like in this Image, But this Path is Static, the Static path is getting ...
0
votes
1answer
138 views

Collision and gravity problems

So this is an easy question. I need to implement gravity in my game but where I'm stuck is what variables do I need in my Entity object for the calculations and a good algorithm that I can use for ...
1
vote
1answer
314 views

Swarm/crowd movement with box2d?

Apart from using b2Body::setTransform(), are there other ways to move a body around while keeping its dynamics ? I want to move several bodies at the same time into one direction, pretty much like ...
3
votes
1answer
346 views

Realistic 2D Planetary Physics Engine?

I'm doing a spaceflight simulator in C++ (using Allegro 5), and I realised that I could just use a physics engine instead of writing my own physics. So that's what I'm doing. Since this is going to ...
0
votes
2answers
287 views

Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA

Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code iceBoy.moveY++; iceBoy.position.Y += moveY; Now heres the ...
1
vote
1answer
385 views

In 2d game logic, should I use pixels or world coordinates?

Currently in my game I handle the logic (collisions, movement) using pixels but I find it very limiting espiecially when thinking about variable speed. For example Box2D requires you to use ...
1
vote
2answers
189 views

Collision detection for Monotouch [closed]

What I want to have for my Monotouch 2D projects: simple collision detection and collision polygons working with UIViews Sounds simple, isn't it? I've evaluated a lot of engines available on the ...
5
votes
2answers
481 views

Ball bouncing infinitely and constantly

Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm: ...
0
votes
1answer
138 views

Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
-3
votes
1answer
261 views

Implementation of planets in top-down space shooter [closed]

I am working on a top-down space shooter, and I have come to the point where I need some input on a mechanic. I have implemented enough that I can make this choice; either way will not change the code ...
5
votes
1answer
193 views

Physics/Logic behind self-bounce

I have a game that I am currently working on and I have a problem. What would a ball look like when it makes itself bounce. Say, for example that the ball had its own "inner power", was made out of ...
5
votes
3answers
584 views

'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
3
votes
3answers
779 views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
6
votes
3answers
607 views

How do I make a moving object stop smoothly at the end of a path?

There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand. So I'm creating a floating platform that I would like to be able ...
4
votes
2answers
364 views

Detecting a ledge in Box2D [duplicate]

Possible Duplicate: Detect Open Space in Farseer How do I detect ledges? I'm making a 2D platformer with Box2D. The player needs to be able to grab onto a ledge and pull him/herself up. ...
2
votes
2answers
416 views

One-way platform collision

I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
4
votes
1answer
1k views

Friction in 2D game

I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
5
votes
1answer
399 views

2D Magnet-like repelling behavior

If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...
1
vote
1answer
315 views

Ideas for 2d fire simulation [closed]

I want to simulate a fire in a flat and non flat* surface (fire spread modelling). I've seen that cellular automata is one of the algorithms that can be used. Are there other algorithms that would be ...
1
vote
2answers
132 views

How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
2
votes
1answer
407 views

android game-logic for shooter

Im creating a 2d game for android. I'll just get right to it. I have a sprite controlled by a joystick that needs to shoot, sofar Ive managed to get direction and movement on my bullet, but then I ...
8
votes
1answer
1k views

What is the difference between an impulse and a force related to a physics engine?

What is the difference between an application of an impulse and an application of a force in relation to a physics engine?
10
votes
3answers
428 views

How to simulate pressure with particles?

I'm trying to simulate pressure with a collection of spherical particles in a Unity game I'm building. A couple notes about the problem: The goal is to fill a constantly changing 2d space/void with ...
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 ...
4
votes
2answers
376 views

Which techniques to study? [closed]

Just to give you some background info, I'm studying a programming major at a tertiary level and am in my third year, so I'm not a newbie off the street. However, I am still quite new to game ...
3
votes
2answers
424 views

Collisions between moving ball and polygons

I know this is a very typical problem and that there area a lot of similar questions, but I have been looking for a while and I have not found anything that fits what I want. I am developing a 2D ...
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
894 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 ...
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
651 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, ...
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
581 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 ...
2
votes
1answer
394 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?
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 ...