Pages

Wednesday, 25 January 2017

Unit 66-67 - 3D Modelling and Animation - Assignment 3

Intro
In class we have been tasked with creating 3D models for our Killer Klowns games in Maya. Since I am working in a group of 3, each of us have been working on separate things. I have been primarily working on weapon models, and other assets for my level, whereas the other members of my group have been working on character models. 

Clown Rifle & Pistol
I started off by making some weapons for the clowns in our game. Most of the clowns will use ray guns which is the same as what they use in the film. I got my inspiration/ideas for these weapons from the candy floss ray guns that the clowns use in the film. I also looked at other ray gun images online to get some ideas. Below is an image of my Maya model, and a ray gun from the film. As you can see, the original gun has quite a wacky and random design. Because of this, I didn't use any images in Maya for reference, and instead created the model off the top of my head. However you will notice some similarities in my model, such as the rounded body and barrel. The colour scheme is also very similar, however the colours on mine are solid and more vibrant. The colour of the weapons might change in the future depending on whether we give it to a regular clown, or a more important enemy. I chose random colours, because any bright colours will match with the theme of the clowns. 



Untextured model


To create the model I used basic polygons such as the sphere (for the body,) square (for the handle and fins on the gun,) pipe (for the barrel and rings around the barrel,) and a cone (for the end of the barrel.) I edited the subdivisions to add more faces and edges, which allows me to edit the polygons more. For example, on the handle of the gun I created finger indentations by selecting and dragging faces inwards. I used the smooth tool on the main body of the gun and the handle. The smooth tool applies lots of faces and makes objects much smoother and less jagged.  
To colour the gun I added a lambert material to all of the polygons, then changed the shape. Objects with lambert applied to them have a matte finish. After adding a material to something you are able to change the colour to whatever you like. 

The clown rifle is extremely similar to the pistol as it uses the same polygons. It is just a lot bigger/longer. Lots of ray guns seem to have smaller bodies and extremely long barrels, and you can definitely notice this with my rifle. On the right is a good example of this. The rings around the barrel also seems to be a recurring theme with ray guns, so I used that as well. 




Baseball Bat 
The player in the game will just use basic melee weapons. The first one I created was the baseball bat. This was quite an easy model to make and only took a few polygons. I used a cylinder for the top half, increased the subdivisions and moved the faces inward at the bottom. The top half has a light wooden texture, which I found online, applied along with the lambert material. The bottom half/handle is made from a smaller cylinder, and also uses the lambert material, however has a solid grey colour applied to it. A torus (ring) is used for the bottom of the handle. The last thing I did was smooth it.

I used a proper wood texture for this model because our game has a fairly realistic style. With the clown weapons we are able to make them look stupid, because they match the enemies that will be using them. However, since the main character is Mike (a human) he needs a more realistic weapon/something that anyone can use. The player (Mike) will obtain the weapon at the start of the game, and will be able to use it to attack clowns throughout the game. 




Balloon Dog
Similar to the film, the balloon dog in our game will be an enemy along with the clowns. You could also refer to it as a weapon that the clowns use. I went with a traditional and recognisable style with the balloon dog, and used an image of a metal statue by a man named Jeff Koons for reference. 

The model is made up of 12 spheres that I have resized and stretched, and I used a small cone for the end of the nose. Since a balloon dog can be any colour, I just decided to make it blue. Along with the colour I applied the blinn material which gives the dog a shiny effect, and makes it look like the light is reflecting off it. I also changed the transparency to make it look more realistic. 


Log Cabin
Since the level I have created takes place in a snowy environment, I wanted to create some houses that would fit in with it. I am currently using houses from the Infinity Blade: Ice Lands pack, however they will eventually all be replaced with my own. 

To create the model I first created the base by using a flattened and stretched cube. After that I built the walls. This was quite simple and I was able to be quite efficient by copying and pasting cylinders in groups. Each of the cylinders had their subdivision axis upped to 13 to make them a bit more smooth, and after I had finished placing them all I merged them together. When things are merged they all become one object. The roof is quite similar to the base and is made from 2 flattened cubes, put into a triangular position and merged together. I later decided to add a chimney at the back of the house which is made from 2 cubes that have been merged. I increased their subdivisions so I was able to edit them more.

I plan on adding a wooden texture to this model, and a cobblestone texture to the chimney at the back. 

.
Evaluation
Overall I am fairly happy with how my models have turned out. I haven't got much Maya experience but I managed to create what I was aiming for. Things that I want to improve on are texturing and details, and this is something that I will work on before these models go into the game. I think the ray guns look okay with solid colours, but I really need to get some wood textures on my log cabin. The baseball bat texturing is ok, but could definitely be improved. The balloon dog definitely turned out great, however the creation process was quite simple.

Feedback from Kori: "Overall good designs. Something you could improve on is texturing, and you could use realistic textures and details instead of solid colours."

Tuesday, 13 December 2016

Unit 6 - Assignment 1: Task 2 (Critical Approaches to Creative Media Products)

Game Title: Doom 3




Genre: Sci-fi, survival horror, first person shooter.

Selection of content: Doom 3 is a very dark game that involves the player moving around corridors and science labs etc. It is quite a scary game and includes some jumpscares, and lots of atmosphere and ambience. The colours used are quite gritty and dark.

Construction of content: Unlike the original Doom, which focused on fast paced first person shooter gameplay, Doom 3 is mainly story driven and is a lot slower paced. It is also quite linear, and the play has to keep advancing through levels. There isn't a great deal of exploration. 

Narrative conventions: You play as a anonymous space marine who has been sent to the UAC mars base. While there, an experiment goes wrong and a portal to hell is opened up. Demons invade the base and possess most of the staff that are working there. It is the players job to go through the base eliminating all of the demons. 

Codes and Conventions: The game includes standard first person shooter things, such as health, ammo and armour that you can pick up. Doom 3 includes mainly traditional FPS weapons such as a pistol and machine gun. There are also some other guns such as the cyber gun and the BFG.

Target demographic: Doom 3 is quite gory and has photo realistic graphics (they are very dated now but at the time they were great.) Because of this the game is aimed at people who are at least 18 years old. The game also mainly targets males.

Game Title: CarnEvil



Genre: Light gun rail shooter, horror.

Selection of content: CarnEvil is an on rails shooter/arcade game (the in-game character moves on his own, and the player points a light gun at the screen and shoots enemies) that involves the player moving around a haunted amusement park. The levels are quite colourful and obviously have a very heavy circus/amusement park theme. The enemies that are used are very freaky, especially for people who have a fear of clowns or other circus related things. A lot of gore is also included, and as you shoot the enemies they become more bloody and injured.

Construction of content: The game contains 3 main levels that can be played in any order, and a final boss level which can only be played once the other 3 levels have. Each level ends with a boss battle. Because the game is an on rails shooter, it is extremely linear, and the player cannot explore or do anything other than shoot the enemies on the screen. CarnEvil is also an arcade game that is played on arcade cabinets. Because of this, the game requires credits to play, and whenever you die you have to insert more credits to continue.

Narrative conventions: You play as an anonymous guy who is on a ghost tour riding through a graveyard. He jumps off the ghost tour to explore the graveyard and finds a tombstone with a jesters face on the top. He inserts a golden token from the bottom of the grave into the jesters mouth, and the amusement park begins to rise out of the ground. There isn't really much else to the story. Your character becomes trapped and he has to fight his way through the park.

Codes and conventions: The game is fairly fast paced because you are shooting constant waves of enemies. The game doesn't show different weapons on the screen as there are no first person hand/gun models. However the player can obtain different weapons by shooting floating power ups. The game includes a shotgun, machine gun, flamethrower, acid bath gun and a magazine increase. It is quite easy to play and anyone who has had experience with FPS games will know exactly what they are doing.

Target demographic: Because of the games gore and creepy content, it is definitely aimed at older teens and adults. I think males be primarily interested in this game, however because of its wacky and sometimes amusing theme I think any teen or adult could enjoy it.

Game title: not decided (my Killer Klowns game)



Genre: First person shooter, horror, action.

Selection of content: Our killer klowns game will be a first person shooter and have about 4 playable levels, one of them being a tutorial. The game will feature different environments, some quite dark, creepy and claustrophobic, and some more open and bright. The game will involve killing killer klowns, talking to NPC's and completing other various objectives.

Construction of content: Our game is fairly linear but does involve some exploration with our bigger levels. The player goes through 3 levels, the last one ending with a boss fight.

Narrative conventions: In the game you play as Mike, one of the main characters from the film. Mike has become and alcoholic, because nobody outside of Crescent Cove believes that the killer klown attack actually happened. Each of the levels in the game is based on Mikes dreams, while he is locked in a prison cell for public intoxication. The player finds out about the dreams at the end of the game when Mike wakes up in his prison cell.

Codes and conventions: The game will be a first person shooter, and will use a health bar with a general looking HUD. Since the levels are based in Mikes dreams, we will probably make some changes such as giving the player unlimited ammo and wacky guns from the film, such as popcorn and candy floss guns. Standard weapons such as baseball bats will also be included.

Target demographic: The game will be aimed at teens around the age of 16 and above, and will not really be targeted at a specific gender. People who enjoyed the film and or are obsessed with the film may get some enjoyment out of the game. 

How were these games marketed?

Doom 3: Doom 3's TV commercial starts with people telling the viewer that they "will not survive," "it will be painful," and "you're doomed." This sets a serious tone for the ad and the game. This is then followed up with a montage of in game footage, showing the various horrific in game demons and monsters. Metal music plays in the background which fits with the action happening on screen. The high-octane ad gets viewers hyped up about the game and you can clearly tell that the target demographic is teen/adult males.

CarnEvil: CarnEvil is an arcade game and is quite old. The game could only really be found in arcades (you can emulate it on PC as well.) The only reason I know about CarnEvil is because I saw it in an arcade years ago. The arcade cabinet itself and the interesting, eye catching artwork used could count as a method of marketing, because if it gets the attention of people in the arcade, then lots of people will want to play it and it will make money. I personally found this game quite unique and interesting compared to other games in the arcade, which is why I have remembered it for so long. 

Despite CarnEvil being very gory and freaky, anybody could play it really, especially if it's in an arcade since it's very accessible.

How would we market our Killer Klowns game?

Since Killer Klowns has a very specific fanbase, advertising for the game would probably be done in more specific ways. The game could be advertised on a site such as the Killer Klowns wiki, because it is a site that fans would most likely visit. We could also post it to a social media site such as Reddit. Reddit has things known as "sub-reddits," which are reddit pages with posts dedicated to certain topics. Each sub-reddit has it's own community and dedicated users/posters. If we posted the game on Reddit in a game dev related sub-reddit, lots of people would see it. No matter how we would do it, it would have to be on the internet, even if this was a proper game being published. Killer Klowns in general doesn't have enough fans for a TV ad or anything greater.

Monday, 28 November 2016

Unit 66 & 67 - Be Able to Devise 3D Models

Game Brief

For Wayne (Video):





For James:

Idea 1:

Characters - Mike Tobacco, Debbie Stone (protagonists from the movie)
Nameless character/hunter (game protagonist. Player has the option to call them whatever they want.) 

Setting - Crescent Cove Town, California (Location from the film.)

Plot - 28 years after the killer clown incident from the film (2016,) the killer clowns return to the town of Crescent Cove in an attempt to fully destroy everything and everyone there. The protagonist (player) receives a call from two people who claim to have dealt with the killer clowns before, Mike and Debbie. They talk to you about the possibility of another invasion, and ask you to leave your classified location and travel to Crescent Cove.

Gameplay - In the game, the player starts in the town. While there, the player will have to complete tasks from the townsfolk such as defending them from clowns, or fetching a certain item for them. After completing the quests in the town, the player will be able to travel to different areas. Towards the end, the game could become more linear, and the player will be guided to boss battles etc. The player can enter the police station to refill on ammo, and any of the shops in the town to get health.

The game will be played in third person, and will use the standard PC controls (WASD, space, shift etc.) Or it will be played from a top-down perspective and will control like an ARPG game (mouse to move and target enemies etc.)

Things I Will Need For The Game

Models

  • Townsfolk
  • Clowns
  • Weapons (Crossbow, pistol)
  • Cars
  • Houses
  • Trees
  • Circus tent
  • Other random objects (boxes, bins etc)
Audio
  • Background music
  • Footsteps
  • Shooting sounds (alien ray guns, pistols, bows)
  • Clown laughter/zombie/alien noises
  • Ambient sound
  • Fire
Alternate Game Idea/Idea 2

Characters - Mike Tobacco, Debbie Stone

Setting - Crescent Cove Town, California

Plot - The game will use the same basic plot as the film. Killer clowns have invaded the town of Crescent Cove.

Gameplay - The game will involve the player moving around the town to different locations with the task of defending a house, object or human in that area for a set amount of time. Upon completing an area, the player will be guided to the next area. After completing every area in the town, the player will be tasked with going into a big circus tent, where they will fight a boss. The player gets points for successfully defending areas, and loses points for failing to defend areas. Point's will add up and will be shown to the player at the end of the game. They will be able to put their name and score into a leaderboard. The player can also run out of ammo and of course lose health and die. Ammo and health packs will be placed in set locations around the town, and the player can walk over them to pick them up. 

The game will be a first person shooter and will use standard PC controls.

Things I Will Need For This Game

Models
  • Townsfolk
  • Clowns
  • Weapons (Crossbow, pistol)
  • Cars
  • Houses
  • Trees
  • Circus tent
  • Other random objects (boxes, bins etc)
Audio
  • Background music
  • Footsteps
  • Shooting sounds (alien ray guns, pistols, bows)
  • Clown laughter/zombie/alien noises
  • Ambient sound
  • Fire
Idea 3 - Final Idea

This idea was created when we started group work. I am working with Kori and Josh.

Characters - Mike Tobacco

Setting - Different places from Mikes dreams. Snowy village, a castle and an abandoned temple.

Plot - After the Killer Klown invasion, nobody believes Mike and Debbie. Eventually they break up, and Mike becomes an alcoholic. Mike is put in prison overnight for public intoxication, and while he is there he dreams about several random and weird scenarios (the levels.) It is not until the end of the game that the player finds out the levels were all dreams, as Mike wakes up inside his cell with an officer telling him that it's time for him to leave.

Gameplay - The game will be a first person shooter, and the levels will involve killing klowns. The levels may include NPC interactions and dialogue. A tutorial level will also be included at the start of the game, showing the player the controls and the aim of the game etc.

Things We Will Need For The Game

Models
  • Townsfolk
  • Clowns
  • Weapons (Baseball bat, cotton candy guns, popcorn guns)
  • Houses
  • Boxes/Barrels (Cliche red barrel)
  • Candy cocoons 
  • Balloons
  • Collectables (Clown noses)
  • Big top(s)
Audio
  • Background music
  • Footsteps
  • Clown laughter
  • Attack sounds
  • Ambient sound
  • Fire/torch sound

Legal and Ethical Considerations

When creating a game, you have the be careful with the content that you include in it. Below I will talk about some legal and ethical considerations.

Copyright
A copyright law gives a creator of something the rights to what they have created. This means that you can't steal something from someone else and put it in your game. If you plan on selling the game, you will not get away with it and there will be consequences. This could be anything ranging from concept art to in game models and sounds. 

Intellectual Property
Intellectual Property (also known as IP) is a creation that owned by it's creators by law. The creation is protected by copyright.

Libel
Libel is false information that can damage someones reputation. Libel is often in print, writing and pictures etc. The libel law stops people from saying things like "Our game is better than their game" and other things that are classed as defamation.

How are female characters represented in games?
The way that female characters are portrayed in video games often causes controversy. Lots of video games over-sexualize women and show them as objects.

Race and Religion

It is important to respect different races and religions in games. In the past, certain games have caused controversy such as Call of Duty: Modern Warfare 2, which included a mission called "No Russian." In this mission, the player takes part in a massacre in a Russian airport as an undercover CIA agent, killing many civilians.

Specification

Target Audience
Our game is aimed at teens around the age of 15. The game will include references to alcohol and fear, however alcohol drinking isn't shown or encouraged. 

Key Visual Themes
Our game will be dark, mysterious and eerie. There will be lots of ambient sound and visual effects such as fog.

Constraints
The computers we are using in college are extremely powerful, so I don't think we will run into any major constraints. We all have fast 1TB external hard drives, which is plenty of space for what we are creating. However we could run into performance issues if our game isn't optimized very well. When we get near the end of game development we will try to optimize it by remove unnecessary models and assets. 

Friday, 25 November 2016

Unit 69: Assignment 1 - Drawing Concept Art for Computer Games

What is concept art? Why is it used?

Concept art is essentially an artists early ideas of what something in a game, film or other form of media might look like. By drawing concept art, an artist and or development team can get an idea of what something will look like, and they can make changes to the design before deciding on the final product. In this assignment I will talk about how concept art is used for computer games.

The use of concept art in games

Concept art is used for many different things in games. Characters, landscapes, buildings, vehicles, gadgets and more. For this assignment I will be using examples from the game Titanfall 2, a futuristic first person shooter.

Here you can see the concept art for robot multiplayer characters. 


These robotic characters have a very futuristic and sleek style. Unlike robots you may see in other games/other forms of media, these ones aren't very bulky and are quite advanced. In the game they are able to fight like human soldiers, and are very mobile since they use advanced movement and parkour. 
The characters have quite serious look to them and give off a serious mood. I think this is because of their faces, and how they lack any human expression. They just have a single blue light. They look like they have no other purpose but to fight.
The colour scheme is quite gritty as well, which adds to the serious mood.




There are also human characters in Titanfall 2, here you can see some of the faction leaders from the game.

Unlike the robot characters above, these characters play a more important role. You can tell they are more important by what they are wearing, as their clothes look quite unique. These characters are used in the singleplayer story, and they player has to fight them as bosses at various points in the game. This is why they have unique and recognisable appearances. Their facial expressions also give the player a better idea as to what they might be like and how they act.
The mood is serious, and some slightly brighter colours are used, probably to make them stand out more.


Concept artists don't just draw characters, and large landscapes and game scenes are also drawn. Below you can see a drawing of a huge battle taking place. This image uses a dark, gritty colour scheme, which gives the scene a serious tone/mood. The way the colours have been used, and the way the landscape looks reminds of a WW1 no mans land scene. It's muddy and wet, things have been destroyed, and there are people fighting amongst all of it. Obviously there is a futuristic feel to it. You can see Titans in the background, and the soldiers aren't hiding in trenches. Instead they are running and gunning out in the open. This fits with the game since the soldiers use advanced movement and parkour, and can move around very fast.


Concept art for devices and gadgets has also been drawn. Below you can see several designs of an arc tool. Something that allows the player to time travel. As you can see, the artist drew several different versions of the device until he got one that he liked (The one used in the game is the middle right one I think.) The smaller ones look better in my opinion, and more futuristic. It wouldn't really make sense to use one of the huge ones, because technology is quite advanced in the game, so the device being quite small is believable. These designs use a similar colour scheme to the other drawings I have talked about. 


Stages of Concept Art

Concept art goes through a few stages when it's being drawn. Below, you can see a concept art image for the character Zer0 from Borderlands 2. The artist has used the usual stages of drawing concept art.

Stage 1: The first stage of drawing concept art is to do some basic sketches. By doing this, the artist won't spend too much time one one design to find out it won't be used. They can create many designs and put all their ideas on to paper.

Stage 2: The artist then picks out a sketch that he likes (or multiple sketches) and begins to refine it and shade it, to get it looking more like the final result.

Stage 3: A final design is then chosen, and the art is used to help create a 3D model on the computer. The concept art is important because it allows the 3D model to be created easier. The 2D image can be imported into the modelling software, and the model can be created on top of it.

Stage 4: At first, the model will look plain and colourless, but then the textures are added. You can see the final textured model on the right. The model is now ready to be animated and used in the game.


Titanfall 2 images from conceptartworld.com
Borderlands 2 image from Google Images.

Tuesday, 22 November 2016

Assignment - Space Invaders Game

Introduction

For the second part of this assignment I am going to be making a remake of Space Invaders in GameMaker. If you are unaware, Space Invaders is a game where the player controls a cannon at the bottom of the screen, and you have to shoot the endless waves of aliens that gradually move down the screen before they get to you. As you kill enemies, they get faster and harder to hit. They can also destroy the barriers that you use for cover. I will put a video of the original Space Invaders below:

In this written part of the assignment I will show you step by step how I made the game and what code I used. I will also show you the assets I used (sprites etc.) To help make this game, I followed a detailed YouTube tutorial that shows the code step by step and explains what it does.

Assets (Sprites and Objects etc)

These are the sprites used for Space Invaders. As you can see there are not many! I tried to do pixel perfect copies of the original sprites because I wanted retro graphics. Each sprite used a 32x32 box, but the sprites were quite a lot smaller.







The sprites were created with GameMakers built in sprite editor, which I will show below.



The alien sprites are also animated. They each have 2 different poses that they change between as you play the game. Below is an example of alien 1's animation.



Spr_barrier sort of has animation, however it only changes when it is hit by an alien bullet because the point of the animation is to show the barrier taking damage.



The objects and their functions will be described below, and some of them don't really need a detailed explanation. I will describe a couple here.

Obj_controller is placed in the room and allows the background music to play. The blank obj_alien is also like a controller. It is a parent alien that controls all of the other aliens. This saves time as you don't have to put code and events into each individual alien. 










I also have some sounds in the game which I created myself/with classmates. I have a background track the same as the one from the original SA, however I created it with my voice. The player shooting sound is a random sound that we picked up in the background while recording, however when a wahwah or phaser effect is added to it, it sounds like a laser. The alien death sound is a simple beeping sound that we got from pressing the buttons on a printer. And the player death sound was originally me hitting some bed sheets, however I upped the bass to make it sound like a muffled explosion. Each sound is an mp3 file, and was edited and exported in Audacity.




1) Player Movement

In Space Invaders, the player can only move left and right, so not a lot of code is needed. The first thing I did was add some simple movement code in a step event for obj_player. This code simply checks whether the player has pressed the left or right arrow key (you can only move left and right in Space Invaders) and moves them along the x coordinate.


2) Alien Movement

In Space Invaders the aliens move left or right as a group, and when they hit a wall the move down and then continue in the opposite direction. The movement for the aliens takes a bit more code than the player movement. Firstly, I made some global variables in the create event of obj_player. This includes the global alien count and the direction that the aliens will move in.


(alien count went down to 45 shortly after.)

Next up is the alarm. The alarm is used to speed up the enemies every time 10 of them are killed. There are 2 separate alarms, the first one is in the create event of obj_alien, the second one is in an alarm 0 event of obj_alien.




This code is a main part of the movement. It lets the alien know that when it hits the edge of the map that it is time to change direction. The alien will move down, and will begin moving in the opposite direction (left or right.)



Next up is a step event in obj_alien. This code is also for the aliens changing direction. If the aliens reach certain parts on the map they will change direction.





3) Player Shooting

Player shooting is getting the player to fire a bullet when they press space. The first bit of code is in an obj_player spacebar event. This code adds a new variable called "fire" and it simply creates an instance of the bullet when space is pressed. The alarm is used to stop the player from shooting too fast, since that would make the game a little bit too easy.





Fire=true is also put into a separate alarm event.



Then I went into the bullet object and added some code. First I added a create event, which simply sets the vertical speed of the bullet after it has been fired by the player. 



Then I added a collision event with obj_alien, which destroys the alien instance when the bullet hits it. The bullet itself is also destroyed in the process.



 Lastly, there is a small bit of code in an outside room event, which destroys the bullet if it misses the aliens and leaves the room.



4) Alien Shooting

First, I went into the create event in obj_alien. I added fire=true, which of course just allows the alien to shoot. Front=false stops enemies that aren't on the front row of the group from firing. If all of the enemies could fire, then they would be shooting each other.





Then I went into the step and added lines 10-15. This code checks whether there is space in front of the aliens, so that they can fire without hitting other aliens. If there is space in front of them, front is set to true, if not it is set to false.




I then went into the alarm 0 event and added a shooting section at the bottom. This stops the enemies from shooting constantly, and gives them a 1 in 7 chance of shooting a bullet.





Then I added and alarm 1 event and added fire=true, which allows the enemies to fire.





I then added a create event to obj_bulletalien and added vpseed=4. This is half the speed of the players bullets.





5) Lives

In Space Invaders, when the player dies they go invisible for a short period of time and then respawn. This next code in obj_alienbullet is in a collision event with obj_player, and it checks whether the player can take damage or not. If the player is visible, then they can be hit by the bullet and they will lose 1 life, however if they are invisible (respawing) then they cannot be hit. Like the player bullet, the enemy bullet is also destroyed upon impact.





I also added another outside room event that destroys the enemy bullet if it leaves the room.



When the player dies, the game also freezes for a short period of time. During this period all bullets in the room are destroyed. To do this, I simply added this code in a step event for the player bullet and alien bullet which destroys all bullets while the enemy is invisible (respawning.)



We also want to enemies to stop moving while the player is respawning, and to do this I simply added a line at the top of the movement code in the alarm event for obj_alien. This line only lets the aliens move if the player is visible.




Now we move on to adding the lives to the player, first a variable needs to be created in the create event called live=3, and then in the step event we use code that restarts the game when the lives are lower than 0.





Next I created a font for the HUD.




Next I put a draw event in obj_player that puts HUD/text/lives on the screen.





6) Barriers

Whenever the barriers are hit by the aliens, they are weakened slightly, and damage is shown on the barrier. The separate stages of damages are inside the sprite, like an animation. However, we don't want the barrier to be constantly animating through these stages, so we add image_speed=0 to make sure it doesn't animate normally.





Then, inside a collision event for obj_alienbullet and obj_barrier, we use this code. This code checks which stage of damage the barrier is on. There are 3 stages of damage, so if the barrier isn't on stage 3 and is hit, it needs to move up to the next stage. However, if it goes higher than 3 it will be destroyed. The bullet that hit the barrier will be destroyed as well.




If the players bullet hits the barrier, we don't want the barrier to be damaged, so all we want to do is destroy the bullet on impact.





7) Bonus Spaceship

First, we want to set the hspeed, which is done in a create event in obj_ship.




Next, just like the bullets we want to make sure that the ship despawns when it leaves the room. We cannot use the outside room event for this one though, because the ship spawns outside the room, so it would be destroyed instantly. Instead we will do it in a step event. This code is basically saying that if the ship is at an x coordinate that is greater than the room width, it should be destroyed.



Next we need to set up and alarm that spawns in the ship. This alarm is done in obj_player because it's something that is always on the screen. The alarm spawns in a ship every 12-15 seconds.



This other part of the alarm spawns the ship outside the room.



8) Score

In Space Invaders you get a different amount of points depending on which enemies you kill. This means that we will have to make some separate events for each alien. These collision events are done in obj_playerbullet. First however, we need to create a points variable in obj_player.




Next some short code is put into a bullet collision event with each alien. The aliens at the back give 30 points, the middle ones give 20, and the front ones give 10. The bonus ship gives 100 points. Each alien uses the same code but with different points.