Games It's not Box2D but...

wonder

Expert
Licensed User
Longtime User
its-something.jpg


One gazillion bugs in this demo, lots of trial and error, work-in-progress...

Draw lines with left click, drop balls with right click.
 

Attachments

  • something.jar
    320.8 KB · Views: 444
  • something 2.jar
    320.9 KB · Views: 417
  • almost working right - no bounce.jar
    326.7 KB · Views: 401
  • almost working right - BUGGY bounce.jar
    326.7 KB · Views: 425
  • itWorks!.jar
    321.7 KB · Views: 406
Last edited:

ilan

Expert
Licensed User
Longtime User
just tried it but no balls are falling when i click on right mouse button. o_O

ok downloaded again and it works. can you make the ball keep rolling after it stopped bouncing?
 
Last edited:

ilan

Expert
Licensed User
Longtime User
Are you on a Mac? :D

ok i found the first bug. and that is also the reason why it didnot worked at first time.
when you load your app and click on the left mouse first (just a click) the right mouse will not create any balls anymore.
only if you draw a line or click right mouse button at app start it will work until you perform a click only on the left mouse button!

so a click on the left button (without drawing a line) will create this bug!
 

wonder

Expert
Licensed User
Longtime User
can you make the ball keep rolling after it stopped bouncing?
I wish I knew how... It's killing me... Argggghhh!!!!
I *effing* love/hate physics!!!! :mad:

I will find out, eventually, so no worries... :cool:
 

Jaames

Active Member
Licensed User
Longtime User
@wonder , you really make progress over time, I'm following you since you appeared here, and you have very clean and nice coding style, so, keep it up! :)
btw, this example works great on very slow pc, if that helps at all...
 

wonder

Expert
Licensed User
Longtime User
you really make progress over time, I'm following you since you appeared here, and you have very clean and nice coding style, so, keep it up!
Thank you so much!! :) That's really motivating!!! Very kind of you!

Regarding this physics project, I'll be doing some pen and paper investigation while watching youtube physics lessons.... So, wish me luck! :)
 
Last edited:

Jaames

Active Member
Licensed User
Longtime User
I'll be doing some pen and paper investigation, with some youtube physics lessons.... So, wish me luck! :)
Sounds great, the Box2d is cool, but why not explore, there is great world of physics out there..
 

wonder

Expert
Licensed User
Longtime User
Sounds great, the Box2d is cool, but why not explore, there is great world of physics out there..
True! If Box2D is Newton, then I want to be Einstein and write my own physics! Hahahah! :D
 

wonder

Expert
Licensed User
Longtime User
Alright, here's another version (also added to the first post). Still not exactly what I'm looking for.

@ilan, the bug is still there, I was too lazy to fix it.
 

Attachments

  • something 2.jar
    320.9 KB · Views: 378

wonder

Expert
Licensed User
Longtime User
I know, I know... I think I got the right formula, only the values are wrong... Don't give up, Bruno, don't give up...

By the way, the balls do not roll, they slide... there is no concept of "rolling" in my program. ;) :D Nonetheless, sliding (zero friction) or rolling is the same thing! Think roller blades vs ice skating.
 

inakigarm

Well-Known Member
Licensed User
Longtime User
It is not good to give bad news, but ...
the previous version was better.
In previous version, if you had two lines joined with different slopes like image attached, the ball (starting on first line) braked down when arrived at second line

upload_2016-11-30_11-53-15.png
 
Last edited:

Zakerg

Member
Licensed User
Longtime User
Very creative. Tried all your examples they all seemed to work as you described them. I did get one unexpected result. When I drew two lines to form a peak like upside down "V", the balls would bounce to the right or left except when I hit the exact point of the peak. That ball passed through the peak like it was not there. If one of the lines slightly overlaps this does not happen.
 

Cableguy

Expert
Licensed User
Longtime User
very nice!!!!

One thing, nobody stated, but I'm sure everyone has noticed, even you, Bruno, New Balls do not take into account previous existing balls, so if we set the lines to create a funnel or V, the balls do not stack up
 

wonder

Expert
Licensed User
Longtime User
I did get one unexpected result.
The collision detection is still quite rudimentary... I'll be working on it.

Balls do not take into account previous existing balls
True, the aim of this simulation is solving the ball/plane interaction. Nothing more for now.

UPDATE: Alright, I think I got the collision solving figured out!!! See "itWorks.jar" on the first post. :D :D :D
 
Top