Klik op een van de onderwerpen voor meer informatie.
Level 1 - The Basics
- numbers - values the computer can do math calculations with, e.g. 84
- stings - values stored as text, e.g. "Game Over"
- variables - a name for a piece of data that might change, e.g.
score = 12
- objects - a name for a group of variables/functions, e.g.
player.score = 10, player.x_position = 45
- conditionals - allows the computer to make choices, e.g.
if score > 10 then mode = "win"
- boolean logic - using
and, or, not
- game loop - the way the computer loops over update() & draw() over and over
Level 2 - Adding to the Fun
- files - a way to organise your project by breaking the code up into topics, e.g. player, enemies, bullets
- functions - grouping code together into blocks that do just one thing, e.g.
drawEnemies()
- scope - whether a variable can be seen everywhere in the program (global), or just within a function (local)
- defining objects - directly make an object yourself
- program modes - run different code each frame depending on the value of a variable
Level 3 - Advanced Techniques
- lists - collections of variables, objects, etc. e.g.
weapons = ['axe', 'sword', 'foam hammer']
- vectors - an x value and a y value that tell the computer how far to move a sprite, e.g. [1, 0] would move an object to the right
- iteration - looping over a piece of code multiple times, or over each item in a list
- instancing - making an object from a factory function or class, e.g. (players might call this spawning)
- classes - like 'blueprints' for making a large number enemies, bullets etc.