Your program crashes sometimes. That's because the "living" ArrayList is being accessed from 2 different threads at the same time. A simple fix for this is to replace all occurences of this line in MoveEngine.java
for (int i = 0; i < Main.living.size(); i++) {
with
int size = Main.living.size();
for (int i = 0; i < size; i++) {
But that's not a very nice solution. Why did you use different threads in the first place? That's not necessary.
Could you link me to a tutorial on how to make the equations for changing the x and y value of the ball? I'm trying to make a simple 1-ball gravity simulator but I don't know how to write the correct equations or how to do the collision detection.
@Hectorfloresish Check out the project's homepage on sourceforge, and scroll down to the "Resolving collisions" section. The link is in the video description!
This has been flagged as spam show
1.bp.blogspot.com/-pg8DiAXpl3k/TvdzrHuOpqI/AAAAAAAAAB0/8IsqWdvB_uc/s1600/1342390.jpg
A video clip of the very influential American preacher Yusuf Estes
youtube.com/v/5J-9dn3_hpY&rel=0&autoplay=0&color1=bdbdbd&color2=bdbdbd&border=0
ahmd1431 1 month ago
What's up with the creepy ass music щ(゚Д゚щ)?
Tiger4meat 2 months ago
Your program crashes sometimes. That's because the "living" ArrayList is being accessed from 2 different threads at the same time. A simple fix for this is to replace all occurences of this line in MoveEngine.java
for (int i = 0; i < Main.living.size(); i++) {
with
int size = Main.living.size();
for (int i = 0; i < size; i++) {
But that's not a very nice solution. Why did you use different threads in the first place? That's not necessary.
insaneAnimeLover 2 months ago
Could you link me to a tutorial on how to make the equations for changing the x and y value of the ball? I'm trying to make a simple 1-ball gravity simulator but I don't know how to write the correct equations or how to do the collision detection.
WhiteShadow1415 3 months ago
i did a similar program but when i put a lot of balls the pressure makes them over lape each other, how did u fix that
Hectorfloresish 1 year ago
@Hectorfloresish Check out the project's homepage on sourceforge, and scroll down to the "Resolving collisions" section. The link is in the video description!
OneRadVideo 1 year ago
Awesome, could you please upload the source somewhere so we can view it?
Ty5479 2 years ago
I think I will put the source up somewhere, but I want to get some other things cleaned up about the code first.
OneRadVideo 2 years ago
Thanks, It will be much appreciated.
Ty5479 2 years ago
@Ty5479 Visit my site (see video info) and click "Projects". I've got info and source up.
OneRadVideo 2 years ago