The Adventures of Tokk Project Report Raphael Leon 31 may 2014 | Página 10

stored in the “Step Event”. This is needed as the step event runs code every second so things like character movement, collisions and gravity would be stored here. This breaks long scripts up and can make them far easier to digest. In this game the character was the most difficult part to program, but once programed a lot of code could be reused in the code used to operate the enemies. Pixel art and 8-bit games have always been a favorite art style and I was delighted when it started to gain in popularity. GameMaker is an engine that specializes in creating 8-bit games for many platforms such as iPhone, Android, mac and computers. With a high level of understanding of the program and its coding language I will be able to create enjoyable games and easily market them on the App Store and Android market quickly. The scripts that were most difficult in this game were series that are on the character and the ones that are on its enemies. (Yoyo Games, G. 2014). GML Character Script Create Event /// Initialize variables grav = 0.2; hsp = 0; vsp = 0; movespeed = 4; These are the variables that will be called upon later in the step event (grav= gravity, hsp = horizontal speed, vsp =vertical speed. jumpspeed_normal = 7; jumpspeed_powerup = 10; jumpspeed = jumpspeed_normal This was added later when I decided to use powerups in the game, this particular powerup allows for a powerful jump. This effect is activated when the character collides with the powerup the player’s jumpspeed temporarily equals 10 and not 7. Step Event The step event is much like Unity3D’s “function Update()” as these function are run by the engine every second. //Get the players input key_right = keyboard_check (vk_right); key_left = - keyboard_check (vk_left); key_jump = keyboard_check_pressed (vk_space); 10 | P a g e