The "Freedom Project" for SEP11 is all about making any product to showcase what you have learned for the tool you used to help you build the project. The purpose of this blog is to show your progress of how you chose the JavaScript tool, how did you learn your tool effectively, the steps it took to make your actual project, your grows and glows, and the skills you acquired for this project.
For my project, I am making an interactive cake game using Kaboom JS. This blog will walk through my process of independently studying Kaboom JS in order to make the cake game.
My biggest challenge for the freedom project was to make the third scene of my game which was after you pressed the spacebar 100 times, the game will take you to the ending. At first, I built the counter to help the player keep track of how many times they have already pressed. The counter worked so, the next step was to create a conditional to make sure after 100 times the next scene will appear. First, the condition I wrote was if(times = 100)
. Inside the condition, I wrote go("ending")
. The go
part means to switch to this scene I am specifying which is "ending". When I ran the code, I pressed the spacebar 100 times to make sure there is no error and there is an error. The ending scene did not appear. I looked at the Kaboom Js website to find any information to help me solve the problem. I found out that my condition was incorrect because I only put one equal sign (this means x value is equal to x variable). I instead used three equal signs to make sure the value is both operands are the same type. I ran the test again with my newly revised condition which worked. For my next steps for the game, I should include more levels for the game to be more interactive. For example, another level could be cuting the cake.