adamslowikowski.files.wordpress.com  · web viewanother impact on society is the cost of playing...

24
Unit 22: Developing Computer Games – Adam Slowikowski Task 1 – The impact of different computer games on society One major negative impact that games have had is excess playing time which may make people addicted to video games. This will as a result make people only think about video games all the time resulting in them not going outside or even starting to just stay at home a long time without even going to school. One example of video games that can make people have these effects of excess playing time is a game called World of Warcraft, an RPG game that you must farm many resources for a long time to get to a certain point in the game. Additionally to these playing times, people can because extremely unhealthy through extended gaming sessions as they will either sometimes forget to eat because they focus too much on the game or consume a large quantity of energy drinking to help them keep going which can cause major health issues. 5% 10% 60% 25% Playtime (hours) sample of 100 individuals 2 hours or less 3 to 4 hours 5 to 6 hours 7 or more hours Another impact on society is the cost of playing video games, specifically computer games. There are some cases where people would spend over £1000 just to be able to have a computer that can run the latest games with the best quality possible. This creates a lot of income for gaming companies which may build computers, manufacture computer parts, or even produce video games. People may also get jobs at these companies that produce games to become testers or give opinions on what the game should be played like similar to a beta tester of video games. There is many companies with open spots for

Upload: ngominh

Post on 23-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Unit 22: Developing Computer Games – Adam Slowikowski

Task 1 – The impact of different computer games on society

One major negative impact that games have had is excess playing time which may make people addicted to video games. This will as a result make people only think about video games all the time resulting in them not going outside or even starting to just stay at home a long time without even going to school. One example of video games that can make people have these effects of excess playing time is a game called World of Warcraft, an RPG game that you must farm many resources for a long time to get to a certain point in the game. Additionally to these playing times, people can because extremely unhealthy through extended gaming sessions as they will either sometimes forget to eat because they focus too much on the game or consume a large quantity of energy drinking to help them keep going which can cause major health issues.

5%

10%

60%

25%

Playtime (hours) sample of 100 individuals

2 hours or less 3 to 4 hours 5 to 6 hours 7 or more hours

Another impact on society is the cost of playing video games, specifically computer games. There are some cases where people would spend over £1000 just to be able to have a computer that can run the latest games with the best quality possible. This creates a lot of income for gaming companies which may build computers, manufacture computer parts, or even produce video games. People may also get jobs at these companies that produce games to become testers or give opinions on what the game should be played like similar to a beta tester of video games. There is many companies with open spots for people to join them in helping develop their game such as Jagex or Riot.

Thirdly, an impact on society would be social isolation. People may become so engaged in a video game that they forget about going outside at all and talking to others because they may believe that a video game is all they need preventing people to develop possibly communication skills, this is usually common among young people. However, this is not always the case, as there is some MMO games (Massive Multiplayer Online) which allow many people from all over the world to interact with each other. One example of a game like this is RuneScape which allows everyone to see their characters and type in game to talk to

Unit 22: Developing Computer Games – Adam Slowikowski

them which also teaches proper grammar and can even teach languages if some people would be willing to ask.

Fourthly, education is one factor to be considered as young people play computer games a lot, developers of games usually always want to teach to the public some sort of knowledge such as puzzle solving or basic mathematics. Games like Tomb Raider and Rayman with puzzles and plat forming are one good example as players can have a sense of how to traverse a level by using their surroundings, this help them to focus on the puzzle and develop puzzle solving skills.

Lastly, games are not limited to just consoles or PC, there can be mobile apps that can promote gambling sites that allow people to spend money in attempts to earn more. Usually, these gambling games can sometimes make people consistently come back to the game to bet their money which is good of people win, but most of the time it’s a loss and through false advertisements people are persuaded to keep spending more.

On the other hand, there are certain Psychological factors in games which help encourage people to keep playing games to extent their gaming sessions such as hi-scores which can create competitions between friends, the use of sound for when something is done correctly or has to be changed and achievements which can make players play a game to get all achievements to make them boast to their friends on how great they did in a game, or their friends might persuade them to play with them even longer in order to level up their character. There are positives and negatives to this as it develops communication skills. However, doing anything for an extended time always leads to problems.

Conclusion – In the future, people will keep playing games as they are a passive leisure time activity which can boost their mood from a bad day or go back to playing with their friends with a game that can help create their own characters and personality, there are cases of some people even prevent depression as they are persuaded by online people that encourage them to live a happy life, there will be more jobs to allow gamers to help develop possibly their own game or help make one.

One of the many genres of computer games is MMORPG (Massive Multiplayer Online Role-Playing Game) Games such as these have a character that can have possibly even up to more than 100 abilities that a player can use, a levelling system, many skills to train, questing over a what could seem like an infinite map with monsters that drop many items and interacting with other players that do the same or try to pretend they’re another person to create their own clubs. An example of a game similar to this is RuneScape and World of Warcraft.

Unit 22: Developing Computer Games – Adam Slowikowski

Another popular genre is the First-person action shooters (FPS) in these games; the player takes control of various or just a single character in the game that tells a story. One of the most popular FPS games is known as Call of Duty, a military simulator which puts the player in an environment of a an on-going war and the player must make their way through enemies in order to advance in the story that is being told. These games can be brutal and are usually for an older audience.

On another note, Real Time Strategy (RTS) games make a player have a game which is slow paced and is usually based around the concept of creating a town that is able to survive and expand. This can take up to many hours as people have to wait for buildings to build in order to advance further into the game which has more building unlocks, troops to train to invade other cities, many notifications to let the player know that a certain building has been built. An example of such games is Sid Meier’s Civilization and also a browser game called Ikariam.

There are many other genres such as stealth games most commonly famous games for this specific genre is Metal Gear Solid in which a top-down view is given to a player of a character that must infiltrate an enemy base and gather information. This can help players create smart ways to gain access to certain areas in a level and develop thinking skills.

Unit 22: Developing Computer Games – Adam Slowikowski

However, all of these games would need a specific system to be able to run these games. Some of these games are suited to low-end PC consumers or high-end depending on the quality of these games. Some will need to be on console or mobile phone to be of easy access so more people of the public can play. One good example of a mobile game is Candy Crush, through many advertisements many players came onto the game and stuck around as it’s very addictive because it requires strategy and solving skills. Each system can have their own graphics, intense graphics that want to be showed off in a game like Battlefield can be best suited to PC, or games like Candy Crush to mobile phones as it wouldn’t use much power.

Additionally, many games can induce violent behaviours and are based around violence. Games such as manhunt were even outright banned due to their violent teachings and behaviour that could’ve been takes as an example by people. The game manhunt is based on killing others with brutal ways such as a chainsaw or stabbing and as a result, governments feared for people’s youth and decided to ban it in certain parts of the world. Moreover, certain games can be also ported to other platforms. Such as the case with manhunt which was available on both the PC and PlayStation 2 on release which gave it a larger audience.

Unit 22: Developing Computer Games – Adam Slowikowski

Sports games such as GRID 3 were always to be enjoyed with casually with some other friends. They could grab a controller and race with another friend in order to see who’s got the faster and better car and hang out and discuss their personal lives together in order to have a good time. Additionally, it could be beneficial as it requires hand-eye co-ordination in order to time when to make a turn or when to accelerate along the track. Moreover, a simulation of this type of game could also teach certain individuals the basics of controlling and driving cars such as gear changing and when to swap lanes like in Euro Truck Simulator.

Lastly, a major factor about computer games is the way it can be used as a source of income for business and companies alike. Large companies may resort to online gambling like casinos and persuade people to deposit their money for some free rewards or trials and guarantee their money back. The problem is, most of these sites are either fake or they will most of the time just lure a person in and take all their money. Moreover, there isn’t any major laws against gambling online so people can’t do anything once their money is lost.

https://docs.google.com/forms/d/e/1FAIpQLSddawcFkMYD1Q6u9wd3OCe8Gv3F2c0bCs3HlRcOo8BHyb1Bsg/viewform?c=0&w=1

http://onlinegamingaddiction.web.unc.edu/negative-aspects-of-online-gaming/

http://manhunt.wikia.com/wiki/Manhunt

http://www.contentedwriter.com/impact-of-computer-games-on-society/

https://www.quora.com/What-is-the-average-price-for-a-gaming-PC

The video linked below is a song briefly describing the history of computer games and how they’ve affected the society.

Unit 22: Developing Computer Games – Adam Slowikowski

https://www.youtube.com/watch?v=5237hmNkCms

Task 2 – Greenfoot game design and development

My original plan was to create a Co-op Mario version of the Asteroid game and the final product turned out to be alright and looks something like this:

http://www.greenfoot.org/scenarios/20664

The main purpose of the game is to play together with a friend and to shoot all the enemies that ppear on the screen. However, when a Koopa (cloud turtle) is eliminated, two goomba’s spawn (brown mushrooms) which also have to be eliminated. These enemies come in endless waves and the more that are killed, the harder the game gets. Points are awarded depending on what type of enemy was eliminated such as a Koopa giving 100 points and Goomba’s 50. Both players when they eliminate an enemy are awarded points individually and are added up to the total score. If an enemy touches ANY of the two players, the game ends.

The game was created using Greenfoot, a java based object oriented programming language. This allows me to use most of the Java libraries available on the official Java website and get game examples online on how to make my players to move and spawning enemies. Moreover, it has a built in compiler that is quick and has documentation available with a press of a button that displays all the available and possible Java commands that can be used. Additionally, it allows to comment the code that you’re working on so that if I ever need to go back to the code to edit something, a know specifically which area of the code affects the game such as player movement or fire rate.

Furthermore, the greenfoot site has a large community that is always helping out newcomers to greenfoot and helped me include background music into my game and create sound effects for my bullets and enemy death sounds. Greenfoot has very good inheritance built into it so you can have many actors linked to one specific method to be used for everything. Moreover, when a mistake is made in any of my code, greenfoot has a very descriptive debugging system and ives feedback back to the user on what could be fixed such as adding a semi-colon at the end of a line or when something doesn’t exist that has been mispelt. Finally, when the game or program is run, and an error occurs, feedback is given on what line the code had crashed and the user can go back and find a possible solution.

Unit 22: Developing Computer Games – Adam Slowikowski

This storyboard dictates very briefly the process that was taken in order to program and design the game. I will go over more detail regarding the storyboard here:

The border is the first part of the game that was made as it allowed to to have a play area to be used not only for the player to play the game, but also for me the programmer to have an area to work with the code and to choose where to spawn the player and the enemies and where the score counter will be displayed. The world class is set to public so that all the other classes can have access to the world class so that all the enemies, players and objects such as score can spawn in the game.

Unit 22: Developing Computer Games – Adam Slowikowski

Secondly, the sprites were created. My primary use of sprite creation and editing was created with certain google images, pixel maker and Adobe Photoshop. I took the sprites e.g. Mario, Luigi and Goomba models and background and edited the size of each sprite to make the game appear big, I made the background resolution 1366 x 768 in order to have a larger area to play the game with and to code with. Moreover, the sprites have a background however it’s transparent and that dictated the hitbox for whenever a Goomba or Koopa collided with a player.

Thirdly, the movement for the player was created so that the player can actually control the characters and be able to play the game. The player movement was also made so that if the player goes off-screen, they re-appear on the opposite side of the screen so that the player doesn’t lose track of the character. This was done by adding an if and else if statement.

This is the code that allows the players ship to accelarate and also controls the rotation of the player so if the player presses UP the player speeds up and when RIGHT is pressed, they rotate to the right. The funtion slowDown is called so that the player can change speed.

Transparent background = hitbox

Unit 22: Developing Computer Games – Adam Slowikowski

The border code works by getting the location of the player when they reach any of the borders of the world and then position the player on the opposite end of the world by positioning them on a specific co-ordinate. In this case, it gets the X and Y co-ordinates of the player at the border and assigns the opposite co-ordinates when they reach the border making them appear on the other side. An integer is used for the co-ordinates as the screen is 1366 x 768 therefore it allows accurate positioning.

Fourthly, the enemy sprites are spawned into the world with death mechanism to spawn more enemies when an enemy is killed, award points to the player and to create movement mechanics for the enemies. The if statement is used so that if a bullet hits the enemy, it triggers the death mechanism.

This is the code used in the game. When the Koopa (turtle) is killed, it spawns two Goombas and disappears. Additionally, a sound is played when the enemy is killed which gives the user feedback that an enemy has been successfully slain.

Moreover, the movement code for the players has been duplicated and added to the enemies so that they are also able to move through the world borders and appear at the other side. The difference between the player and enemy is that the enemy has a fixed movement speed. This adds more risk to the player.

Unit 22: Developing Computer Games – Adam Slowikowski

Fifthly, the player shooting mechanics are added along with their death mechanics and hit boxes are implemented so whenever the player touches the enemy within a certain proximity, the player dies.

This is the code that is used to end the game when a player’s ship collides with an enemy. When this is initiated, the Game Over screen is displayed to the user and the game over music is player. Afterwards, the game stops working.

Moreover, this is the code used for the players shooting mechanism. This works by having the player press the spacebar and when held down, a bullet is fired at a fixed speed which is dictated in the function of the code. Moreover, a sound is played for whenever a bullet is fired to add more charm to the game. This bullet is spawned whenever the player holds or pressed the spacebar and travels at a fixed speed. When it collides with an enemy, it triggers the enemy’s death mechanism.

Lastly, the final touches were added. This primarily includes the score counter, adjusting background resolution for performance, adding music in the background adding co-op which was done by duplicating the original player code and changing some values for the other player to be able to spawn and to also add to the total score and to have individual controls. Lastly, a game over screen was created and implemented into the final version of the game so that the player can get some feedback once the game is over rather than be confused on what happened or what to do next.

Unit 22: Developing Computer Games – Adam Slowikowski

Data Dictionary

Name: Definition: Implementation in game:Methods/Procedures A method is a set of code

that can be used when called by its name.

The “MarioWorld” actor is the method and contains all the code that is needed in order to play the game.

Parameters Passed (Also known as Parameter Passing)

Passing by value makes it so that two independent variables don’t change when one is changed.

Passing by reference is when the original variable is passed to a function. When the variable is changed, it changes the value in the function.

Passing by reference was used in order to make the player appear on the opposite side of the border. This was done by using integers which were mapped as co-ordinates on the screen. The positioning of the player constantly changes so when the player’s co-ordinates touch the border, they get changed to opposite values so the player re-appears on the other side.

This is the code that is used in order to display the game over screen. Firstly, the size of the text and area where it will be displayed on the screen is set. Then, a transparent background is added to make the text more visible to the player. Lastly, the text itself is displayed in bright red and a custom font is chosen so that the player is able to read Game Over clearly.

This is the code for displaying the score counter. Each enemy has a specific score value assigned to it. When the player kills that enemy, the score is added to the total score. This score is displayed in the top-left corner of the screen which is manually adjusted by the code. Additionally, a transparent background is added for the text so that it stands out the colour of the “Score:” text is displayed to yellow for clearer visibility. A string is used for both the Game Over and Score code in order to display the text otherwise an error would occur.

Unit 22: Developing Computer Games – Adam Slowikowski

Return Values This is a statement used in programming in order to get a value such as an integer, string or Boolean to be stored and/or used for another function.

This was used primarily in the scoring system of the game. Each enemy has a different value and when an enemy is killed, their values are added up to a total and displayed to the player.

Scope When the code is running, only parts of the code are accessible. This limits the amount you can edit. This can be used as a security measure.

Greenfoot is free and open source and people mainly use it for small projects to share with others. Therefore, no security or code limitations are needed by my game.

Visibility (Private, Public) These are class access modifiers. What this means is that it allows only certain classes access its methods. E.g. private classes only allow access to methods inside it whereas public classes can use any method from any class within it or from a referred class.

The “MarioWorld” used in my code is a public class. The reason for this is so that all the methods and procedures can be executed which in turn spawn all the objects, players and enemies into the world. In other words, it generates the game for the player.

Objects An object is just something that has properties to describe it. E.g. a basketball will have a radius as an integer and a set colour with a string.

Many of the objects that were used is the “ship” and ”ship2” which are the two players and they were given properties for movement and shooting.

Instantiation Instantiation can be described as the visual creation of all the code that has been made or for the code to be initiated.

This is used by Greenfoot as a feature. There is an “act” and “run” button at the bottom of the interface that creates an instance of the game which makes it play properly.

Selection/Iteration Methods Selection methods are a basic programming structure. Its main principle is that a question is asked and can get many answers. A very simple example of a selection method is an IF statement.

Iteration can be described as a loop that goes through a group of instructions that gets repeated. Some examples of variables that are used to initiate iteration are “while and “do while” variables.

Selection methods were primarily used in the game for player movement. Such as “if (Greenfoot.isKeyDown(“right”) == true) then it would move the player to the right whenever the corresponding key is being detected being pressed by the player.

I don’t believe any iteration was used in the final version of the game.

Modularity These can be described as having certain parts of code

Greenfoot allows Actors which can be used similarly to

Unit 22: Developing Computer Games – Adam Slowikowski

as individual pieces known as modules. This lets programmers know which area of code does specific functions and can be accessed and changed easily.

modules as each Actor contains specific and related information to other Actors and the world. This allows me to go to a specific Actor and change any values that are needed very quickly and easily.

Integer A whole number Integers were used in order to get accurate co-ordinate positioning across our screen resolution when the player goes past the border.

Booleans Can have two values such as 0 and 1. These can be used for true or false statements.

No Booleans were used in the final version of the game.

Characters (Char) Can hold a number from 0 to 255 or -127 to 127.

Chars don’t necessarily have to be used for a simple game as mine. The reason for this is that integers can replace chars if it’s small digits which fit the game.

http://pixelartmaker.com/

https://stackoverflow.com/questions/1020749/what-are-public-private-and-protected-in-object-oriented-programming

https://stackoverflow.com/questions/37154763/in-object-oriented-programming-what-do-you-mean-by-object

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html

https://mathbits.com/MathBits/Java/Methods/Lesson1.htm

https://stackoverflow.com/questions/373419/whats-the-difference-between-passing-by-reference-vs-passing-by-value

https://www.computerhope.com/jargon/r/returnst.htm

https://scotch.io/tutorials/understanding-scope-in-javascript

http://whatis.techtarget.com/definition/instantiation

Task 3 – Debugging

For every time that I changed a value, I would immediately run the program to see the result of changing the variable. This allowed me to determine whether the program was functioning as intended or if any changes have to be made. A good example of this is the sound and screen resolution.

Unit 22: Developing Computer Games – Adam Slowikowski

Originally, the resolution was 1920 x 1080 so that it can be played on larger monitors. However, there is no scaling therefore people playing on smaller monitors wouldn’t be able to play the game properly due to the screen being zoomed into the very centre. This made the game unplayable as it was unstable and unenjoyable to play. After doing some research, 1366 x 768 is the average monitor resolution most people have and I settled for that. This improved the gameplay and performance of the game.

The sounds had many changes regarding to the theme that the game was based on. Some of the sounds such as the music could still is heard when the game ended which was very irritating. This had to be fixed by making the music run in the background and stop when the player dies. Luckily, Greenfoot had commands just to do that which allowed me to play the background music while the game is played but when it ends, the music stops and the death music is played clearly and not over the background music.

Also, whenever I had to add in a new feature, I would always refer to the feedback given by green foot if it ever crashed. An example of such is when a music file couldn’t be found in my documents which didn’t allow the game to play properly and crash. This was fixed by assigning the proper file format (.mp3 instead of .wav)

Greenfoot allows quick error checking and provides feedback to the user whenever a variable could be wrong or causes an issue with another class. This allows changing variables in another class very quickly. An example of this is if I change the name of the Actor and variable “MarioWorld” to just “World”, the enemies won’t be able to spawn nor the player. Greenfoot gives feedback about this error and what areas are affected.

REFER TO THE RED AREAS IN THE PICTURES

Unit 22: Developing Computer Games – Adam Slowikowski

Testing: Expected result:

Actual result:

Evidence:

Screen resolution

The game should be running in a static resolution 1366 x 768 and run on the greenfoot site.

The screen resolution was correct and could fit on all monitors when playing the game.

Borders The player should be able to travel to the opposite border when crossing the initial border

The player was able travel to the opposite side.

Player Movement

When UP, DOWN, LEFT, RIGHT were pressed, the player would move correspondingly in that direction.

UP sped up the playerDOWN slowed the playerLEFT turned the player leftRIGHT turned the player right

AI Movement

The AI would spawn and move in one direction depending on their facing rotation

When the AI spawned, they moved at a fixed rate in a certain direction.

Death mechanics

When the player touched an enemy, the game over screen would pop up and end the game.

On contact, the game instantly shows game over in the middle, death music is player and the player can’t move as the game ends.

Music and sound

Background music should play, player firing should play whenever a bullet is fired,

Upon the game launch, music is played in the background.

It’s hard to provide evidence for raw audio files. Please go to the official site where the game is published to test the audio.http://www.greenfoot.org/scenarios/20664

Unit 22: Developing Computer Games – Adam Slowikowski

and enemies should have a death sound when killed.

Player firing sounds correctly. Enemy death sounds are played when a bullet collides with them.

Player firing Should have a fixed fire rate (the speed at which it shoots) and sound when fired.

Whenever the SPACE key was pressed, the bullets fired every second or so and played the bullet media file.

Scoring system

Score should be displayed in top-left, yellow. Whenever an enemy is killed, points are awarded.

Upon killing various enemies, points are added up to the total score in the top-left.

Data dictionary for testing methods:

Name: Definition: Usage:Black box

Software testing method to see how the internals work when no information is known by the tester.

White and black boxes can be used in programming to collect data regarding what the expected result should be. One example is for the movement. When a player presses one of the corresponding keys to move, the player moves in that direction. This is to be expected as the programmer intended for this to happen and should correspondingly.

White box

Software testing method to test internals with an expected result by the tester.

Feedback and improvements.

While not a lot of feedback was received, there was some that consisted primarily of:

o 1. Adjusting the screen resolution to fix most monitors.o 2. Changing the speed of the player so it doesn’t go too fast.o 3. Making the score more rewarding instead of small digits.o 4. Adding more sounds

Unit 22: Developing Computer Games – Adam Slowikowski

In response to the feedback, the following changes were made:

o Removing the 1920 x 1080 original screen resolution to a suitable 1366 x 768 (This fixed many performance issues and player enjoyment)

o Reduced the acceleration of the player to a more suitable speed to be played comfortable. (This was done by changing values for the acceleration code)

o Made the Koopa award 100 points and the Goomba award 50 points.o Custom sounds were added for all interactions e.g. player fire, enemy death

sounds, game over music and background music.

F.A.Q.

Some frequently asked questions are about the main controls. The best way to learn the game is refer to the Player Manual however, here is a quick brief.

Q. What are the basic controls for Mario?

A. SPACE is to FIRE, UP and DOWN control the SPEED of MARIO, LEFT and RIGHT rotate in the corresponding direction.

Q. What are the basic controls for Luigi?

A. F, W and S control the SPEED of LUIGI, A and D rotate in the corresponding direction.

Q. What is the objective of the game?

A. Defeat endless waves of enemies to achieve the highest score.

Q. How do I start the game?

A. Just below the screen of the game, there is a RUN button. Once pressed, the game will run.

Player Manual

Key: Function: Objective:UP Speed up player 1 Try to survive as long as you

can with another friend or player against endless waves of enemies and attempt to reach the highest score possible.

DOWN Slow down player 1LEFT Rotate left player 1RIGHT Rotate right player 1SPACE Fire player 1W Speed up player 2S Slow down player 2A Rotate left player 2D Rotate right player 2F Fire player 2RUN Starts the game

http://searchsoftwarequality.techtarget.com/definition/black-box

https://www.webopedia.com/TERM/W/White_Box_Testing.html

Unit 22: Developing Computer Games – Adam Slowikowski

http://softwaretestingfundamentals.com/differences-between-black-box-testing-and-white-box-testing/