It Goes round and round…
|
For our first video game, me and my team decided to work on a video game concept called “Behemoth” which is a side-scrolling Shoot-em up game featuring a large robot that the player cannot move physically and can only control the weapons of, which they use to attack upcoming enemies. While this seems like a simple enough first video games, for a first-time programmer, such as myself, it might be one of the hardest things that I have ever encountered, and the small details that makes the creation of this game so difficult, such as the rotations of the cannons of the mech, the protecting shield that the player can move to protect the avatar, and the enemies that spawns random attacks. For this week, it was figuring out how to do the rotations for the robot’s cannon and power-ups, that were the most difficult to accomplish. How was this an obstacle? Well, the aesthetic goal for this game, also known as the aspired feelings that our gaming team wants our future players to encounter, was for the cannon used by the robot to be moved slowly and to feel like heavy machinery, which required some mechanic goals, also known as the goals that our team needed to program in order to achieve this feeling. Programming rotation, to me as the team’s lead programmer, is a brand new formula that I, at the time, had yet to learn and understand. I knew how to make objects move up and down and left and right, but not how to make an object move in rotation. What made this challenge even more difficult was that some objects of the game are meant to rotate through pressing certain buttons, while other objects are meant to rotate automatically. Not only that, I also needed to implement certain limits so that the weapons would stop rotating when reaching certain points of the gaming screen. Eventually, it was by asking for advice from friends, students and professors that helped me get through this difficult challenge. It is important to remember, and something that I have learned from this week, that everyone has started from ground zero. No one knows what they’re doing when trying something for the first time, and asking for help from people that have been in your shoes is one of the best ways for you to figure out what to do. Eventually, I learned both the formula to use for automatic, as well as controllable, rotating objects. It is important to remember that most forms of coding uses “if” and “for” statements, meaning that “if” this happens, then this will also happen, as well as “for” this object, this will happen at all time. Therefore, I figured out how to program so that if something happened, the this will happen next, meaning that if the down-button of the cannon is pressed, then the cannon will move downwards and in a circle. Just remember that for the circle movement to appear, you need to use specific mathematics and degree measurements. For our project, if our cannon reached a certain amount of degrees, and was located at a specific area of the screen, then the the cannon would stop moving and you would need to push the up-button for it to move again. Also, for this to work in an automatic sense, in that the player would not have to press any buttons, then I would have to program a specific speed that would always be constant for an object, and once that object reaches a certain point, then the movement would be reverse and move backwards. In the end, it was through learning and repeating that I learned how to create a new motion and add it to my game. I used this way of thinking and created a formula that was used in these different ways, and as of now, everything seems to be going in the right direction. I cannot wait to tell you more about the difficult challenges that are approaching! Thank you for reading my first post! |
