-
Physics - Falling blocks
Hi everyone :D
I'm making a application where I have several blocks. The block falls due gravity and when it collides with other block or obstacle, it stops. I not can make the condition of collision between two blocks... Does anyone a suggestion to make this?
Ah, I can't use extensions.
Sorry for my English...
-
The Advanced Gameboard Extension?
Marv
-
Hi Marv,
Is a great solution. I had not thought about it :D But, without extensions, there other way?
-
You could attach small invisible detectors. When one of the detectors overlap another block, stop the movement. This was the method I used for the dropping ions game at the URL below.
http://www.darngoodsolutions.com/mms/chemmodules.htm
Steve
-
This can be done with detectors like drnebula suggested. I personally like to avoid detectors if possible however since it adds unnecessary objects that might slow down your game. I tried to figure out a solution to this problem that didn't use detectors or extensions but ran into trouble. I'm also interested in seeing a solution.
-
The built in 'collision' and 'overlap' condition does not work exactly how you would expect them to, and might easily produce unwanted results.
I would suggest creating a manual collision detection condition by compairing to the two objects 'edge possitions'.
If you do this collisions will work as expected, but as a side effect you will in sertain situations need to handle each instance of a colliding object individually, by using a FastLoop or the ForEach object
-
I was playing with the pinball movement, it seems, without extensions you can 'fake' bounce or collide blocks with other blocks and or backgrounds, get them to bounce or rotate upon collision, gain some Y altitude and speed and then loose the altitude speed over time...you could create your own movement or just programatically change the pinball movement to work for ya... You can stop the movement when the speed gets slow enough or when the object gets close to the bottom or wherever you want it to stop. Try messing with pinball movement at very low gravity and speed and mess with deceleration. I think you could program a angry bird block falling physics by varying the pinball movement of objects as they collide.
-
I think he is saying that IS his problem they are stopping, I think he wants them to interact in a 'real' way, bounce then stop and settle if gravity permits, but perhaps I misunderstand (it happens all the time)
-
Hi all,
Collision between block and block don't work because if I have a "queue" with three blocks and the first block (the next to floor) is destroyed, the second block don't fall, 'cause it is colliding with the third block. Netflyer165, I tried make what you suggest, but don't work here :/
-
Hello, is this something similar to what you're looking for? View MFA
Use the mouse to remove blocks. Press Space to create more.
-
Very nice solution. Simple and straightforward. I'm pretty sure that's what ls2 was looking for.
-
Hi Ls2... can you say what are trying to do exactly? It sounds like you have a stack of 3 blocks, you want to knock the bottom block out and have the other two fall, is that correct? If you tell everyone what you are trying to do they will have a better idea and probably think of a better way to do it :-)
-
Oasuke that's a great example! Thanks for that! Has to be what he wants! :-)
-
That's nice oasuke. Thanks.
Marv
-
Thanks oasuke, this is exactly what I want! Thanks so much!
Hi Netflyer165. Correct, that's what I was looking for :D
-
Great example. I'd love to see an example like this but with rocks that roll off each other (like in the old boulderdash games). I've tried but never with any real success.
If anyone has an example - please post.
-
Excellent example,..thank you!