h1

First Person Shooter essay

April 7, 2006

The video we watched in I.T was about a man’s son who had become unnaturally addicted to a game called Counter Strike. This game had kept the man’s son away from his family and school.

The kid’s father believes that he spends so much time on the computer so that he can avoid reality and the problems that come with it. The father had tried to ban his son before, but he just escaped to a LAN party place when this happened. He also tried to bribe his son by saying that if he stopped playing on the computer as much as he is now, he would give him a faster computer. This worked for a while, but his son eventually started playing again.

The father went around and asked a few of the kid’s mothers how their kid’s acted around their computers. One mother’s story was that she found her son up very late and went up to his room to turn the hard drive off. When this happened her son got very angry, grabbed her arm and gave her a look like he was going to kill her. He then threw up a desk in frustration.

The father knew that most children got games that were meant for older people like Counter Strike and when he gave a thirteen year old kid $80 to buy a game he bought a game that was rated 17+ without being asked for his age. His father was filming his son while he was playing on Counter Strike where his son never even noticed he was there. He had also come to his room to say hello a few times, but he had always ignored him.

His son had some trophies for sports before he started playing on Counter Strike and now has stopped playing sports because of his addiction to the video game. Near the end of the movie his father asked whether he would quit playing on Counter Strike and start studying or continue playing to which he chose to keep playing. This decision made his son drop out of school many times.

If I were the parent I also wouldn’t be able to do much and would have to let him decide how he wants to live his life. It isn’t much of a concern that it would happen to me since I have basically lost interest in games. My brother does have a slight addiction to a game called Counter-Strike: Source, but he doesn’t let it wreck his life since he knows when to play responsibly. MMORPG’s however, do get people addicted like World of Warcraft where I have seen people play for ridiculous amounts of hours.

I don’t think video games are too addictive since most people are able to choose when they want to play them or not. Most people would not be able to play on the same game for ages since it should naturally get boring because of the same scenes being played over and over. This would stop people from being addicted to games.

h1

Pong screenshots

March 22, 2006

This shows two variations of pong, the normal type and the optimized type.

pong.JPGpong dragons.JPG

h1

Problem 12

March 22, 2006

Make pong

Sprite: bat
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Other Event: Outside Room:
wrap horizontal when an instance moves outside the room

Key Press Event for Key:
start moving in directions 000100000 with speed set to 10

Key Press Event for Key:
start moving in directions 000001000 with speed set to 10

Key Release Event for Key:
start moving in directions 000010000 with speed set to 0

Key Release Event for Key:
start moving in directions 000010000 with speed set to 0

These are the controls for the player on the right side of the keyboard. When you press and hold a key the bat moves in the direction it’s assigned to and once the key is released the bat stops moving. Wrap horizontal is so that when the bat moves to the left or right side outside of the room it will reappear on the opposite side instead of continuously moving outside the room.

Sprite: bat
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Other Event: Outside Room:
wrap horizontal when an instance moves outside the room

Key Press Event for A-key Key:
start moving in directions 000100000 with speed set to 10

Key Press Event for D-key Key:
start moving in directions 000001000 with speed set to 10

Key Release Event for A-key Key:
start moving in directions 000010000 with speed set to 0

Key Release Event for D-key Key:
start moving in directions 000010000 with speed set to 0

This is basically the same as above except that the controls are meant for the player on the left side of the keyboard. This is the second players bat.

Sprite: wall
Solid: true
Visible: false
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:
set the score to 0

Collision Event with object ball:
set the score relative to 1
for all ball: jump to the start position
for all ball: start moving in directions 000010000 with speed set to 0

The set score to 0 is so the score for the player will start as 0 and not something else. When the ball colides with this invisible wall that should be set up behind bat it will score bat2 a point. It will also restart the ball back at the start and keep it idle until you decide to serve it.

Sprite: wall
Solid: true
Visible: false
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:
set the number of lives to 0

Collision Event with object ball:
set the number of lives relative to 1
for all ball: jump to the start position
for all ball: start moving in directions 000010000 with speed set to 0

This is similar to the other score wall object in that it is placed behind bat2 and is not visible. The lives are set to 0 so that bat2’s score is seperate from the other bat’s score and will add up normally. Like the other score object if the ball hits this object bat should score a point. It will also restart the ball back to the start and stop it from moving until you wish to serve.

Sprite: ball
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:
set the information in the window caption:
show score with caption Player one’s score:
show lives with caption Player two’s score:
don’t show health with caption health:

Collision Event with object bat:
reverse vertical direction

Collision Event with object bat2:
reverse vertical direction

Collision Event with object wall:
reverse horizontal direction

Key Press Event for Key:
if expression speed=0 is true
set speed to 10 and direction to random(360)

The set windows caption action is so that the score will display properly. The reverse vertical direction for the bat’s is so that when the ball colides with either bat the ball will go in the opposite vertical direction. The reverse horizontal direction on the walls are so that when the ball hits this invisible barrier it will bounce between the two wall barriers horizontally until the ball is hit or gets a point. The if expression speed+0 is true means that when the ball is going at speed 0 it will do the actions underneath it in this case moving the ball at speed 10 in any direction.

Sprite: wall
Solid: true
Visible: false
Depth: 0
Persistent: false
Parent:
Mask:
This is just a basic wall object which isn’t visible and should be set up at the sides of court so that the ball doesn’t escape.

If you did the above correctly you should be able to hit the ball back and forth between each other and be able to score. The score should be shown correctly and add up right. The ball also shouldn’t be able to escape the room and the ball should stay still when it returns to the start. When you press space at the start the ball should start moving in a random direction so you are able to start playing.

Pikmik helped me with this problem in setting up pong to be more fun. What I did after I finished this problem was that I changed the bat into a dragon that moved faster once a bat reached a certain score and made the ball move faster at the same score required to get a dragon. This may be something you might like to try.

h1

Problem 6 b

March 20, 2006

soccer.jpgGet a ball to shoot in four different directions at varying speeds.

To use the method here you will need your room to be the same size so that all the points will be correct for scoring. In settings on your room it must be 480 in width and height and you need to make five tiled spaces around the sides from the top,bottom,left and right with wall objects.
Sprite: ball
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Step Event:
if expression y is less than 0 is true
set the score relative to 1
jump to the start position
start moving in directions 000010000 with speed set to 0
if expression x is less than 0 is true
set the score relative to 1
jump to the start position
start moving in directions 000010000 with speed set to 0
if expression y is greater than 464 is true
set the score relative to 1
jump to the start position
start moving in directions 000010000 with speed set to 0
if expression x is greater than 464 is true
set the score relative to 1
jump to the start position
start moving in directions 000010000 with speed set to 0

The if expressions here are so that when the ball goes through these points the actions will happen therefore scoring a point and going back to the start without moving any further. You also must signify if the point is that number and greater or less.

Collision Event with object wall:
jump to the start position
start moving in directions 000010000 with speed set to 0

This is so that if the ball colides with a boundary the ball will return to the start and not get stuck there becoming idle at the start again.


Other Event: Outside Room:
jump to the start position
start moving in directions 000010000 with speed set to 0

This is just so the ball won’t keep on going out of the room and will allow it to get back to the start without moving.

Key Press Event for Key:
if expression speed=0 is true
set speed to 10 and direction to 150+random(60)

Key Press Event for Key:
if expression speed=0 is true
set speed to 10 and direction to 60+random(60)

Key Press Event for Key:
if expression speed=0 is true
set speed to 10 and direction to 330+random(60)

Key Press Event for Key:
if expression speed=0 is true
set speed to 10 and direction to 240+random(60)

Key Press Event for Keypad 2 Key:
if expression speed=0 is true
set speed to 5 and direction to 225+random(90)

Key Press Event for Keypad 4 Key:
if expression speed=0 is true
set speed to 5 and direction to 135+random(90)

Key Press Event for Keypad 6 Key:
if expression speed=0 is true
set speed to 5 and direction to 315+random(90)

Key Press Event for Keypad 8 Key:
if expression speed=0 is true
set speed to 5 and direction to 45+random(90)

The if expressions are so if the ball isn’t moving you can do the action underneath it. The up,down,left and right events are to allow the ball to go accurately through the goal and aime towards those points. If the direction is 150+random(90) it means that the ball will go randomly towards point 150 to 240. The number pad keys are less accurate points that will make the ball go sloppy and hit the boundaries more often.

If you have done everything correctly the up,down,left and right keys should shoot the ball through the goals accurately and score a point returning the ball to the start. The number keys should do the same thing, but make the ball go slower and less accurately. The score should also add up correctly and when the ball hits a boundary it should return to the start. Finally, the ball also shouldn’t keep moving once it has returned to the start.

I got help from pikmik for this problem in which he helped me to work out the position for shooting and scoring goals.

h1

Problem 11

March 1, 2006

push da rock.jpg

Push a rock

Sprite: mario!
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Keyboard Event for Key:
move relative to position (-4,0)

Keyboard Event for Key:
move relative to position (0,-4)

Keyboard Event for Key:
move relative to position (4,0)

Keyboard Event for Key:
move relative to position (0,4)

Sprite: rock
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Collision Event with object mario:
if expression mario.direction=0 is true
if relative position (24,0) is collision free for Only solid objects
move relative to position (24,0)
Make sure that the rock is solid so that if two rocks are together it doesn’t overlap it. All commands for the collision with rock can be found in the control tab and the move to relative position is the jump to given position action in the move tab. Also make sure that the grid is 24 by 24.

To test if this has been done right put a rock in a room and two rocks together and you shouldn’t be able to push the rock connected to the other one and be able to push the lone rock right. To push it in other directions for left make it x.-24 for north make it y.-24 and for south make it y.24.

I got help from Mr. Kerr to do this problem when understanding how to get the rock to move.

h1

Problem 10

February 28, 2006

A character jumps up off a platform, and return under the influence of gravity – you cannot jump from midair.

Iv’e decided that I will show the code in all the problems so it makes it quicker and easier to understand what to input for each problem.

Sprite: mario!
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Step Event:
if relative position (0,1) is collision free for Only solid objects
set the gravity to 0.5 in direction 270
else
set the gravity to 0 in direction 270
if vspeed is larger than 12
set variable vspeed to 12

Collision Event with object wall:
move in direction direction at most 12 till a contact with solid objects
set the vertical speed to 0

Keyboard Event for Key:
if relative position (-4,0) is collision free for Only solid objects
move relative to position (-4,0)

Keyboard Event for Key:
if relative position (4,0) is collision free for Only solid objects
move relative to position (4,0)

Key Press Event for Key:
if relative position (0,1) gives a collision with Only solid objects
set the vertical speed to -10

In the tutorial I used it suggested that up be for jump although I think a keypress space action is better suited for jumping. Make sure that the platforms are low enough for you to jump onto and if they are not set the gravity higher. Make sure there is a floor for your character sprite to walk on otherwise you will continuously fall. To make the problem better you could also add enemies to avoid and I suggest that you go to pikmiks blog to find out how to do this.

I used a tutorial to work out how to do this problem and had pikmik help me slightly during this problem.
platform.jpg

h1

Comments

February 27, 2006

I have left comments on these blogs: coded3.wordpress.com, pikmik.wordpress.com, murasame.wordpress.com, maxymous.wordpress.com, cerspo.wordpress.com and 03077nguyen1.wordpress.com. These sites have also been added to the blogroll.

h1

Problem 9

February 24, 2006

A character fires a bullet and has to wait one second before being able to fire the next bullet.

To start off you could use problem 3 to have all the objects there already or you could just create them again.

In your shooter sprite add a create event then add set the value of a variable action from the control tab. In set the value of a variable type in the variable tab canshoot and in value type 1. Next make an alarm event then add set the value of a variable action and in it type canshoot in the variable tab and type 1 in the value tab. Next make a keypress space event then add to it if a variable has a value action. In if a variable has a value type canshoot in the variable tab and 1 in the value tab. In operation keep it at equals to then make a start and end of block from the control tab. In between them add the create an instance of an object action and in it make the object your bullet making sure the position in x and y matches where you want to shoot then click relative. Add in set the value of a variable action and in it type canshoot in the variable tab and 0 for value. Next add the set an alarm clock action and make the number of steps 30. The above three should be inside the blocks.

Next you need to make a bullet to shoot so go to it’s object and make a create event. In the event add the start moving in a direction action and click the up button. Make the speed what you want it to be then make a room to test your ship in.

If you did it correctly it shouldn’t matter how many times you hit the spacebar, it should shoot the bullets slower. I give full credit to pikmik for helping me do this problem. As for the screenshot, once again it would be just a ship shooting a bullet so refer to problem 3.

h1

Problem 8

February 21, 2006

You have to hit a character 3 times with a bullet before it dies.

First of all if you have saved problem 4 load it up or if you haven’t do it again. Go to your enemy sprite and delete everything from it them make a create event. From the score tab add a set the number of lives action then in new lives type 3. Now add a collision with bullet event and put in a set the number of lives action and type in -1 being sure the relative box is clicked. Add a destroy the instance action and make sure other is clicked. In the control tab add a start of block then from the score tab add if lives if a value action and keep it at 0. Add another start of block then put in a change the instance action and make it an explosion. Put in two end of blocks and now you should be ready to test if it works.

If you can shoot the enemy 3 times and it turns into an explosion then you have done the problem. I got murasame to help me do the destroying of the enemy when lives are 0 part of the problem. The screenshot will be the same as problem 4 so check that to see how it should look.

h1

Problem 7

February 20, 2006

timer screenshot1.jpgMake a timer which counts up or down how much time is left to play

First of all you’ll need to make a step that can be used in a room. Create an object then add a create event to it and put in the set the value of a variable action. Type in the variable tab mytime then set the value to about 30 or more. Now add the set an alarm clock action and type in number of steps, room_speed. Now add an alarm event and add in set the value of a variable action then in variable type in mytime and make the value -1 being sure to click the relative box. Add in a set an alarm clock action and type in number of steps, room_speed. Finally make a draw event and then use a draw a text action. Type in the text tab ‘time= ‘ + string(mytime) and keep x and y at 0. Add the step to a room and then play the game and the timer should be counting down.

To make the timer count up go to the create event then go to set variable mytime action and make the value 0. Now go to the Alarm 0 event and in the set variable mytime action type 1 in the value tab. It should now count up from 0.

I needed no help to do this problem.