First you will need to create a stage backdrop that has walls (one main colour). You can change this later so just make it very basic like this one:
- Click on Sprite 1
- Copy this code ( Once you have copied the first string of code, you can duplicate it and change the values)
- Make sure that the 'touching color' is the same colour as your walls (use the colour picker)
Now use the arrow keys to move around. The sprite should not go past the walls.