Pages

Wednesday 9 December 2015

Assignment - Creating a Game (Shapeman)

Shape-Man Game Sketch
For this assignment, I have been making a game called "Shape-Man," which is a variant of Pac-Man. The aim of the game is to move around a maze like level, collect pills (to get score) and kill enemies. However, there's a slight twist. The enemies move around randomly, and they change shape randomly (they change between circle, cross, triangle, and pentagon.) The player can only kill enemies if they are the same shape. To do this, the player must touch the stationary shapes that are placed in the map, these will turn the player into that shape. There is also a timer in the middle of the map that shows the player which shape will be next, by displaying the number of sides the next shape has. The game is never-ending, which means it cannot be beaten. The player can die, however, and they have 3 lives. 

Here you can see the room for the game. In this sketch I have not included enemies, however they are scattered around the room and begin moving in random directions when the game starts. The shapes that you can see in this picture are the stationary shapes that the player has to touch to become that shape. In the middle you can see the timer that displays which shape will be next, and at the top the score and amount of lives that the player has. In terms of score, the player gets 1 whenever they pick up a pill, and 100 when they kill an enemy. There are 100 pills in total, and I have shown them in this sketch by drawing thin blue lines. 

Shape-Man Sprites
Shape man uses several different sprites, and you can see them on the left. I created these sprites myself with Game Makers built in sprite editor/creator. Some of them, such as the pill and wall, I drew with just the pen tool. To create others however I used things like the circle tool and square tool etc. Below there is also a screenshot of the sprite editor. On the left you can see the various different tools, in the middle you can edit the sprite, and on the right you can change colours. You can see my square sprite in the middle.

































Shape-Man Objects

On the right you can see a list of all my objects. Each object does has a different purpose, and to get some of them to function properly I had to use code.

Obj_Controller

Obj_controller may be last on the list but it is the most important because without it all the other code wouldn't work! This is because the controller contains a piece of code called "Variables." This code contains the global variables, which are things that all of the other objects can use. The controller also draws the score on the screen (makes the score visible for the player) and sets the colour of the score font etc.



Here you can see the global variables. You will see these in the code used for the games other objects too. I will go over some of the main ones.

Number and Countdown = 200 are involved with the game ticks and the random shape changing of the enemies.

Myshape = the players shape.

Spriteto and Spritenext = irandom(4); are for when the enemy shape changes. It makes sure that the enemy changes to any random shape out of the 4 that are available. 

idied = whether the player has died or not.



The next code is in a step event. This code is involved with the countdown. The first line "if irandom(number) > 50" makes the games enemy change countdown random. Line 8 "if countdown < 1" is saying "if the countdown is lower than 1" (it runs out) then the actions on line 10-14 should be performed. When the countdown runs out, the enemies sprite should change and it should change to a random one (spriteto = spritenext; and spritenext = irandom(4);) Lines 17 and 19 are saying that if there are no more enemies in the room (if instance_number(obj_enemy) < 1) a message should be shown that says "ran out of bad guys." This message along with any other debug messages are shown in this section of Game Maker (highlighted with red box,) which is separate from the game window itself:


Obj_fwall & Obj_cwall

Obj_fwall and cwall have the same simple function, they are walls. They stop the players from getting out of the map and they give the map it's maze-like shape (they are named slightly differently because of the sprites used. F stands for front, and c stands for continuing. This just helped me tell them apart properly and made sure I didn't mix them up.) These two objects have no code and the only thing I did to them was make them solid.

Obj_square, circle, triangle, pentagon and cross

These 5 objects are the stationary shapes placed in the room, and if the player touches them they become that shape. I have not used any code for these objects directly, however there is code related to these objects in other areas, which I will get on to later.

Obj_enemy

Obj_enemy is the enemy of the player. The enemy will bounce around the room randomly and change shape. To get the enemy to work as desired, code was needed. I will show the code below.
                    



The first line of this code sets the speed that the enemy will move at. In my game the speed is 0.6. Not all enemies will move at 0.6 however, and the +random(2) allows this. Line 2 allows the enemies to move in a random direction, and this is easy to understand because of the way it's written. It says that the direction should be random, and they objects are free to move 360 degrees. I will not show the next piece of code under the "alarm event" because it is the exact same however it does not use the line 1 code.



The next code is used when obj_enemy collides with obj_me (obj_me is the shape that the player controls.) This code controls whether the enemy is destroyed or not when the player collides with it. In terms of what this code does, let's focus on line 6-9 first. "case 0" is basically saying "if obj_enemy is a circle." We can tell it's about a circle because it uses the number 0, which is the amount of sides a circle has -1. The next line, "if spriteto == 0 then killedit = true;" is saying "if the players sprite is a circle (0) as well, then the enemy will be killed when the player collides with it." The next line "else idied = true;" is basically saying "if the player is anything other than a circle, the player will be killed." At the end of the code, (lines 29-37) it is saying that "if we kill the enemy, it's instance should be destroyed." It will also up the players score by 100 if an enemy is killed.



This next code is in a "draw event" for obj_enemy. This code is telling the enemy which case = what sprite. For example, when the enemy changes to case 0, it is changing to a circle because a 0 is the number of sides a circle has -1.


Obj_enemy is also set to bounce off solid objects e.g. the walls. This stops the enemies from leaving the game map.




Obj_me


Obj_me mainly uses drag and drop features but does include a little bit of code.









Firstly I have obj_me set to stop moving when it hits a wall. This is an easy way of using collision with the drag and drop features




I then have collision events set for when the player collides with a stationary shape. All the shapes work in the same way so for an example I will show you the square. 


Here you can see the drag and drop action that turns the players sprite into the square when the player collides with the square.



The code is quite simple and includes a global variable that tells the game what the value of the shape is. For square it is 3, and as I've said before it's the number of sides the shape has -1.



The rest of the events in obj_me are keyboard controls. Set to the arrow keys. The player moves at a speed of 2.5 when using the controls.










Obj_pill

The last object to talk about is obj_pill, which is what the player picks up to get score. The player is given one point when one pill is collected and there are 100 in total.


All that obj_pill has to do is disappear when the player collides with it, and up the players score by 1.

The Room

The room is the area in which the game takes place. Below you can see a picture of the room for Shape-Man.



Gameplay video
https://www.youtube.com/watch?v=4NCHqv1fjy8

What could be done to improve the game?

My friend Tom played Shape-Man and from his feedback I know what I could do to make the game more interesting. Firstly I could animate the sprites. By animating the sprites it makes the game look more interesting and visually appealing. Secondly, I could have used a wider range of sounds. Maybe sounds of the enemies pinging off walls, or my character exploding when I die. Thirdly, I could try harder to fix major issues with the game, for example the countdown in the middle. The countdown is an important feature and like me my friend struggled kill the enemies sometimes because he didn't know what they were going to turn into next. And even though the player can easily be told in a manual, the number of remaining lives should be displayed on the screen.

Game Manual



Assignment - Understanding The Video Game Industry

Unit 13: Understanding the Video Games Industry
Top 5 Current Trends in Gaming

1. The Oculus Rift (Virtual Reality Gaming)

The Oculus Rift is a virtual reality device that people can wear over their eyes while they play games. The Oculus is designed for first person games, and allows the player to see the first person view of the game through their own eyes, as if they were really there. The Oculus has one screen per eye, each one running at a 1080x1200 resolution, 90hz refresh rate and a wide field of view. The headset also comes with built in 3D sound.

Financial Information
The creator of the Rift, Palmer Luckey, came up with the idea for the Oculus Rift himself, and made his first prototype in his parents garage at the age of 18. When it came to making a proper version of the device, and not a shoddy one that had been duct taped together, a Kickstarter campaign was put up. The Kickstarter raised $2.5 million. The first version of the Rift, the Development Kit 1 (DK1) was available for backers who pledged at least $300 on Kickstarter. Later on the general public were able to purchase the device for $300 from the Rift site.

Market Trends
The idea behind the Oculus Rift was to create a great VR headset that would be inexpensive for gamers, so the plan was to make something suitable for gaming. This is why the Oculus supports a high resolution, refresh rate and field of view, because these are all big selling points for gamers. Especially the wide field of view, because low field of view can cause sickness for some individuals. The Oculus Rift has many competitors, the main ones being the HTC Vive that is being made by HTC and Valve corporation, and the Microsoft HoloLens, a headset that allows the user to see and interact with holograms.


2. Esports

Esports has been around for a while, but with more people getting into competitive games such as Counter-Strike and League of Legends, it has grown even more over the past few years. If you are unaware, Esports is when professional players who have mastered there chosen game, compete against other major professional players/teams. With games like Counter-Strike and League of Legends, big tournaments are sometimes held, with the grand prize usually being a lot of money. I think the reason that Esports has grown so much is because people can play the same games at home and become good at them too. These games also offer competitive modes for normal players, so they can play properly as a team and use tactics.

Financial Information
Professional players don’t just make money by winning tournaments and they are usually offered a salary. Some players prefer to live stream on sites like Twitch because this is a safer/more reliable way of earning money. This is because you can have lots of people watching you play daily and viewers are able to donate to the streamer or subscribe to them. Expensive in game items are also donated sometimes. This year SuperData Research said that globally the esports industry generated about $748.8 million in revenue. In terms of countries, Asia is currently in the lead with over $321 million, North America $224 million and Europe has $172 million. They have also estimated that by 2018, global revenue should reach $1.9 billion.

Market Trends
Esports has moved out of the arena and into stores too. Companies such as Razer and Steelseries (companies that make gaming peripherals) sell products that are licensed by big esports teams and include logos etc. In game stickers and player skins related to certain players and teams can also be purchased in games like CS and LoL, with some of the money going to the players.


3. Free-to-Play Gaming

Free-to-play games have been around for over 10 years and are still popular today. They are games that are completely free to install and play however optional things (known as microtransactions) can be purchased in game. Some popular free-to-play games are Team Fortress 2, League of Legends and Dirty Bomb.

Market Trends and Finance
As I mentioned before, there are things known as microtransactions and these allow players to purchase items in game. Usually the items players can purchase are purely cosmetic, e.g. weapon camos in Counter-Strike (some of which cost hundreds of pounds on the Steam community market, seriously), and some in some games you can buy boosters that boost the amount of in-game currency you earn per match. Some unbalanced games are classed as “pay-to-win” because the players that pay for in game items are at an advantage when compared to players that don’t pay. Free-to-play games aren’t just on PC and you can find them on all kinds of devices. Big games like Candy Crush can be found on the app store and the developers make lots of money from in-game purchases.


4. Video Game Modding

Video game mods are things created by the community that add things to a certain game, or change features for the better. An example of a game series that has a big modding community is Fallout. For the Fallout games (New Vegas, 3 and 4) people create optimization mods, mods that improve visuals or reduce them for older PC’s, new storylines, NPC’s, weapons etc. These mods are mainly uploaded to a site called Nexus Mods, the site has a huge community and there are a variety of mods to choose from. For the PC in particular, free mods have grown in popularity with the introduction of the Steam workshop, a massive addition to Steam where players can upload game add-ons and mods and other players can download them easily with a click of a button. Valve introduced paid mods on Steam earlier this year, but they were met with massive amounts of negativity from users. There were big problems with copyright (mods being sold by people that didn’t even make it) and bad prices. Not long after the introduction of this feature, Valve listened to the community and removed it.
Below is a Fallout: New Vegas graphics enhancement mod.

5. Counter-Strike’s in game items

I have previously spoken about microtransactions however I feel that Counter-Strike: Global Offensive (CS:GO) deserves it’s own spot. A few years ago, Valve introduced the community market and workshop as features on Steam, and microtransactions within CS:GO. The workshop allowed players to be creative and upload their own weapon camo designs. If they gained enough votes they would be put into CS:GO with the next weapon case update. Weapon case updates add a new case to the game, which contains several weapon skins, each varying in rarity and price. The rarest item you can get is a knife. Cases are earned by playing the game and they can also be bought off the community market for a cheap price. To open the cases however, you need keys which cost about £1.69 each. This is how Valve make money off the game. When cases are opened you are given a random item from the case. Sometimes people open up items that can be worth hundreds of pounds, and they can be sold for real money on the market and can be bought by other players. (Valve take some of the money away from the seller.) Websites such as CSGOJackpot exist and these are gambling sites but you lose or gain weapon camos. There are websites such as CSGOLounge where players can trade items and make profit. I have had experience with CS:GOLounge and managed to get up to an item worth £150! The in game items on Counter-Strike are so popular and people put so much money into it it’s almost like it’s become Valves own mini industry. Players can make money and Valve can make money off the players making money…if that makes any sense…


Top 5 Future Trends in Gaming

1. Virtual Reality Gaming

I included virtual reality gaming in my top 5 current trends, but it is also classed as a future trend because lots of big virtual reality devices haven’t actually been released yet. The big one, the Oculus Rift hasn’t been experienced by as many people as it would have over the next few years because it isn’t being officially released until 2016. The only people that have their hands on Oculus Rift development kits are people who backed over $300 on Kickstarter and reviewers. The final version/near final version has not been given out to the public yet. The Microsoft HoloLens, that allows the user to interact with holograms has also not been realised yet, and this is one that will most likely be very popular because it can be used with Minecraft, one of the most popular games at this point in time. In the future, VR will continue to become better and better and it will become more affordable, easier to develop and easier to access, and it will be used by both gamers and non-gamers.

2. Indie Gaming

Indie gaming is already a thing, however I believe the industry will grow bigger and bigger in the future. If you are a bit clueless, Indie games are made by small independent teams and sometimes by single individuals. Some Indie games can often be just as or more successful as big triple A titles, because they boast their brilliant story-telling, art styles and innovative gameplay. It is also easier for indie developers to get their games out there. Websites such as IndieGoGo, Indie Fund can be used to gain funds for the game and make it a reality, and Steam has it’s own built in publishing system known as “Greenlight.” Developers can post their games, get support and feedback from the community and get their game onto the Steam store. Steam Greenlight is also quite affordable, and you pay £70 once and are able to post and update whatever you want.


3&4. Portable Gaming and Game Streaming

I've put portable gaming and game streaming in the same category because in some ways they are similar.

Portable gaming has been around for a while, with Nintendo leading with their Gameboy and DS consoles, however with the release of the 3DS and the New 3DS (yes they are different,) portable gaming has become more enjoyable with improved graphics running on more powerful hardware. Hardware is only going to get better and better and in the future we could be seeing console-like graphics on portable devices. The console-like graphics could not just be achieved through great hardware, and could also be done with streaming. An example of a current streaming device is the Nvidia SHIELD, which is a portable device that allows you to stream games from your PC directly to the Shield, which means you can play anywhere in your house. If streaming becomes more powerful people could move out of their house and play big games on the go!


5. Video Game Graphics and Realism
Games with stunning graphics already exist, and while some people may think that graphics can't possibly become more realistic, that is not the case. In the not so distant future, hardware will be so good that graphics will look extremely realistic, and virtual reality may not even feel that virtual anymore...
Believe it or not, the image below is a computer render! Some visual effect artists have said that by 2022 we will be unable to tell real life film and video game graphics apart.