Author Topic: Possible Ball-Physics tutorial  (Read 8922 times)

0 Members and 1 Guest are viewing this topic.

Ashbad

  • Guest
Possible Ball-Physics tutorial
« on: February 06, 2011, 01:43:10 pm »
Last night, I was able to figure out how to have a 4x4 bouncy ball have ulitmately-accurate collision detection, realistic rolling around, rolling on ANY slope possible, and even how to apply the first two to a 3D environment.  I'm thinking of writing a tutorial about how to do all of this, is anyone interested?

EDIT: Ti-8x platform with Axe 0.4.8

EDIT2: if you are interested, please post so or PM me, I don't wanna make a tutorial that nobody wants :P
« Last Edit: February 06, 2011, 01:44:42 pm by Ashbad »

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #1 on: February 06, 2011, 01:49:04 pm »
I would love a tutorial about this. I did something like this before, but it only had the slope detection, and it used Pxl-Test, i wasn't memory-based collision.
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





Ashbad

  • Guest
Re: Possible Ball-Physics tutorial
« Reply #2 on: February 06, 2011, 01:50:57 pm »
This is somewhat both pixel testing and memory detection, because it's more efficient that way :D

good to see my good colleague Binder the Most Excellent wants it, and since he does I will make :)

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #3 on: February 06, 2011, 01:52:36 pm »
And not for me? I wants! :)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #4 on: February 06, 2011, 01:55:19 pm »
I am exceedingly interested in this :) I tried to make a singularly pixel based method a while ago, but the results were not the best, and quite glitchy.  In the end, I resulted in moving to tile based physics, with pixel test helping

http://ourl.ca/7764

I can't wait to see your tutorial if you want to write one! :D

Ashbad

  • Guest
Re: Possible Ball-Physics tutorial
« Reply #5 on: February 06, 2011, 01:55:34 pm »
lol okay I'll start right now :D

I plan on making 3 installments: each one telling how to do ball physics corresponding to my ball physics engine 1.0, 2.0, and then 3.0 (and maybe tell my theories on what will be in 3.1, like wind, weight, size, and properties of dealing with the ball while it's underwater)

I'll begin installment 1 now

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #6 on: February 06, 2011, 01:58:18 pm »
Ohh. I get a title. :)
But yeah, I think I can see how you might do this. If it is a sloped tile, or one that requires pixel tests, then pixel test. Otherwise just test for "solidness". Hummm...
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





Ashbad

  • Guest
Re: Possible Ball-Physics tutorial
« Reply #7 on: February 06, 2011, 02:01:46 pm »
one way you can test for slopes easily and very fast is by checking only the sides of the ball that can possibly collide with a slope (like a slope on the left of a screen can't be touched by the ball's right side) and then check where you are -- are you inside the possible "touching areas" of the slope?  If so, apply the slope's physics to the ball (it's more complicated than that, but that's it kinda in a nutshell :))

And yes, you get a complementary title Binder :D

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #8 on: February 06, 2011, 02:03:12 pm »
can't wait :D

Ashbad

  • Guest
Re: Possible Ball-Physics tutorial
« Reply #9 on: February 06, 2011, 02:04:35 pm »
can't wait :D

that's quite flattering to hear from omnimaga's physics expert :)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #10 on: February 06, 2011, 02:23:13 pm »
This is going to be very cool.  Will it include example programs? :D

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #11 on: February 06, 2011, 02:24:00 pm »
hah well I've tried this myself and had little success, although that was in the realm of only pixel testing, I moved to memory access like you, but i remained limited.  Either way this is one of the great physics challenges for me!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #12 on: February 06, 2011, 02:24:11 pm »
Last night, I was able to figure out how to have a 4x4 bouncy ball have ulitmately-accurate collision detection, realistic rolling around, rolling on ANY slope possible, and even how to apply the first two to a 3D environment.  I'm thinking of writing a tutorial about how to do all of this, is anyone interested?

EDIT: Ti-8x platform with Axe 0.4.8

EDIT2: if you are interested, please post so or PM me, I don't wanna make a tutorial that nobody wants :P

I want it, then I could change uPongs engine for something  better AGAIN :D

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #13 on: February 06, 2011, 02:26:32 pm »
And someone could make an Axe peggle clone ;)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Possible Ball-Physics tutorial
« Reply #14 on: February 06, 2011, 02:33:17 pm »
And someone could make an Axe peggle clone ;)
Dooo it! O0