Create towers which don't fall easily?

I’m using Corona physics/ 2DBox to stack up crates of 56 * 36 pixels in an iPad game.
My question: How can I create a tower that doesn’t fall over too easily?
I want some monsters to be able to hit the bottom part of a tower to make the whole tower tumble and fall apart into its separate pieces, but right now, the towers are shaking quote a bit by themselves and sometimes fall over without outside force, even though I try to stack them up vertically in a straight line.

Thanks! [import]uid: 10284 topic_id: 3729 reply_id: 303729[/import]

Hmm, looks like attaching a “rope” to a static invisible sky block using a friction joint with high maxForce and maxTorque I’m getting somewhere… is that a proper way to do this? [import]uid: 10284 topic_id: 3729 reply_id: 11341[/import]

Setting high linearDamping and angularDamping seems to work too and might be even easier. [import]uid: 10284 topic_id: 3729 reply_id: 11342[/import]

For what it’s worth, in case anyone stumbles on this thread, I’ve now set every second row in the towers to have zero rotation (sprite.isFixedRotation = true), which also looks OK and kind of makes redundant some of the other approaches (like angularDamping). [import]uid: 10284 topic_id: 3729 reply_id: 13852[/import]

Not having tried it, I’d go with the damped values because the isFixedRotation=true would stop them from rotating at all, unless they are connected to a joint at which point isFixedRotation has no effect (and I still don’t know why.)

Let us know how you get on - I’m looking to do something like that soon, too.

Have you checked out the Ghosts Vs Monsters sample app that Beebe Games built to show us how to do games like Angry Birds (see blog posts.) ?

m [import]uid: 8271 topic_id: 3729 reply_id: 14106[/import]

Btw, have you tried setting bounce=0 and friction=1 ?

m [import]uid: 8271 topic_id: 3729 reply_id: 14108[/import]

Let us know how you get on - I’m looking to do something like that soon, too.

Well, I had only set every second row to fixed-rotation, so all in all it still looks good.

I have decided to indefinitely postpone this project though. It was a good first learning experience, but I can’t get the speed anywhere near satisfying at the moment. The problem might have been the challenging setup: I built a whole “city” out of blocks, in order for that city to be semi-realistically destroyed (along with fire, smoke, and sparks sprites, a flying helicopter, a swarm of birds, monsters etc. – what really caused the lag were the high amount of building bricks though).

I’ve begun working on my new Corona project now, and instead of hundreds of sprites, it has only a few dozen…

I guess after switching from the PhoneGap framework to Corona, which I did mainly due to speed issues on PhoneGap, I was optimistically thinking “no more speed problems, now I can do everything”, but I guess it ain’t quite like that :slight_smile: I would really love to one day have a kind of hardware (or casual framework) which allowed me to throw in as many sparks, shadows, clouds, birds etc. as I think are visually ideal… [import]uid: 10284 topic_id: 3729 reply_id: 14109[/import]

Yup, thats the thing; we’re still working with an environment which isnt the lowest level - because we can enjoy the benefit of the work of a large team of talented developers to make things easier and faster to build. If youve seen Infinity Blade you’ll see just what amazing stuff can be done if youve got the time, manpower and resources to go that far, but it is quite far.

m

ps sorry for lack of punctuation, im typing with crisps (chips, you you yanks) [import]uid: 8271 topic_id: 3729 reply_id: 14111[/import]