Home
GlitterIDE
Beginners Tutorial 1
This is a first in a series of tutorials for the beginner coder to learn the basics of programming and Glitter IDE.
Concepts
Basic GlitterIDE usage
Basic script Editor usage
Simple commands for moving sprite
The concept of a block (defined with "{ }" curly brackets)
Event blocks, flag block used
Repeat count control structure
Compiling and running a project (ctrl-F9)
Single line comments
Related Video
VIDEO
(Audio is a bit quiet as my microphone was the wrong way around)
Downloads
Commands Introduced
turnLeft(x) Turn the sprite left "x" degrees
turnRight(x) Turn the sprite right "x" degrees
move(x) Move the sprite forward "x" steps (pixels)
penDown() Make the sprite leave a trail when it moves
Control Structures Introduced
{ } Curly brackets define a "block" of code, which the computer sees as being connected
repeat (x) { } Repeat a block of code "x" times
Event Structures Introduced
flag { } The code block attached to a flag block is performed every time the green flag is clicked
Related Code
// Comments
flag {
penDown()
repeat(36) {
repeat(4) {
turnRight(90)
move(100)
}
turnLeft(10);
}
}
Next parts
Part 2
function(argument) values, and variables are discussed.
Introduced functions: print(), sin(), goXY(), moveTo()
System variables: mouseX, mouseY, spriteX, spriteY
Control structures: forever { }
Others: declaring, reading, assigning to variables,
Variable types: string, int(egers), floats/doubles
Keywords: let,var,forever
VIDEO
Part 3
while and repeat until loops, if and if/else statements, conditional expressions (don't know how to type in youtube description!), += statements, and the randomInt() function
Introduced functions: randomInt()
Control structures: while() {}, repeat until() { }, if() { }, if() { } else {}
Others: increasing/decreasing variables
Variable types: booleans (implicitly)
Keywords: while, repeat, until, if, else
VIDEO
Part 4
creating "blocks" (functions) to allow code to be reused, and how to use blocks to run things quickly
VIDEO