Radio Show

Multimedia Fusion2

MMF2 Help

Graphic Design Assignments

Photoshop Tips and Tricks

Website Assignments

Website Tips and Tricks

Making Game #2

Know this! A little bit of knowledge in MMF2 can go a long way. What you learned last time with the bricker tutorial is very valuable, keep using those basics to make games. We aren't teaching much new in this section- but there are thousands of possibilites with just what you know.

You must have these two things in the game: 8 direction movement, and shooting. You can implement them however you want.

8 Direction Movement

This is rule number 1 of your game. You must have a character that will move around with the keyboard arrow keys. You can restict it two 2 dimentions instead of 8, but use this motion.

Path Movement - optional

  • This is a new movement type, choose your bad guy, on his movement change it to path and hit "Edit".
  • The box that comes up looks complicated, but it isn't. You can figure it out.
  • Remember that if you want a looping motion the last path "node" must be the exact same spot as the first "node." Also make sure to hit the loop button.
  • If you want it to complete the path somewhere else, then draw out the path and have it end off screen, or destroy it when it reaches the end.

Hot-Spot and Action-Point

  • When you double click an active object to change its animation or drawing there are two very important buttons.
  • The Eye-icon is the Hot-Spot, this is the center of the object. Maybe your guy is really big, but he is considered to exist only at that one spot. Its his X, and Y coordinates as well. In real life this would be the center of gravity. Make sure your hot-spots are in the right spot and not floating out in space..
  • The icon that looks like a star-(next to the eye) is the action-point. This point is where things happen. When your guys shoots an object, it is created at the action-point and moves away from there. Make sure this is located at the right spot too.


This is rule number 2. You must have shooting of some kind in the game

  • To shoot, you have to have a guy that will do the shooting, and an object to shoot- maybe paper airplanes, maybe something else.
  • Once you have both objects set up, head on over to the code. When do you want the player to shoot? That question is your next job.
  • Personally- I only want the player to shoot when the spacebar is hit- there are many other possiblities (constant shooting, shooting when he is standing in the right spot, ...)
  • New condition >> keyboard >> upon pressing spacebar
  • Now for the actions: right click on your players square. >> launch an object >> choose your projectile >> choose the speed and direction of the launch
  • Pretty easy huh

I think it is safe to assume you know about things colliding and what can happen. You can damage things, destroy things, create things when your projectiles collide with other game objects. Figure out how you want your game to work and program that in.

Regular Shooting

  • Timer- Every 1 Second >> then launch an object - choose the direction (it could be any direction, it could be at the player) choose a speed.

Random Shooting

  • We need an alterable value for this. Whoever is doing the shooting, go into the alterable values and create one and call it "FireTimer" start it at zero.
  • New condition: In code- when that value is zero (or below) then have it shoot(regular- see above)
  • Now "set the value" to a random higher value: random(100)
  • New condition: When the value is positive ( >0 ) then subract one from that value
  • What this does is have the program slowly count down each frame until the zero triggers the shot and randomly sets the countdown. In this case the count down can be anything between 0 and 100. This makes the shooting a bit more organic and less predicatble.

Self-destroying bullets

  • This is programming in an expiration date. Bullets rarely can go on forever, its nice to be able to controll how far the player can shoot so he can get into the game better.
  • Give your bullet an alterable value called "Life"
  • In the code we need two new events (two lines), one for when Life is zero, and one for when life is bigger than zero.
  • We want the bullet to destroy itself when life is zero (or less).
  • And we want the Life to go down by one each frame life is bigger than zero.
  • You now have a better bullet limits! You may have to experiment with what nubmer the life should start at- try starting it at 50.

Mouse Target

This is for keyboard movement, and mouse shooting.

  • Add a new object to the screen- draw it to look like a cross-hair, reticle, target, whatever.
  • Change the movement of this to mouse-controlled, edit the movement so it can move all over the whole frame.
  • New event: Always! have your character >> direction >> look in the direction of >> the reticle.
  • Now change your shooting event, I dont know what event number it is- but find when the player launches the object - change it.
  • Instead of what you have, make it shoot "Launch in direction of..." and choose your reticle.
  • Also - might be nice if you changed it so the player can shoot by clicking the mouse, instead of the keyboard...

Destroy Animation

  • If you edit an active object you can see in the bottom left corner a list of animations- most of them are empty.
  • By default the "destorying" will play whenever the object is destroyed. We are going to make a short animation there.
  • Copy and paste one frame into the destroy animation sequence. A 4-5 frame animation playing at speed 20 should be good enough.
  • On each frame change the drawing to look like it is fading or getting blown to bits more and more.
  • The key to animation is a slow change, it should start pretty intact, and it should be end next to nothingness.

Enemies or powerups appearing Randomly

  • Have an object you want to appear sometimes, and decide how often it shoudl appear.
  • Only one new line of code- Every X seconds. (maybe 3 seconds maybe 10)
  • First thing to do is "create new object" put it anywhere, it doesn't matter- we just have to make a new one.
  • On that same line we need to set the XPosition and the YPosition of the thing we just made.
  • Look up your frame size really quick- it should start 640x480 unless you changed it.
  • Set it's XPosition to "random(640)".
  • Set it's YPosition to "random(480)".
  • If you are inserting enemies make sure they move correctly. If you are inserting powerups make them destroy after a while so the player has to hurry to get them.

Simple static movement

  • Even though an object has static movement- it can still move- we just have to program it.
  • To program movement we have to slowly update its X and Y coordinates to where it moves to.
  • Here is how to tell an enemy to slowly approach you.
  • We need 4 new lines of code, but its all pretty simple: is the enemy's X bigger than the player's X? Is enemies X less than the players X? and the same thing for the Y coordinates.
  • Enemmy >> position >> compare X coordinate >> retreive data from an object >> player >> XPosition.
  • Now- when the enemy is to the right on you, you want it to move left one pixel.
  • Enemy >> Postion >> set XPosition >> retrieve data from object >> Enemy >> XPosition, and then type in "-1".
  • That line above will read that when the enemy's X is bigger (to the right) of the players X, each frame the enemy is going to move one pixel to the left.
  • Now you have to do that a few more times, you add 1 when the enemy is to the left. The Y even works the same way- when the enemy is above have it add a pixel, when the enemy is below subract one pixel
  • If you test it now you should see your enemies slowly approaching your guy from all sides