How to Code Using Scratch

by floppyman2 in Circuits > Computers

2066 Views, 7 Favorites, 0 Comments

How to Code Using Scratch

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

Planning

IMG_0743.JPG
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.

Designing Your Sprites

scr.png
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!

Jumping

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
sr.png
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

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
woo.png
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

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

Code for the Gun...

code4.png

Code for the Ninja Shuirken...

code3.png

Code for the Fifty Dollar...

wow....png

Code for the 200 Dollars...

wow....png

Code for the Exit Sign..

shoppe.png

Code for the Background...

back....png

Enjoy!

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.