Stack3r

Here’s a video of a physics game I’m prototyping with Codea at the moment. It’s similar to a minigame from Wario Ware Smooth Moves, adapted for iPad.

http://www.youtube.com/watch?v=qLfCNs3m2N4

Wow - nice! Me want.

This is brilliant.

Also @John found a way to do soft shadows. He renders a version of the shape into a small image using setContext, applies some blur, then upscales it using smooth(). Works really well.

Cool game, and neat graphics. It’s like tetris with physics

That Looks really nice, how exactly does John apply the blur?

@Inviso I’ll post the code later today. Its a bit specific to the game so I’ll make it a bit more generic.

I’m guessing this is how he did it:
http://twolivesleft.com/Codea/Talk/discussion/955/adding-a-shadow-or-glow%3A-do-i-have-the-right-concepts#Item_1
I never got a confirmation, so IDK.

What ever happened to the code? I’ve been following this awesome idea for ever.

Very nice @john. This will probably be a hit on the appStore.

So, I have an object that is holding up other objects. I need the object on the bottom to move to a point. When I move it in pixel, without physics movement, the objects on top jump because when the bottom object moves up, the top ones are slightly inside it, causing them to jump out of the bottom object really fast. When I have the bottom object accelerate to the point, the bottom object rotates the point like a planet orbiting a sun. You seem to have solved this issue in this application. Can you tip me on how you did it? Thank you.

The trick is to use a kinematic type body and move it by setting linearVelocity and angularVelocity instead of setting the position directly. This allows it to interact with objects without causing instability. It does mean you have to take care with how you control your kinematic body since you can’t set the position directly.

Thank you. I will check it out.

how can i get the code?

Haha, that’s nice :wink:
Are you generating the shapes and give them a graphic or are you drawing the lines with those shadows?

I see you are using particles when the shape detect a collision, I made that too, your idea from the SlammerPod class! ,thanks!

I draw the shapes to an image at a smaller scale and then blur the result to give a shadow image.

Did you see my article I posted above? I believe that’s similar to how he did it, looking at his description.
It’s cool looking, BTW.