Sign in to follow this  

Calculate spaceship's movement

This topic is 1718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This topic is 1718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this