Calculate spaceship's movement

Started by
5 comments, last by PhilObyte 11 years ago

Hello,

I am currently developing a prototype of a 2d game where the user can built his own spaceships with tiles.

The player also places the jets which give him thrust to move and steer it.

In order to do that, the velocity and rotationVelocity must be calculated.

Unfortunately I do not know very much about physics. How can I do this?

Known properties of a ship:

-Velocity

-center of gravity

-weight

I hope my goal is not too ambitious smile.png Thanks in advance, Phil.

Advertisement

Have you considered using a physics library?

Have you considered using a physics library?

If there is any way to do it without one, I would like to make it by myself since I had to understand the whole library.

Have you considered using a physics library?

If there is any way to do it without one, I would like to make it by myself since I had to understand the whole library.

That's not really a good argument towards not using a library. Now without the library you're going to need to learn mechanical physics and rotational physics. If you're keen to, then sure, it's a good learning experience, but if you just want to finish a game, using a physics library is probably a smart move.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

It would be really nice to learn how this works, if it is not too complicated. I looked for it on the Internet, but no tutorial was suitable to me.

In 2D it may not be as complicated. That does help. I presume you are in space so this will also help. The general steps to solving a physics problem is this:

1. Identify all forces and velocities (in vector form)

2. Determine how to apply those forces to your object

3. Sum the forces up in each direction. Any extra force components on an object get translated into acceleration based on mass.

If you have to deal with impact forces, that can get a little more complicated. You will have to read and learn each of the individual equations you will need yourself because it is too much material to cover in a forum.



In 2D it may not be as complicated. That does help. I presume you are in space so this will also help. The general steps to solving a physics problem is this:

1. Identify all forces and velocities (in vector form)

2. Determine how to apply those forces to your object

3. Sum the forces up in each direction. Any extra force components on an object get translated into acceleration based on mass.

If you have to deal with impact forces, that can get a little more complicated. You will have to read and learn each of the individual equations you will need yourself because it is too much material to cover in a forum.

Thank you very much. I think this will do it for the prototype, without rotational force. I can implement that later.

This topic is closed to new replies.

Advertisement