Task 11

Push a rockTo make this problem you have to firstly make a character so go “Add Sprite” then “load sprite” then choose a sprite in this case I chose the ‘pacman_stand.’ Then you have to “Add Sprite” for the stone which can be found in the “Various” folder. Then press ok.

The next step is to make objects for all the sprites. For the “object character” put in the “character” in the sprite and check the solid box. Go “Add Event” and choose keyboard left make x: -5 and for y keep it zero then check relative. Then go “Add Event” then choose keyboard up and for y: -5 and for x keep it zero and check relative, then press ok. Go “Add Event” and choose keyboard then choose right then in x: 5 and in y keep it zero, check relative and press ok. Finally go to “Add Event” and go to keyboard then choose down and make y: 5 and keep x zero, check relative and press ok.

Next you have to make an object for the “Stone.” Put in “stone” in the sprite and tick solid. Go to “Add Event” and choose the “Collision” event then put in the “Object Character.” For its actions put in “If a position is collision free.” This can be found in the control tab. Make x: 32 and keep y: 0 next put in Objects: only solid check relative and press ok. The next action you have to put in is the “jump to given position” which can be found in the move tab. When the box appears change x to 32 and keep y: 0 then check relative and press ok.

Now we have to “Add Room.” Make the grid 32 by 32 and put in the character and two stones. Then press the green arrow and try it out!

Published in: on September 21, 2006 at 3:06 am  Comments (2)  

Task 10

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

Information about object: obj_pacmanSprite: spr_pacman Solid: trueVisible: trueDepth: 0

Persistent: false

Parent: <no parent>

Mask: <same as sprite>

Step Event:if expression place_empty(x,y+1) is trueset the gravity to 1 in direction 270else

set the gravity to 0 in direction 0

Collision Event with object obj_wall:set the vertical speed to 0Keyboard Event for <Left> Key:move relative to position (-4,0)Keyboard Event for <Up> Key:if relative position (0,1) is not collision free for Only solid objectsset the vertical speed to -15Keyboard Event for <Right> Key:move relative to position (4,0)

Published in: on September 21, 2006 at 3:04 am  Leave a Comment  

Task 9

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

Load a character sprite and a bullet sprite.

Add an object and use the bullet sprite. Click on add event, create. Drag the red arrows, under the move tab, into the action section. When the popup appears, click only the up arrow. Type how fast you want the bullet to go in the speed section.

Add another object and use the character sprite. Click on add event, create. Drag set the value of a variable, under the control tab, into the action section. When the popup appears, type canshoot into the variable section. Also, type 1 into the value section.

Click on add an event, keypress, space. Drag if a variable has a value, under the control tab, into the action section. When the popup appears, type canshoot into the variable section. Type 1 into the value section, and select equals to in the operation section.

Drag both start and end of block, under the control tab, into the action section. In between them, drag create instance of an object. When the popup appears, select the bullet object in the object section, and click the relative box.

Also between the blocks, drag set the value of a variable. When the popup appears, type canshoot in the variable section, and 0 in the value section.

Also between the blocks, drag set an alarm clock, under the main2 tab. When the popup appears, type 30 in the number of steps. and press ok.

Click on add an event, alarm0. Drag set the value of a variable, under the control tab, into the action section. Type canshoot in the variable section, and 1 in the value section.

Test this by putting the character in a room, and pressing space. You should only be able to shoot a bullet every second.

Published in: on September 21, 2006 at 2:53 am  Leave a Comment  

Task 8

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

I recommend you only attempt this after you finish problem 4.

Load up your problem 4 game.

Open the enemy object. Click on the create event. Drag set the number of lives, under the score tab, into the action section. When the popup appears, type 3 in the new lives section. Click ok. Click on the already made collision with bullet event. Drag set the nuber of lives, under the score tab, into the action section. When the popup appears, type in -1 in the new lives section. Click the relative box, then ok. Delete the change instance into explosion.

Click on add event, Step. Drag If lives are a value, under the score tab, into the action section. When the popup appears, type 0 in the value section, and select equals to in the operation section. Then drag both start of block and end of block, under the control tab, into the action section. In between these, drag change the instance, under the main1 tab. When the popup appears, select object explode in the change into section, and yes in the perform events section.

Test the game, to see if the enemy will explode after 3 bullets.

Published in: on September 21, 2006 at 2:53 am  Leave a Comment  

Task 7

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

Create an object. You do not need a sprite. Click on add event, create. Drag set the value of a variable, under the control tab, into the action section.When the popup appears, type mytime into the variable section. Type how long you want the timer to countdown into the value section. Drag set an alarm clock, under the main2 tab, into the action section. Type in room_speed, or 30, into the number of steps section. Select alarm0 in the alarm no. section.

Click on add event, alarm0. Drag set the value of a variable, under the control tab, into the action section. When the popup appears, type mytime in the variable section. Then type -1 in the value section. Tick the relative box.

Click on add event, draw. Drag draw a text, under the draw tab, into the action section. Type ‘time =’ +string(mytime) into the text section. Leave the x and y sections 0.

Put this object in a room, and play it, to see if it works.

Published in: on September 21, 2006 at 2:53 am  Leave a Comment  

Task 6

A ball goes through a goal and the score goes up by one…the score does not go up if the ball misses the goal

Add a sprite of a ball. Also add a sprite of goal posts (does not have to look like actual goal posts)

Add an object and use the ball sprite. Click add event, key press, space. Drag the blue arrows, under the move tab, into the action section. when the popup appears, type in 45+random(90) in the direction section. Type how fast you want the ball to move in the speed section. Click on add event, other, outside room. Drag jump to the start position, under the move tab, into the action section. When the popup appears, click self, then ok. Then drag the red arrows, under the move tab, into the action section. Click only the square, stop button, when the popup appears.

There are many ways of creating the goal system. I chose to create a goal object. Create an object and use the goal sprite. Click on add event, collision with the ball object. Drag set the score, under the score tab, into the action section. When the popup appears, type 1 in the new score section and tick the relative box. Drag jump to the start position, under the move tab, into the action section. When the popup appears, click on other. Drag the red arrows, under the move tab, into the action section. When the popup appears, click on other.

Test the game by creating a room, and putting a ball at the bottom of the screen, and if you followed my directions, put the goal only at the top. If you put different directions into the blue arrows on the ball, put the goals there.

Published in: on September 21, 2006 at 2:51 am  Leave a Comment  

Task 5

Make one object follow another object.

Add 2 sprites, they can be anything you want them to be.Add an object. Use the sprite you want to be the leader. Call the object leader.Click on add an event, Create. Drag the red arrows, under the move tab, into the action section. When the pop up appears, click all the arrows, but not the square in the centre. In the speed section, type how fast you want the object to move.

Click on add an event, other, outside room. Drag jump to a random position, under the move tab, into the action section. When the popup appears, click ok. Drag the red arrows, under the move tab, into the action section. When the popup appears, click on all of the arrows, except the square in the centre.

Add an object, and use the other sprite. Call the object follower. Click on add an event, step. Drag move towards a point, under the move tab, into the action section. When the popup appears, type in (leader).x in the x section, (leader).y in the y section. Type how fast you want the object to move in the speed section. Click on add an event, collision with leader. Drag jump to a random position, under the move tab, into the action section. When the popup appears, click ok.Open the leader object again. Click add an event, collision with follower. Drag jump to a random position, under the move tab, into the action section. When the popup appears, click ok. Then drag in the red arrows, under the move tab, into the action section. When the popup appears, click on all of the arrows, not the square. Type how fast you want the object to move in the speed section.Create a room, and put in one leader and one or more followers. Play the game to test if the follower moves towards the leader.

Published in: on September 21, 2006 at 2:50 am  Leave a Comment  

Task 4

When a bullet hits a character, the character explodes and the explosion then disappears.

To start this task, complete all of Problem 3, as it will make this problem easier to complete.

Once you have completed making a character move and shoot, add another sprite. Load a sprite you think will be good for an enemy.Create an object and use the enemy sprite.

To make the enemy move down the room, create an event on the enemy object. Click on create. Drag the red arrows into the action section, and when the popup appears, only click the down arrow. Then type in how fast you want it to move, in the speed section. The enemy should now walk down the room. Test this by putting an enemy object in a room and playing it.

Add another sprite in, of an explosion. Our animation was provided by our teacher. The animation should look like something exploding.Add an object and use the explosion sprite. Click add event, then other, then Animation end. Drag destroy the instance, under main 1 tab, into the action section, and when it loads, click on the applies to self.On the enemy object click on add an event, collision with the bullet. Drag in change the instance, under main 1 tab, into the action section. When the popup appears, under the change into section, click the explosion. Under the perform events section, click yes.

When a bullet from the character hits the enemy, it now should explode and the explosion should disappear.

Published in: on September 21, 2006 at 2:49 am  Leave a Comment  

Task 3

A character can move left and right with arrow keys (you have to keep pressing the key for it to keep moving) and fires a single bullet forward when you press space bar. You have to release and press space bar again for more bullets.

Add a sprite. Load a sprite you would like to use, eg a character or a space ship. Also, load a bullet sprite.

.
Create an object, and use the character sprite. Add an event, and click on key press, left. Drag the red arrows, under the move tab, into the action section and click only the left arrow when the pop up appears. Type how fast you would like the character to move under the speed section. Add another event and click on key press, right. Drag the red arrow keys, under the move tab, into the action section. When the pop up appears, only click the right arrow.

.
To make the character stop when the key is released, add an event, then click key release, left. Drag the red arrows, under the move tab, into the action section. Only click the stop button which is square, when the pop up appears. Add an event, then click key release, right. Drag the red arrows, under the move tab, into the action section. Only click the stop button which is square, when the pop up appears.
Test if the character moves by creating a room and putting the character object in it. Play the game and see if it moves.
Add an object and use the bullet sprite. Click on add event, create. Drag the Red arrow pointing down (set the vertical speed) into the action section. When the popup appears, type in the speed you want the bullet to move, with a negative in front. This will make it shoot up.

To make the character shoot bullets, click on add event on the character object. Then click on keypress, space. Drag the yellow light bulb (create the instance of an object), under the main 1 tab, into the action section. When the popup appears, in the object section, locate your bullet object. Then click on relative, so whenever you press space, a bullet will appear where you are.

To test the game, put your character in a room and when it loads, press space to see if it shoots.

Published in: on September 21, 2006 at 2:48 am  Leave a Comment  

Task 1

A ball bounces around a room and its direction is random. When the demo starts you can’t predict in which direction the ball will go. When the ball hits the walls you can’t predict in which direction the ball will go.

.

Find a sprite of a ball and put it into your game. Also find a wall sprite and put it in your game.

.

Create an object called wall and use your wall sprite. Then tick on the solid box.

.

Create an object called ball, and use your ball sprite. In you ball object, click on the add event button, and click on the create button. Drag the blue arrows (set the direction and speed of motion) located in the move tab, into the actions space, and type in random(360) in the direction section.

Click on the add event button and click on Collision. Select wall. Drag bounce against objects into the action section, and in the against section, select solid objects. Click on the control tab and drag both start of block, and end of block buttons into the action section. In between the two blocks, drag the blue arrows (set direction and speed of motion). In the direction section, type random(360).

.

Create a room and put a border of walls. Add some balls and play to test it.

Published in: on September 21, 2006 at 2:46 am  Leave a Comment  
Follow

Get every new post delivered to your Inbox.