maxpower

Weblog aboth GameMaker challenges.

Challenge6

Problem:

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.

Solution:

This one was harder than the rest because at the start I couldn’t work out what to do from the hints but after a while I knew what to do. First of all I created the two sprites one foe the ball and one for the wall. Then I started the coding for the ball the first thing was CREATE and make it random (360). Now it was onto the hardest part the STEP event of the ball. In this STEP event I made that if an expression is true and I made it (y 32), you can change 32 to wherever the goals are. Then I made it the start of a block a few things must go in this block and they are, set the score to one, create an instance of the ball in the middle of the screen and finally destroy the instance on the original ball then end the block. The last thing I did was make it that when it hit the wall it bounced off.

Help: For this one I really needed the help of the hints.

Challenge 6

March 31, 2006 Posted by | Challenges | Leave a Comment

Challenge 11

Problem:

Push a rock

Solution:

This one is relativly simple. This is what you have to do.

Create two sprites, a roch and something to puse it.\

For the character that is pushing the object make the move events like this,
Left: Start moving in a direction(Left) at any speed.
Right Start moving in a direction(Right) at any speed.
No Key: Stop moving in any direction.
Make it solid!

Now the code for the rock.

When it collides with Push
If an expression is true push.direction=0
Make push whatever the pushing object is called
If a position is collision free x=24 y=0 only solid and make it relative,
Jump to a given position x=24 and y=0 make it relative.

Thats it this will make the object push the rock.

Help: I didnt need any help for this one because it was so easy.

Push Rock

March 3, 2006 Posted by | Challenges | 1 Comment

Challenge 10

Problem:

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

Solution:

This one is is the hardest problem yet because I have to add so much code.
Create 2 sprites a ball or any object and a wall.

For the movement of the ball you must set what happens when you hit the keys.
Up- If there is a collision at a position x0, y1 make it relative , and set the verticle speed to -10

Left- If position is collision free x-4, y0 make it relative. Make it jump to a given position x-4, y0 make it relative.

Right-If a position is collision free x4,y0 make it relative and jump to a given position x4, y0 make it relative

You must make it that when it hits the wall it stops.
Collision event with block, move to contact position direction is direction, maximum is 12 and solid objects. and set the verticle speed to 0 to make it stop moving.
Step Event for the Ball

Coment check in air.
If a position is collision free, x0,y1 relative.
Set the gravity, direction 270 and the gravity 0.5
ELSE
Set the gravity, direction 270 and the gravity to 0.5.
Coment: Limit Verticle speed.
If variable has a value, variable is vspeed, value is 12 and the operation is larger than.
Set the value of a variable, variable is vspeed and the value is 12.

Make the wall object solid or the ball will slip through.

Help: I didn't need any help for this one.
Challenge 10

March 1, 2006 Posted by | Challenges | 1 Comment

Challenge 9

Problem:

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

Solution:

This one is easy because you you start off with problem 8 and then add a few things.
In the create event for the player set canshoot to true. Then In the Alarm 0 event set the variable canshoot to true or 1. Then In the Space bar event I set the variable canshoot to false and set the alarm0 to 30, and thats all you have to do to make the player have to wait one second to shoot.
Create Event

Set value of variable canshoot, value 1 or true.

Alarm 0

Set value of variable canshoot, value 1 or true.

Press Space

Set value of variable canshoot, value 0 or false
alarm0 to 30,

Help:

For this one I just needed to read the hint throughly.

Shoot

February 28, 2006 Posted by | Challenges | 1 Comment

Challenge 8

Problem:

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

For this one I started with challenge 4, then changed a few things.

The first thing I changed was the enemy object
In the create event for this I set the number of lives to 3.
Then in the Step event I made it that when there are no more lives it destroys the instances.
I also made it that when the bullet hits the enemy is destroys one life by setting the number of lives to -1 relative.

Help: I didnt need any help for this one.

BULLET

February 27, 2006 Posted by | Challenges | 1 Comment

Challenge 7

Problem:

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

Solution:

This one is relatively simple because all you need is the one object and no sprite, you just need to know the code.

First I made the object and called it time, then in the Events tab I made create and set a variable of mytime to 0, also in this event I set alarm 0 to 30. Then in the events tab I made I made alarm 0 and set the variable mytime to 1, I also set the alarm 0 to 30.

Lastly in the Events tab I selected draw and set draw a text. In the TEXT box you have to enter the following code 'time = ' + string(mytime) and set x to 0 and y to 0 and then the text will be displayed in teh left top of the screen.

This will make the counter count up.

Help:

I didnt need any help besides the hints.

Timer

February 27, 2006 Posted by | Challenges | 1 Comment

Challenge 5

Problem:

Make one object follow another object
Solution:

This is the 5th challenge for the class and was still easy it was a bit harder than the rest. To start with I created the sprites then it was on to the objects. First of all I made the moving object, create and mover random 360. Then to keep it in the room I made it that when it collides with the wall it bounces off. Then for the following object I made it a step event and action move to a point, I made this obj_move.x, and obj_move.y at a speed of 5.

Help:

For this one I didnt know how to do it at first but then I read the hints on the sheet and understood it.

Challenge 5

February 22, 2006 Posted by | Challenges | 2 Comments

Challenge 4

Problem:

When a bullet hits a character, the character explodes and the explosion then disappears. Provide information about how to play the demonstration in Game Information.

Solution:

This problem requires a bit more skill than the last one du e to the fact that it has more objects to deal with. I started off with problem 3 because the character was already moving and the code was already there. So the first thing I needed to do was get two more sprites an explosion sprite and an enemy sprite. I needed to add some code to the bullet so in the event it I made it that when it collided with the enemy it was destroyed. Then in the event for the enemy I made that when the enemy collides with the bullet it changes into the explosion, and finally in the events for the explosion I made that when the animation of the explosion finished it was destroyed.

Help: This one I didnt need any help because I knew what to do.

Challenge 4

February 22, 2006 Posted by | Challenges | 1 Comment

Challenge 1

Problem:
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.

Solution:
To solve the problem I needed to create the sprites of ball and wall and then the objects. Then in the properties for the ball I made the direction random(360) and a speed of 5. I also made it that when it hits the wall it bounces random(360).

Help:

For help with this one i just needed to aks someone elsa about the random(360) thing.

Game

February 20, 2006 Posted by | Challenges | Leave a Comment

Challenge 2

Make an animation from a strip sheet of stills.

a) one where all the slides are the same size (easier)

b) another where the slides are of varying sizes (harder)

Problem 2(a)

For this challenge I had to find a sprite sheet with an animation that moved. I chose the Astro sprite sheet, then I had to go to, FILE(create from strip).

Then I has to get the size of it right adn click ok. After this the rest are the same you have to click, FILE(add from strip) for each one.
Once all the images are in your done.

Problem 2(b)

This problem is pretty much the same as the first one, but I had to start with the biggest one first then I had to add the rest and resize them.

Help:

I didnt need help for this one because i have done it before.

Astro

February 13, 2006 Posted by | Challenges | 2 Comments

Follow

Get every new post delivered to your Inbox.