![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Try out my jelly program! |
Hard Rock
Member #1,547
September 2001
![]() |
Hey, That was really cool. Good Work. _________________________________________________ |
X-G
Member #856
December 2000
![]() |
Have a look at Triptych by Chronic Logic. It has an effect similar to your jelly, excepting of course that the blocks never deform like your jelly does. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Dude? Pontifex2? Then the heck did that happen? I still have 1, and the original Bridge Builder (that was cool, the train logic was messed, but very fun -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Just tried the "jelly"; quite interesting -- |
james_lohr
Member #1,947
February 2002
|
Quote: What about just preventing any segments from passing through their neighbours, instead transferring any excess momentum to them? The momentum should propagate through the segments and eventually come out on the other end of the jelly, I tried EXACTLY that!! but it didn't work for some reason although I can see no reason as to why it shouldn't work - I was problably just making a stupid mistake somewhere. As I say I'm looking forward to getting my exams finished so that I can spend more time messing with the jelly (far more fun than revising circular motion,SHM and centres of mass of composite bodies...) I'm sure I'll be able to resolve the problem then. 3D jelly's going to look cool! Oh: Quote: Indents are our friends
Sorry sorry sorry! Ha ha - I bet if you looked at the source code for my "Slugs" game you would vomit! and not just because of the lack of indents, even I don't know what half my code is doing...
|
Trezker
Member #1,739
December 2001
![]() |
Heh, I converted your code to my system before I even tried to read it. Saturday, I wrote my own jelly in c++, from scratch. It works well but is pretty weak. I have skipped the diagonal joints, I thinks they are the cause of it's instability. But without them the jelly crumbels to easy. I wonder how to make that "transer force" algo should look, I tried to solve it but couldn't hack it. I also had the idea that a joint should consist of three points and it should struggle to keep the angle between the two resulting lines. |
X-G
Member #856
December 2000
![]() |
Something like this, maybe? if segment_is_too_close_to_neighbour apply_force(neighbour, me.force) me.force = 0 endif
... iterate through each point. Somewhere, segment_is_too_close_to_neighbour will be false - at extreme the end of the jelly. -- |
james_lohr
Member #1,947
February 2002
|
X-G: Trezker: -First points need to be grouped into 3 (each point can be in more than one group). Note that for this method diagonals are a good idea because groups are more easily formed. Now the point of these groups is to make sure that the triangle that the three points form does not become inverted. If it does, one of the points has moved to where it doesn't belong. Now to check if a triangle has become inverted you need to use something like this: float a,b,c,d; a=x1-x2; b=y1-y2; c=x3-x2; d=y3-y2; if((a*d)-(b*c))<0)triangle_inverted(); where x1,y1,x2,y2 .... are the coordinates of the three points in the group of three. To see which point is actually causing the triangle to become inverted you will have to increment only its coordinates (ie in my source do: pnt[n].x+=pnt[n].xx,pnt[n].y+=pnt[n].yy for only the point n if you are checking the point n) and then do the above check. What you actually do when you find a point trying to move into a segment it shouldn't be in I am not exactly sure. You could try something like this: Where N is the total number of points. This would distribute its "momentum" or impulse or what ever xx/yy is (I really wish I knew..) to all the jelly. Or maybe try just giving it to points near by or something. Anyway I could not get this to work but I am reasonably confident that it can work.
|
X-G
Member #856
December 2000
![]() |
As a side note: Momentum p = m * v. -- |
Trezker
Member #1,739
December 2001
![]() |
Seems like there's a group of jelly-programmers here. Maybe we should start a club... |
james_lohr
Member #1,947
February 2002
|
Now that's a good idea! We could have a race to see who's the first to make successful 3D jelly.
|
X-G
Member #856
December 2000
![]() |
And then call it JellyHack? -- |
Trezker
Member #1,739
December 2001
![]() |
An asteroids clone would be nice, plitting jellys in a glass of water... The ideas just keep coming, jellys can be used in many ways. |
guilt
Member #2,553
July 2002
![]() |
Pretty Nice Karthik Kumar Viswanathan |
|
1
2
|