How to Code Using Scratch
![scratch.png](/proxy/?url=https://content.instructables.com/FII/AFCR/JBMJWO1S/FIIAFCRJBMJWO1S.png&filename=scratch.png)
Planning
![IMG_0743.JPG](/proxy/?url=https://content.instructables.com/F8W/8RY6/JBQULW5H/F8W8RY6JBQULW5H.jpg&filename=IMG_0743.JPG)
Designing Your Sprites
![scr.png](/proxy/?url=https://content.instructables.com/FQB/B9CG/JBQU3744/FQBB9CGJBQU3744.png&filename=scr.png)
Jumping
![codfish.png](/proxy/?url=https://content.instructables.com/FHD/EXIM/JBQU386L/FHDEXIMJBQU386L.png&filename=codfish.png)
Follow the script on the image to make your character jump! for the first part, go into data and make a variable called jumpheight.
Moving
![d.png](/proxy/?url=https://content.instructables.com/FIZ/4XMY/JBQU38C9/FIZ4XMYJBQU38C9.png&filename=d.png)
![sr.png](/proxy/?url=https://content.instructables.com/F2I/51PY/JBQU38FN/F2I51PYJBQU38FN.png&filename=sr.png)
![cod.png](/proxy/?url=https://content.instructables.com/FV8/U6TH/JBQU38RW/FV8U6THJBQU38RW.png&filename=cod.png)
Follow the image to make your character move! But make sure you duplicate your character's costume and flip it.
Terrain and Objects
![shoppo spo'ed!.png](/proxy/?url=https://content.instructables.com/FGU/DU3Y/JBQUJ7NZ/FGUDU3YJBQUJ7NZ.png&filename=shoppo spo'ed!.png)
So far you have your basic character. Let’s up your game a bit by adding terrain and objects! Draw up a small village pixel shop.
Making a Shop
![clik.png](/proxy/?url=https://content.instructables.com/F5O/QPVI/JBQUJ7R7/F5OQPVIJBQUJ7R7.png&filename=clik.png)
![woo.png](/proxy/?url=https://content.instructables.com/FBN/XH00/JBQULSL3/FBNXH00JBQULSL3.png&filename=woo.png)
![shop guy.png](/proxy/?url=https://content.instructables.com/F6X/2VR5/JBWJWQGE/F6X2VR5JBWJWQGE.png&filename=shop guy.png)
First make sure it is set to “go to back” and position on the floor of your game. Follow this set of code to make your character enter the shop by pressing “w” but, you will have to duplicate you shop costume to make words saying, click "w" to enter. You will also need to include a shop background.
Buying and Selling
![code.png](/proxy/?url=https://content.instructables.com/F2H/02RQ/JBQULSMU/F2H02RQJBQULSMU.png&filename=code.png)
So far a sentence will pop up onto the screen telling you how to enter the shop and when you click “w” the backdrop changes and you can buy weapons or health. Now what we will do is use the list code. That way, if you buy something it will be added onto the list, so that you can select what you want to equip.
Code for the Shop...
![code8.png](/proxy/?url=https://content.instructables.com/FY6/L6HB/JBQUNLMI/FY6L6HBJBQUNLMI.png&filename=code8.png)
Code for the Gun...
![code4.png](/proxy/?url=https://content.instructables.com/FGM/9R42/JBQUNLM7/FGM9R42JBQUNLM7.png&filename=code4.png)
Code for the Ninja Shuirken...
![code3.png](/proxy/?url=https://content.instructables.com/FD8/XYDC/JBQUNLM0/FD8XYDCJBQUNLM0.png&filename=code3.png)
Code for the Fifty Dollar...
![wow....png](/proxy/?url=https://content.instructables.com/FBD/661S/JBQUNLMX/FBD661SJBQUNLMX.png&filename=wow....png)
Code for the 200 Dollars...
![wow....png](/proxy/?url=https://content.instructables.com/FEB/09GC/JBQUNLQW/FEB09GCJBQUNLQW.png&filename=wow....png)
Code for the Exit Sign..
![shoppe.png](/proxy/?url=https://content.instructables.com/F0O/Z6ZF/JBQUNLMQ/F0OZ6ZFJBQUNLMQ.png&filename=shoppe.png)
Code for the Background...
![back....png](/proxy/?url=https://content.instructables.com/FLR/4LQ6/JBQUNLZL/FLR4LQ6JBQUNLZL.png&filename=back....png)
Enjoy!
![flop.png](/proxy/?url=https://content.instructables.com/F0F/Y9LX/JBQUNM0B/F0FY9LXJBQUNM0B.png&filename=flop.png)
I will begin to work on part two, but for the waiting period have fun and try to experiment with scratch. Check out some of my projects by simply typing "floppyman2" into the search bar.