Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Control question?

This topic is 5879 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

Does anyone know the algorithms I should use to go about creating something like your ship in Asteroids? Where your ship slows down gradually and turns affect the way you are moving, etc? Thanks.

Share this post

Link to post
Share on other sites

Yeah jwalker is correct. It isn''t so much a game programming issue as a physics one. Just have a look at inertia and projectile movement on the net....but as a rundown...

Newton had a couple of sayings (laws). An object in motion tends to stay in motion and an object at rest tends to stay at rest....what does this mean for your little ship??

If you have him cruising along to the right he will do so until you fire your little engines. When this happens he will continue at the same speed right depending on the way you are facing when you fire your rockets he will be going slightly faster, slower or start accelerating in a different direction (as well as continuing to the right)

For example if you are heading right at say 10m/s and your little ship is pointing directly up and you fire your rockets then he will still be giong right at 10m/s but also up at 1m/s.

This is all very basic physics and if you pick up any good physics book or have a search on the net there will probably be a better explanation than mine.

I hope this helps.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!