Problem 11

March 31, 2006 at 3:29 am (Game Maker, Uncategorized)

Push a rock

Okay, another one of these thingummyjigs. This one, you have to push a rock around, n'stuff.

Sprite: sprStatue
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: no parent

Mask: same as sprite

This particular event is to move the statue, and make sure that the statue only moves if there is nothing in its way.

Collision Event with object objCharacter:

for all objCharacter: if expression direction=0 is true

if relative position (24,0) is collision free for Only solid objects

Sprite: sprCharacter
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent: no parent

Mask: same as sprite

Okay, This Object is the thing that pushes the block around, and does basically everything.

The first event is to tell whoever is playing how to use the game.

Create Event:

display message: Use the Imp's Psychic powers to float around an push around the statue.

These following two events are movement events, making the character move.

Key Press Event for Right Key:

set speed to 3 and direction to 0

Key Release Event for Right Key:

start moving in directions 000010000 with speed set to 0

I needed absolutely no help for this one, I'm getting quite independent.

Permalink 1 Comment

Soccer Extension, In other words, Problem 6.1

March 24, 2006 at 3:51 am (Game Maker, Uncategorized)

This Blog is about how to make the problem 6 easier to understand, and easier to shoot for goal. Using this kind of configuration is slightly easier, and allows you to do more.

(This first object is to sit there and do nothing, except cause the ball to bounce back to the start.)


Sprite: sprWall

Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:
(this next object does everything, making it do everything, jump to the start etc. You'll see)

Sprite: sprball

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

(This event is a long winded event, which is to make sure that if the ball leaves via a particular way, which is up in this one, the points go up by 1)

Step Event:

if expression y smallerthan 0 is true

jump to the start position

start moving in directions 000010000 with speed set to 0

set the score relative to 1

(This event is to make the ball bounce against walls)

Collision Event with object objWall:

bounce precisely against solid objects

(This event is to make sure that the ball doesn't cause points to pile up [ie give lots of point for nothing] when the ball goes outside via the north ( y smallerthan 0 ) and to get the ball back at the beginning when the ball is out the room)

Other Event: Outside Room:

start moving in directions 000010000 with speed set to 0

jump to the start position

(The following events are to enable two types of shooting for goal when you press either the 8 button or the 5 button on the keypad [NUMLOCk off!]. The one with the numbers 60+random(60) is called "accurate shooting" and has a narrow shooting range[60 degrees]. The other one is called "sloppy shooting" and has a wide shooting range [90 degrees])

Key Press Event for Keypad 5 Key:

if expression speed=0 is true

set speed to 5 and direction to 45+random(90)

Key Press Event for Keypad 8 Key:

if expression speed=0 is true

set speed to 10 and direction to 60+random(60)

Also, If you're looking for apicture of this in action, view my older post, Problem 6.

this whole problem was easy, with the help of the sheet that the teach. gave me. So, tehnically the teach. helped me. 

Permalink 1 Comment

More Xbox 360 plus other stuff. Which means a tip on how to make an object move around.

March 22, 2006 at 4:17 am (Game Maker, Off topic, Uncategorized)

Okay.

Tonight’s the night. there’s a midnight release, and I’m going to go. I can’t wait. i think I might miss a little of school, however, I do have a test tomorrow, so I do have to think about it.

Anyway, I’m going to tell you how to do something else with gamemaker.

I’m going to tell you how to make a creature walk around in a circle.

First, A sprite would help.

Then, create an object with that sprite.

In the [create] event, set alarm2 for an amount of time (something like I dunno 90 steps), and set the direction to up (or 90) Also, set the speed to something reasonable like 5.

Then, In the [alarm2] event, change the direction to either left or right (or 0/180) , and set the next alarm (alarm3) for the same amount of time as the previous one. Also keep the speed the same.

In [alarm3] event, change the direction to down (270) and keep the speed the same. Set alarm4 to the same amount of time as the previous one.

In [alarm4] event, change the direction again to the last remaining direction which would left if you chose right first, and right if if you chose left first. Keep the speed constant. Then, set alarm1 (ahh, you think, there it is!) to the same as the ones before it.

Finally, in alarm 1, copy tyhe evnts you had in the create event,and paste them. This should make an eternal loop that causes the object to go in a square forever. And that’s a simple example of how to use alarms.

Okay, Hope that helps you make… I dunno, some sort of game.

Permalink 1 Comment

How to make a Rain simulator on gamemaker.

March 21, 2006 at 12:23 am (Game Maker, Off topic, Uncategorized)

Okay.

Once when I was totally bored, I decided to make a rain simulator. So, I decided to tell you how to make it. It’s really quite simple. First, all you need is a rain sound effect, you’re likely to have one somewhere on your harddrive if you play games like morrowind or something.

You may also want something like thunder and a dripping sound effect, for background purposes.

Create an object with the event [create] then add the event [play sound (insert title of rain sound) yes looping.]

That takes care of the rain.

Now for background effects, you need an alarm. Set an alarm in the create event to a random number (make it high, you don’t want the sound straight away), and add the event [Alarm1] and add the action [play sound (insert title of drip or thunder) no looping] Then sett the alarm 1 again, so it’ll go off again later, set it to something like [random(something fairly high)]

It’s a good way to waste time and get to sleep easier as well.

You could also probably use it to make a cool game that takes up a lot of memory. With the alarms, you could create objects like lightning that destroy themself after a few seconds.

Permalink 2 Comments

Problem 8… AGAIN!

March 1, 2006 at 11:45 pm (Game Maker, Uncategorized)

Arghhhh!

Something went wrong with my post, and I don’t know what it was, so I’ll write this post again.

Make the bullet before you make your shooter. My shooter is some kind of snake, my bullet a rupee, my enemy a cute bunny, and there is also an explosion.

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

(this is to set the speed of the bullet, so it moves when it is created)

Create Event:

set the vertical speed to -4

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

(This is to create a bullet when you press a key, wherever the shooter goes) 

Key Press Event for Key Space:

create instance of object objbullet at relative position (0,0)

(These are for moving the shooter when you press a key)

Key Press Event for Key Left:

set the horizontal speed to -2

Key Press Event for Key Right:

set the horizontal speed to 2

(These are for stopping the shooter when you release a key)

Key Release Event for Key Left:

start moving in directions 000010000 with speed set to 0

Key Release Event for Key Right:

start moving in directions 000010000 with speed set to 0

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

(This event is to give it lives, so it doesn’t die if I hit it once with the bullet) 

Create Event:

set the number of lives to 3

(This event is for many things. This prevents the bullet from killing sprBunnyRabbit with one hit because it doesn’t disappear, and it also changes the sprBunnyRabbit into an explosion if it has no lives) 

Collision Event with object objbullet:

for other object: destroy the instance
set the number of lives relative to -1

If lives are equal to 0

change the instance into object objexplosion, yes performing events

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

(This is to destroy the object when the animation ends, so it doesn’t loop forever) 

Other Event: Animation End:

destroy the instance
end the game.

As I said before, I needed no help for this one, and the pictures is below.

Permalink 1 Comment

Problem Number 10

March 1, 2006 at 4:19 am (Game Maker, Uncategorized)

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

Okay, It’s time for a new format for my game maker problems. It’s exactly the same as before, but, instead of me typing manually, I cut and paste, as well as add comments.

Okay, first create a sprite, He (or she) will be your jumping guy. I made mine a snake, as you can see. And make a wall sprite. Then create objects with the sprites you have, with the same attributes as below. I had to make a wall object (and sprite) first, and its attributes are visible below.

I needed heaps of help from Pikmik for this one.

(This object covers all the events, including the events for the other object below, objwall)

Sprite: sprsnakey (The jumping character)
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

(The following is to create constant gravity)

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
COMMENT: limit vertical speed
if vspeed is larger than 12
set variable vspeed to 12

(The following is to prevent our character from falling to his death, in an eternal pit of fallingnes. ie, so he stops when he reaches the ground) 

Collision Event with object objwall:

move in direction direction at most 12 till a contact with solid objects
set the vertical speed to 0

(The following are direction buttons, so you can move around, and jump)

Keyboard Event for Left Key:

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

Keyboard Event for Right Key:

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

Key Press Event for Up Key:

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

(This object does not need events, as we covered all the events in the one object, obj snakey)

Sprite: sprwall (the wall)
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:


Okay, click the picture below to view it fully.

Screenshot10.jpg

This also goes for the ones in the Shadow of the colossus post.

Permalink 7 Comments

Problem Number 9

February 24, 2006 at 3:41 am (Game Maker, Uncategorized)

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

Okay, this problem is really hard. I had to get some help from Pikmik for this one.

Open up your problem number 3 or 4 file. Then, Open up your character that shoots. add some of the following stuff.

event [create] with action [set variable canshoot to 1]

event [alarm 0] with action [set variable canshoot to 1]

You’re probably thinking why I put alarm 0 in, when I didn’t even set the alarm. Well… not yet.

Open up the [press spacebar] event. All you should have there is the [create instance of an object objbullet at relative position 0,0]. Leave it for now. Now make the actions [if variable canshoot is equal to 1], [set alarm 0 to 30] and [set variable canshoot to 1]. Now put the actions in this order with some controls ie the start of block, end of block.

[if variable canshoot is equal to 1]

start of block
[set variable canshoot to 0]

[set alarm 0 to 30]

[create instance of an object objbullet at relative position 0,0]

end of block

Okay, done. Long winded and complicated.

examplenumber9.jpg

Permalink 6 Comments

Problem Number 6

February 17, 2006 at 3:44 am (Game Maker, Uncategorized)

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

Another problem. Okay, you need two sprites, a ball sprite and a wall sprite. then make a wall object with the event [create] and the action [move in direction stop] just incase something goes wrong. Okay, then add another object with either the ball sprite or the wall sprite and make sure to uncheck the visible box. Give it the same properties as the wall.

Now for the ball. It’s gonna take a while, so I’ll list it’s attributes.

event [colission with object wall] action [jump back to start position]

event [collision with the other object] action [jump back to start position] and [set score relative to one]

event [outside room] action [jump back to start position]

event [press ] action [ set direction to random(180-0) and speed to 5]

event [key release ] action [set direction to stop]

Okay, finally done. Then make a room with a wall and the invisible sprites as the goals and add a ball. Done

I needed no help with this task.

screenshot6.jpg

Permalink 3 Comments

Problem Number 5

February 15, 2006 at 4:34 am (Game Maker, Uncategorized)

Make one object follow another object but they don’t touch

To get this one done, you need to make two sprites. I made two ball sprites. I edited one to have a coloured force field that would be invisible on a particular background. Then, I made two objects, object1 was the the object without the force field. It had the event [Create] with the action [set direction to random(0-360) and speed to 5]. The other event it had was [outside room] with the same action as before plus the action [move to a random position with hor snap random(640) and vert snap random(480)]. Then, with the other object (the one with the force field) I gave it the event [step] with the action [move to point ((object1).x, (object1).y) with speed 3] and also the event [collision with object1] with the action [for other object: move to a random position with hor snap random(640) and vert snap random(480)]. After all that complicated stuff, all you need to do is create a bacground, the same colour as the force field, create a room with the background and add the objects.

I used a few examples from a game me and my friend, Pikmik, created.

DONE!

screenshot5.jpg    screenshot5.2.jpg
This is the finished product, alongside an example.

Permalink 5 Comments

Problem Number 4

February 13, 2006 at 11:55 pm (Game Maker, Uncategorized)

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

Wow, this one is easy, and is sort of a continuation of the previous problem.

I copied the previous game, and added two sprites. One sprite to shoot and one to be an explosion. First I made an object out of the explosion and gave it the event [animation end] with the action [destroy the instance self]. That’s the explosion done. Now, the enemy you shoot. I added the event [collision with object objbullet] (the object bullet from the previous problem) with the action [change the instance object objexplosion, performing events]. Finally I made a modification to the bullet so it would disapper with the event [collision with object objenemy] with the action [destroy instance, self].

This problem and the previous one were solved by me, using gamemaker examples from last year, so technically, pikmik helped me.

Example4.jpgexample4.2.jpg

Hee, hee, the monster is killing the bunny!

Permalink 4 Comments

Next page »

Follow

Get every new post delivered to your Inbox.