
The second room in the game is currently a test at what my platformer could become. I didn't try to hard on making it look realistic, instead I just made some very lame obstacles for the player to try and jump over and across. These jumps become significantly easier if the player learns when you hit the shift button you run faster, and when you run faster, you jump further. This is a simple mechanic I added simply by messing around with the basic physics system.

Anyways, enough looking at what the game actually looks like, lets get into the really fun stuff. Code.

Using scripts is very useful for making your code neat and organized, which for me is the most important skill to have in coding. Because if your code is super cluttered and messy it becomes very hard to work on your game.
So what does the Scr_Get_Input script do exactly?
Inside the Player Object there is a line of code that calls the Input script to its page "Scr_get_input();"
This makes all the long code from "Scr_get_input" appear inside the Obj_Player.step event when the game starts. Effectively removing clutter, and making things easier to find.
This is an image of the Obj_Player.Step Event. As you can see the blue text shows you how the "Scr_get_input" is actually incorporated into the page.
You can also notice the foot notes in the code, marked by their light green tint and "//"
"//EXAMPLE"
Putting in two forward slashes makes a set of code do nothing but look fancy, So this becomes very effective for organization and management. It is a must know for coding beginners
Next Class I will continue my work on animating the dying zombie animation and or helping Justin with whatever he needs help with.
No comments:
Post a Comment