boundaries setup

Refer to the screen shot here:
Image and video hosting by TinyPic

I’m trying to set up the boundaries(black lines in the picture) so that the red square can only be played inside the boundaries(black lines).

I have no clue where to start.

Please help me out pro developers!
[import]uid: 131469 topic_id: 23029 reply_id: 323029[/import]

Use lines or images.
You can create a 1x1 pixel image and stretch the width or height to make your lines or just draw them.
Add physics to the lines.
Done.
It’d not work with one big image and trying to put a movable box inside. Best to do multiple. [import]uid: 10389 topic_id: 23029 reply_id: 92053[/import]

Thank you so much for quick reply.

I understand what you are saying here,
but I don’t know HOW to make that happen.

please provide me if you have link to tutorials or examples.

sorry if it is basic stuff.
trying to learn but it’s so hard.
I already smashed the mouse 2 times today…
[import]uid: 131469 topic_id: 23029 reply_id: 92057[/import]

I think the Simple Pool demo code on this site sets up boundaries using physics. You may want to look at that. [import]uid: 10389 topic_id: 23029 reply_id: 92077[/import]

My personal experience with physics walls that thin were not good because anything going at it with a moderate amount of force actually went through the object. What if you pieced together a bunch of rectangles with physics to form the outside walls and medians? [import]uid: 31262 topic_id: 23029 reply_id: 92090[/import]

setting isBullet to true might help fix that? [import]uid: 10389 topic_id: 23029 reply_id: 92091[/import]

I solved the problem using application Lime and Tiled.
You can not also give physics properties to a complex boundaries,
you can build a map so quickly and easily.
Thank you all of you guys. It was all great help.
[import]uid: 131469 topic_id: 23029 reply_id: 92321[/import]

If you are looking to put physics on complex objects I would look into Physics Editor. It’s unbelievably useful and I wish I knew about it when I first began. You could probably put physics on uneven terrain with physics editor if you do the terrain in smaller chunks and it’s only $20 too. [import]uid: 31262 topic_id: 23029 reply_id: 92398[/import]