Tuesday 31 January 2017

Unit 71: Object-Oriented Design for Computer Games

Concepts and Principles
When creating a game your blueprints what you input into your game have to easy to read and understand. For example if you were to create a blueprint for a spawn rate of an enemy, Simplified understanding means how easy it is the read and understand or how easy it is to identify what you were trying to achieve. If your blueprint is hard to understand then it can open many problems for the future if you some reason you had to go back and show your blueprint to someone else or you have to explain what you did, they may find fault if there are a much easier way of doing the blueprint of it it simply not understandable.
 Another important aspect is ensuring that your blueprint is easily reusable. This is useful in case something happens to your work and for some reason you have to remake or edit a existing blueprint. By being able to reuse it means you can recreate and adapt the current blueprint to suit your needs.
 Naturally if your blueprints are poorly maintained you will not be able to replicate or make necessary changes to them if it was needed because they may be damaged in such a way that you'll have to completely remake it. In addition to that it's always important to check your game and your blueprints for any issues because if some are found, you can fix them as soon as they are found. If you are able to maintain your game and remove any issues that appear you will be efficiently be able to deal with any future problems which appears, meaning you solve the problem which arises faster and with no hassle from any pre-existing problems.
In my game and in many other games you often create objects based on real structures or objects, for example creating a building. Many would find a reference image to give you a foundation on what you want to design it on. However when you create an object in a game it doesn't have to follow how you'd expect an object react in the real world which'll allow you to make all kind of weird and wonderful fun effects on the object in the end.
 When creating a game it is very important to make sure all of the aspects uphold a certain degree of quality inside of them.

Game objects
Sprites are 2D images of an object or character. When using Gamemaker you created the sprite to act as the shell for the object in which inside of this "shell" you would add all of the coding inside. When you were using Gamemaker you had to create multiple sprites of the same character or weapon if you wanted to animate your characters. Characters within your game are often yourself (and others if you're playing with a friend) and interactive NPC's such as bosses or helpful allies. Normal enemies are not usually considered characters. A weapon within a game should be designed in a unique way as a sprite and ideally it would have different effects or do something different to the other weapons in the game. Ideally you would apply the same logic to the scenery as well. Sometimes in a game youget power ups which will alter your character in a way to make a few tasks  within them easier, for example Mario where you collect the mushrooms and other things to give you a unique effect.
One of my characters


Image result for super mario power ups
One of the many power ups from Mario


Object properties
Many games have a set amount of health you are given in a game, this can be increased with power up or with a certain event triggering. Some bosses will either speed or or slow down when you damage them enough. In most games the bosses are either faster than you and they rely on you dodging there attacks more however some bosses which are slower may deal more damage making you needing to dodge less but each dodge but it could be crucial that you succeed in dodging. On some games when the enemies take a certain amount of damage they start acting sluggish. I believe the aim of this is to make the enemies seem more of a challenge as you damage them further or vice versa.

Image result for Ragnaros
A boss fight




Actions and Events
Mouse and keyboard events are usually how you move around and interact with objects inside the the game. Usually WASD are how you walk (W is forward, S is backward A is left and D is right). These are usually easy to code when using Gamemaker all you had to do was set the specific key to do a certain action (such as setting W to move forward) and then that was finished. The other keys such as E to pick up or interact with other objects or the Space bar to jump can also easily be implemented inside the game. An easy way to gen an object to destroy themselves is by adding a collision event in. For example when a bullet is fired it'd destroy itself and/or the wall when it hits it. A few enemies or levels have time you must beat them, if you fail there is a high chance you will fail or not get any kind if substantial reward.



Related image
A timed event in Diablo 3




Inheritance: 
Inheritance in an object means that when a certain event is triggered it can be reused by another object or character, i think a good example of this is that when you die in a shooter game you can usually pick up the enemy's weapon and use it yourself and so the cycle continues.

No comments:

Post a Comment