Depends on what type of wall you're using. I prefer to use a grid system for my games, which makes the level look like a bunch of tiles that are (usually) 20x20. What I then do is if the sprite is touching a wall, it can just go to an exact location where it won't be without having to sense for it. like if I have a 10x10 sprite that touches a wall, it knows that it needs to go to it's round(x position/20)*20+5 if it touches on the right, and -5 if it touches on the left. Then I can have it do a "bounce" effect (xvel*-1) without worrying about it getting caught because of friction.
Offline
Well, although lines are easy, they are hard to sense and don't usually look like good design. I would recommend making a tiling game engine. Here's what you do:
-make a tile of any size so long as the dimensions are the same (i.e. 20x20)
you can design multiple tiles to cycle through as you draw your level.
make sure that the center of the costume is at the top left corner.
-next, have a script that looks like this:
When Flag Clicked
Clear
Forever:
set x to [round(mouse x/20)*20]
set y to [round(mouse y/20)*20]
if <mouse down>:
stamp
if <key [space] pressed>:
next costume
This will allow you to make a really neat grid of tiles for your levels. Then all you do is right-click and save an image of the background, and then edit out the background color if you want.
Offline