110 likes | 254 Views
Pop Quiz. Programming Concepts and GML. Events. List four different types of events and describe how you would use them. > > > >. Graphics. What are sprites and how do they differ from backgrounds? List at least two points. Variables. Global.keys = 6 SET or INCREMENT?
E N D
Pop Quiz Programming Concepts and GML
Events • List four different types of events and describe how you would use them. • > • > • > • >
Graphics • What are sprites and how do they differ from backgrounds? List at least two points.
Variables Global.keys = 6 SET or INCREMENT? Global or Local? Describe what this piece of code is doing keys = keys + 6 SET of INCREMENT? Global or Local? Describe what this piece of code is doing
Variables • Why do we use variables when programming games?
Match the data to datatype using arrows. There will be more than one data to a datatype DATA 0.6 simon (03) 97985456 TRUE FALSE 120 120.098787390 DATATYPE Integer String Floating Point Boolean
Functions What is the programming term for: Inputs? Outputs? Research what Programming Syntax means. ____________________________________ ____________________________________
Functions Consider the motion function in gamemaker Motion Free(direction, speed) This a legitimate Function Name (True/False) Why or Why not? ___________________________ How many inputs does this function take? _______ If the direction = 270which way would the object move? Does the object have any outputs? ________________________
Using Functions Let us assume you would like an object to move right at speed 6 when you press down the right arrow. How would you code this action in GML?
IF ELSE in GML • Write an if else statement in GML that handles the following: • Checks if you have less than 10 diamonds. If you have less then 10, add one to how much you already have. If you have 10 or more reset back to zero. • Variable to operate on can be global.diamonds
Coordinate System • The window size is 500 x 400 • Estimate the coordinate (x,y) of the: Heart ( , ) Player ( , ) Monster ( , ) Gun ( , ) Green Mushroom ( , ) Exit Sign ( , )