Introduction: How to Code Using Scratch

Picture of How to Code Using Scratch

Hi guys! This is floppyman2! This project will give you an idea of how to begin a platformer game on scratch!

Step 1: Planning

Picture of Planning

First, get out a piece of paper and plan your platformer. Do you want it to be funny, strange or maybe just straight forward. When you have finished your planning, who your character is, who your enemies are, what type of landscape it is, click on the create button on the scratch website. www.scratch.mit.edu and make a profile if you want.

Step 2: Designing Your Sprites

Picture of Designing Your Sprites

Next to the scripts button at the top, there is a button called sound and then costumes. Click on the costumes button. What will pop up is a square that gives you the ability to design a character. You can have either a pixelated character, (bitmap) or you can have a very detailed character, (vector) which I recommend for later on. So start designing!

Step 3: Jumping

Picture of Jumping

Follow the script on the image to make your character jump! for the first part, go into data and make a variable called jumpheight.

Step 4: Moving

Picture of Moving

Follow the image to make your character move! But make sure you duplicate your character's costume and flip it.

Step 5: Terrain and Objects

Picture of Terrain and Objects

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.

Step 6: Making a Shop

Picture of Making a Shop

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.

Step 7: Buying and Selling

Picture of Buying and Selling

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.

Step 8: Code for the Shop...

Picture of Code for the Shop...

Step 9: Code for the Gun...

Picture of Code for the Gun...

Step 10: Code for the Ninja Shuirken...

Picture of Code for the Ninja Shuirken...

Step 11: Code for the Fifty Dollar...

Picture of Code for the Fifty Dollar...

Step 12: Code for the 200 Dollars...

Picture of Code for the 200 Dollars...

Step 13: Code for the Exit Sign..

Picture of Code for the Exit Sign..

Step 14: Code for the Background...

Picture of Code for the Background...

Step 15: Enjoy!

Picture of Enjoy!

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.

Comments

anstonf (author)2018-01-02

Awesome

About This Instructable

202views

3favorites

License:

Bio: Hey guys! This is Floppyman2! Feel free to check out my how-to projects! Hope you guys have fun and enjoy!
More by floppyman2:How to Code Using ScratchThe Poly-CapDIY Rudolph Christmas Hat
Add instructable to: