Tuesday 20 March 2018

Year 2 - Unit 71: Object Oriented design for computer games - Task 2


Unit 71: Object Orientated design for computer games - Task 2


Concepts and principles: simplified understanding; reusability; maintenance; efficiency; real-world modelling; collaboration and sharing; communication; quality assurance


Game objects: sprites; characters; weapons; rooms; walls; scenery; instances; rewards, eg bonuses, power-ups


Object properties: colour; size; speed; movement; sounds; health; lives

Actions and events: mouse and keyboard events; create; destroy; collision; timers; scoring

Inheritance: parent; child; inherited behaviours and properties; overriding events



Concepts and principles:

In Game Maker its a lot easier to understand the whole game engine rather than just small singular features. Anything from character art to coding is pretty simple to navigate around, this is possibly because of how clear and easy the whole engine is just at a look. Everything is right in front of you whereas with Unreal you have to literally search for all the different possible features. Unreal has so many features that to be able to learn everything you would have to put so many months of exploring the engine in. Although its not a bad thing, it definitely makes it harder to find what you need but then again maybe Game Maker doesn't have enough or as many good features.

Unreal Engine Layout
Generally you can use both of these engines over and over again and still come up with a whole new idea or concept every single time. With Game Maker though you can get a little tired of not having so much freedom as you do in Unreal. Reusing Unreal is such an easy and exciting thing to do simply because of how many possibilities it has to offer, I would much rather spend my time reusing Unreal than GameMaker.

Game Maker Engine Layout
The maintenance that these two engines have is pretty different, with GameMaker if the code has an error the system comes up with a window that says what part or line of the code is failing drastically. With Unreal they have a thing called Map Check Errors which alerts you of potential problems, this informs you of any Errors (critical problems that have a possibility of causing some sort of execution failure) which should be fixed before carrying on, Lighting issues (any problems with how the lighting performs), Warnings (these aren't as important as errors but can cause your game to under perform) these should be addressed but aren't the end of the world, Actor issues (there are many different types of these but they are based upon the character/player), Camera issues (if the camera is not up to spec and should be changed to actually be able to see whats going on efficiently), Foliage issues (if any trees or bushes etc. have something wrong with how look or work), Landscape issues (shows what may be wrong with the landscape e.g. overlapping) and Sound issues (any sound may be affected by issues and should be fixed if you want a fully immersive game). The two engines are different simply because of how specific they are about the errors they encounter, Unreal tells you what type of issue it is but Game Maker tells you exactly where it is.

The efficiency of these engines is pretty different as one is a lot quicker, I think personally, and the other definitely takes more time. Game Maker is quite an efficient because it does what it says and quickly whereas Unreal does do what it says it can, but because it has so many more aspects that can be changed to will it takes longer to complete.

The real-world modelling for both of these engines varies largely because of how many features they have, Game Maker is pretty simple to code, especially things like collision. unreal is a little more difficult because each part of the game has different codes that all need to be edited apposed to how with Game Maker most of the time you just have to drag and drop code or check a box.

Collaborating and sharing projects is pretty difficult with both engines but it is only directly possible with Unreal, although you can obviously copy and transfer your game file in both you can only do it without that effort of updating every time you want to by such a long winded way. Unreal comes with to integrated ways that make it possible for people to work together using a thing called Version control. It allows multiple people to share different assets and code with each other, it also has backup and any history of the changes made so the file can be reverted if needs be.

The communication between the different parts and aspects of the engines are pretty similar, however Unreal has a few more steps because of how it has more routines to go through. Game Maker pretty much just relays information between two main scripts and a few smaller checks, whereas Unreal relays information between so many codes and checks that its constantly busy.

Using quality assurance with these two engines is pretty easy but Unreal can be a little more challenging simply because fixing any problem isn't quite as easy as Game Maker but making a game in Unreal does give the game a higher quality feel. Finding any issues within Game Maker is a lot easier than Unreal because there's a lot less to go wrong on/with.


Game Objects:

Sprites and characters are pretty similar to create as are weapons, rooms, walls and scenery within Game Maker They all follow the same creation with pixel art or imported images. Characters, walls and weapons are all created as sprites and then added as objects which are then later coded into the game as they should be. Rewards and instances are more code than anything else and often need collision detection to work fully in the game. Creating rooms in Game Maker is a bit different, you create rooms not as a sprite like the others but as a room, you can do this from scratch with pixel art or just import an image. Just because Game Maker is all 2D doesn't necessarily mean it can't be animated, this is in the same sprite creation and you just add fresh frames and bend the image to your will. In Unreal characters, sprites, weapons, rooms, walls, instances and rewards are created as a 3D model mainly in Maya and are then transferred to Unreal for coding. The Scenery is the same and like the others it can be imported from the communities library. So Game Maker has a sprite and object builder built in whereas Unreal does not. Rewards in both engines are created as objects and then coded to give a bonus, power-up or some other sort of advantage. When creating a wall sprite in Game Maker you need to add it as an object and make sure you then tick the solid and uses physics box, this makes the wall collision proof so you can't go through it. For Unreal its a similar idea but instead of ticking boxes you program it in a way.

Object Properties:

The colour of objects within Game Maker is not that changeable as the colours can only be solid and on a basic colour wheel, if something wants to change colour halfway through a game it has to be part of a new frame animation. In Unreal there are so many different ideas for colour, it can just be a singular and generic colour or could be a whole number of textures like wood or concrete, all of these can be added only within the modelling software like Maya.

Changing position and size of object in
Unreal
To change the size of something within Game Maker you need to scale the image in the sprite creator from the transform tab and up the scale percentage up or down depending on what you wish it to look like. In Unreal to change the size of something you can do it in the engine rather than having to go into the 3D modelling software using the scale tool.

Speed in Unreal
In Game Maker if you wish to change the speed anything is going at you just have to go into the proper events and make a direction combine with a key and then add the move action and change the move speed from the pop up menu. In Unreal if you go to the character movement code you can change the max walk speed and then increase or decrease to your hearts content.

Sound in Unreal
Adding sound in GameMaker is pretty simple as all you have to do is link a sound action to a event, if its background music then it can be added just as a level starts or if its a shooting sound it can be added to that. In Unreal you can set sound as an event starts as well and change the volume as well. The coding for sound in Game Maker is definitely 100 times easier as its all available to build on rather than starting from scratch.

In the following link from the last assignment you can see how to create a health bar and lives in Unreal and Game Maker in the 2nd Example and the movement in the 3rd Example :
Image result for create object in unreal
Creating an object in Unreal
https://sarahsgamesdesign.blogspot.co.uk/2018/03/year-2-unit-71-object-oriented-design.html


Actions and Events:

Mouse and keyboard events in Game Maker and Unreal are both pretty similar and simple, for Game Maker you add whatever button or key pressed as an event and then add an action to that. For Unreal you do the same within the characters code. (Similar to the above movement. Creating something in Game Maker is really easy as you just use an event and then the create instance action, once that's done you can then add the new objects events. In Unreal you use the create new object action in a certain objects event when something happens. again these two engines have a very similar method of doing this.
Destroying an actor in Unreal
Cool-down timer in Unreal
To destroy something in Game Maker you link the destroy action to an event like a collision and in Unreal you also do the same within a certain model/objects event and select the destroy ___ action. Collision is explained further in the Game Objects paragraph above, in both of them there's an event called collision that you can use to make an action tagged to.
Setting a score in Unreal
Timers in Game Maker can be added within the games controller object as an events action as they are in Unreal, you can change how long they are on for and how doing certain things may affect the time limit, maybe collecting a timer increases how long you have and maybe getting hit decreases. These would be under a new event but would still relate to that original timer at some point. Scoring in Game Maker is done by yet again another event action it is explained further in this video: https://youtu.be/jkblYOI_Dqc?t=5m27s
In the whole video I explain how to do almost everything I've spoken about above in Game Maker so that video includes all my examples for Game Maker rather than just screenshots.


Inheritance:

Parent setting in Game Maker
Unreal parent setting for a gun
The parent object has the coding that is used for the child, it works the same in Game Maker and Unreal as one object is the parent, if you change this object in any way the child/children are also changed once they are recognised as its child. This just makes the whole enemy copying easier with just using inherited behaviours and properties.








References:
https://docs.unrealengine.com/en-us/Shared/Editor/MapErrors
https://docs.unrealengine.com/en-us/Engine/Basics/SourceControl




No comments:

Post a Comment