r/howdidtheycodeit • u/shrimpflyrice • Jan 04 '22
Question How did they code the basketball physics in Double Dribble?
Double Dribble for the NES is entirely 2D but the basketball is able to bounce off the rim and the ground as if it were in 3D space as seen in this video at the 2:55 mark.
https://youtu.be/gw7poSD0adg?t=172
After the missed dunk you can see the ball bounce off the backboard and a few more times on the court. Were 2D physics involved?
25
Upvotes
2
u/Asl687 Feb 12 '22
I wrote the 2 game gear versions of nba jam , slightly more powerful cpu but no physics . Just simple collisions and altering velocity’s. I would expect they did the same.
21
u/[deleted] Jan 04 '22
This doesn't appear to be using physics like you would think of physics today. Today's systems are more focused on realistic gravity and explosion forces and such like that, which this isn't attempting. Note how when the balls are tossed it isn't realistic at all, it's more like an animated value.
Anyways, for such a small game and such a constrained play space and actor objects, they certainly could have used 3d coordinates for their game, but only rendering to 2d.
Most of these super old games generally have super integrated systems that are highly customized to do the one thing it's programmed to do. It's hard to speculate what exactly they did. It could have no form of physics or collision detection at all, and just have a random chance of the ball going into the hoop, with that chance increasing the closer you are to the hoop.
2
u/Glum-Communication68 Jan 05 '22
there are no physics