Jump to content
  • Advertisement
Sign in to follow this  
ThisIsPathetic

Implementation of the "Magnus Effect" on a 2D Pong Style game...

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

Hey everyone, I'm not a big forum user, but from looking around this site it seems like its a great place to finally get my feet wet!

I'm working on a basic pong game, which was pretty simple to accomplish... but now I'm looking to up the physics of the game, and make it really unique!

Instead of the basic 'bounce' of the ball and paddle, I have recently been playing around with applying the paddle's velocity to the direction that the ball travels... I came up with some simple dynamics, and put it in my game, and it seemed to look pretty good smile.png

zXFzz.png
Although, I think my 'physics' of the situation may be a little off... I based my code off of this drawing, and tweaked it along the way.

Anyways, I started to think about it some more, and came up with the idea that the ball should technically have rotation... and then I drew up another sketch on how it should rotate (I'm a visual kind of guy), and then implemented it into my code.

vFod5.png

The first implementation, of using the paddle velocity to affect the ball's direction was pretty straight forward, and I got it to look somewhat correct in the end. But when I went to implement the ball's curve... that's where things got a little tricky...


if anyone would like to see an example of whats going on in my code, I would be more than happy to explain it, but I rather not flood my first post with a bunch of content that may turn people off of the main question here...

While I was looking into the 'curve'/rotation of the ball, I know that the paddle's velocity does effect the outcome, and then I read a post about the 'Magnus Effect' and decided that that is DEFINITELY the route I Want to go. (it was actually on there forums too: http://www.gamedev.n...-off-a-wall-2d/)

But with that post almost 5 years outdated... I searched some more online on my own, but really just need someone to help me break it down so I can understand it all.

I appreciate all the help I can get, and I appreciate communities like this one, I think its a GREAT place to learn... I look forward to getting into some good conversations with some of you!

BTW - I'm using XNA 4.0, as well as the Farseer Engine, or, more commonly known as Box2D :D

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!