Jump to content

  • Log In with Google      Sign In   
  • Create Account


Calculate spaceship's movement


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 PhilObyte   Members   -  Reputation: 292

Like
0Likes
Like

Posted 04 April 2013 - 03:23 PM

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.



Sponsor:

#2 rip-off   Moderators   -  Reputation: 7723

Like
1Likes
Like

Posted 04 April 2013 - 03:25 PM

Have you considered using a physics library?



#3 PhilObyte   Members   -  Reputation: 292

Like
0Likes
Like

Posted 04 April 2013 - 03:30 PM

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.



#4 Bacterius   Crossbones+   -  Reputation: 8190

Like
0Likes
Like

Posted 04 April 2013 - 05:28 PM

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.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#5 PhilObyte   Members   -  Reputation: 292

Like
0Likes
Like

Posted 05 April 2013 - 05:20 AM

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.



#6 landagen   Members   -  Reputation: 376

Like
2Likes
Like

Posted 05 April 2013 - 08:50 AM

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. 





#7 PhilObyte   Members   -  Reputation: 292

Like
0Likes
Like

Posted 05 April 2013 - 11:36 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS