TheMysteryOfParis Tutorial
TheMysteryOfParis Tutorial
having fun... In other words: You can use this PDF tutorial for anything you’d like,
as long as it doesn’t involve both a hammer and a squirrel.
[email protected]
Welcome, young detectives!
Welcome to another one of Koobare’s little tutorials, teaching you – as always – how to
effectively and efficiently use the best multimedia authoring tool ever – Multimedia Fusion 2
by Clickteam! This tutorial is meant for beginner intermediates, people who already played with
a couple of projects in MMF2 and know their way around the interface and Fusion’s basic
features.
In this tutorial we will create a nice-looking “Hidden Object” game, in which the player has to
locate items concealed somewhere on the screen. This type of games – known also as the
“Seek and Find” or “Screen Detective” games – have become the hottest casual playthingies
during the last few years, with a bunch of game design companies releasing literally hundreds
of such titles every year.
So, you now know the story behind our little game, now it’s time to lay out what exactly are
we trying to achieve here… The basic concept goes like this: the player has exactly 60
seconds (measured down by a counter) to gather up 11 objects thrown around the room. He
does so by clicking on them with his left mouse button – if he clicks on an object, it disappears
from the room and it’s name is scratched out from the list that can be found on top of the
screen. Some items are named in such a way that the player has to guess what exactly does
the name from the list represent (for example: “Earth” means a globe-shaped ball, whereas
“Statue” is a cut-out cardboard Statue of Liberty placed on a painting).
To add a nice graphical effect to our little game, we’ll use a Lens object, set to standard,
unaltered preferences – when it will be combined with another object (just a simple active
object that will be positioned on top of the lens), it will resemble the well-known detective tool
used by the world’s most famous investigators, from Sherlock Holmes to Mr. Hercules Poirot –
a magnifying glass. Trust me – with just two or three lines of code, this will add a really nice
touch to our project.
And - talking about nice touches - let's not forget about other graphicalǑimprovements that we're going to
introduce into our game. First of all, every time the player clicks on one of those eleven clickable items, they
will disappear in a blast of light, exploding and fading out of the screen. The lines that will be used to “scratch
out” the items from the to-do list will use a fade-in, which will make them look animated, even though they
only have a single frame of animation. The third and last thing - we will use a semi-transparent object (it's
transparency will be image-based, we won't use MMF2's native Ink Effects this time) with a simple jiggle
animation to cover the title of our game and make it a bit more attention-grabbing. Two more things to add
here: a word about counters and a second one about sound. Yeah, there will be more counters than just the
timer one - another one will be used for counting down how many pickupable items are there still in play, and
a third one will be used to delay the final jump to another frame, after the player singled out all the required
stuff. As for the sound: we'll use the sounds and music provided on MMF2's Bonus disc to enhance the overall
feel of the game. You'll see what I mean in a few minutes - let's carry on, detectives…
As we usually do, we’ll start off simple, with the most basic task all MMF2 users have to do
from time to time – in other words, I’ll show you how to create and set up our app. If you
already know how to do this and are worn-out by such a basic approach, just head to Part II of
this tutorial (just scroll down). This section is meant for the newbies, so you don’t have to waste
your time here if you’re more of a beginner-intermediate user.
Once you’ve opened our basis application, the foundation on which we’re going to build our
game, go right into the first frame and take a look around (for those of you who relish for a bit
more drama: try to do it in slow-motion, while flying through the air, Max Payne-style). There’s a
whole gang of objects laying around, looking really pretty, just waiting for you to script them all
together into a nice, simple, “Hidden Object” game.
Your Frame Editor should look somewhat like this right now:
Yet, before we can move on to the scripting, we should firstly learn all there is to know about
the objects used in our application – what will they be used for, which ones have a fade-in
transition, what are their basic preferences… That kind of stuff. Below you can find an
alphabetical list of all the objects, with their short description:
First of all, this is basically the main thing the player sees
throughout the whole level… There are no jumping spacemen,
hovering helicopters, dashing sports cars and other animated
stuff rushing through the screen… In other words: no
distractions.
Secondly, the quality of the main backdrop and its details are
basically responsible for the difficulty of our game: the more
details, the more objects laying around, the more difficult it will be
to find the right items before the time runs out.
counter.hidden A hidden counter used for controlling our game and its frames.
PROPERTIES
It is set as a hidden counter. Its Initial and Maximum Values
are both set to 3, its Minimum Value is set to 0.
counter.objects Another counter, this one counts how many items are left in the
frame.
PROPERTIES
It is set as a Numbers counter (with the images imported from
external files). Its Initial and Maximum Values are both set to
11, its Minimum Value is set to 0.
PROPERTIES
It is set as a Numbers counter (with the images imported from
external files). Its Initial and Maximum Values are both set to
60, its Minimum Value is set to 0.
Lens The Lens object – used for our little magnifying glass.
PROPERTIES
All properties are set to default (which means that the Initial lens
effect is set to Zoom, the Multiplier is set to 1.0 and the
Autoupdate option is ON).
WHY IT’S HERE?
Because we want a nice-lookin’ magnifying glass for our Private
Eye.
HOW DOES IT WORK?
The Lens object, created by Anders Riggelsen, is basically used
to distort everything placed beneath the lens object like if it was
seen through a piece of glass, or, well, a lens – this effect is
controlled by the usage of a grayscale gradient object, which can
be easily edited or imported from outside of MMF2. We use the
basic, default “grayscale circle” object, since it perfectly suits our
needs.
menu.bar The name says it all – our menu bar (a backdrop object).
TRANSITIONS
The fade-out transition of all these objects is set to “Fade” (2.3
seconds).Thanks to this they fade away into air after being
picked up by the player (and, oh, there’s also a bright explosion,
but we’ll get to that part in a few seconds).
scratched.out Black lines that are “scratching out” the items from our to-do list.
TRANSITIONS
To make it appear as if someone really “scratches out” the
names from the list, I’ve added a simple fade-in transition to this
object. The fade-in transition is set to “Bands” (0.67 of a
second, coming from left to right).
Got it? Great! That means that we’ve got our first event up and ready, even if it’s a very petite
one. Never underestimate the meaning of a game’s soundtrack, though…
2) Time for our second event! This one will be as simple as our first one, and will basically play
a little sample every time the player clicks with his left mouse button:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks
<< select: LEFT BUTTON, SINGLE CLICK >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “Drip 4.wav” sound, from \Samples\Impacts >>
3) It’s now time for a series of more “serious” events, establishing what will exactly happen if
the player clicks on one of the pickupable items:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.statue] object >>
THEN: [object.statue] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=558, y=30 >>
white.blast A nice-lookin’ white explosion.
TRANSITIONS
The fade-out transition is set to “Zoom” (0.22 of a second).
As a developer greatly concerned about the audio-visual side of my projects, I tend to use a lot
of alpha-channeled objects – actually, I’m not that into pixel art, so I use them every time I
create something, always playing with transparencies and blending. The thing that I wanted to
emphasize here is that this game wouldn’t look so good if it wasn’t for alpha-channels, helping
us to make it harder to distinguish between a separate object and the background of the game.
It’s now time for the scripting part – my personal favorite! Save your project (always remember
to save it from time to time!) and open up the Event Editor. If you’re new to my tutorials, let
me introduce you to the event-recording system that I use. If you know it already – just skip this
frame below and quickly move on to the coding part:
IF (Condition): [Object for the condition] > Condition group > Condition
THEN (Action): [Object for the action] > Action group > Action
Seems simple, right? Well, that’s just because IT IS simple. All the conditions are
marked in red, while actions are written in fancy blue.
Object names are always put in [square brackets]. The final condition/action is
always in Italic. If we’ll have a multi-condition event, then it’ll be like this:
IF (Condition 1): [Object for condition 1] > Condition group 1 > Condition 1
IF (Condition 2): [Object for condition 2] > Condition group 2 > Condition 2
THEN (Action): [Object for the action] > Action group > Action
If you’ll have to input anything by keyboard, it will be indicated by coloring the text
green and using < angle brackets >, like this (this marking will be soon obsolete):
Additional comments, instructions and info will be put in << double angle
brackets >>, using a different color (this marking will soon be also used for input):
<< Select any wave sound from the MMF2’s sound library >>
From time to time I’ll also use this style to throw in some extra tips and tricks
about MMF2 and more advanced coding techniques. All you have to do is to go
step-by-step through all the listed events and keep one eye on your Event Editor,
and the second one on this tutorial…
1) Firstly, let’s start off with the conventional “Start of frame” event, which I usually create at
the very beginning of the events list (seems pretty logical, right?). This event – triggered when
someone starts our game – will initiate our music track, nothing more, nothing less. I’ve found a
perfect little piece of music on MMF2’s Bonus disc, in the \Samples\Music\Magic & Drama
folder, but you can of course choose something different if you wish:
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-5, y=9, relative to [object.statue] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN1.wav” sound, from \Samples\Music\Jingles >>
Let’s take a closer look at this event: when the player clicks on the Statue of Liberty cut-out, it is
quickly destroyed, it’s name being scratched out from the item list (the “scratched.out” object is
created on top of it), a white blast is created on top of the vanishing item, the item counter’s
value is lowered by 1 and a mysterious violin sample is played in the background…
Everything’s clear, right? Now, let’s do the same for the skull hovering above the window:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.skull] object >>
THEN: [object.skull] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=763, y=43 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=0, y=5, relative to [object.skull] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN2.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.eagle] object >>
THEN: [object.eagle] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=531, y=31 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=1, y=-1, relative to [object.eagle] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN3.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.screen] object >>
THEN: [object.screen] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=583, y=31 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=1, y=-4, relative to [object.screen] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN4.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.clock] object >>
THEN: [object.clock] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=623, y=37 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=1, y=2, relative to [object.clock] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN5.wav” sound, from \Samples\Music\Jingles >>
Another event, this time concerning the bullet left on the table:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.bullet] object >>
THEN: [object.bullet] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=604, y=32 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=0, y=0, relative to [object.bullet] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN6.wav” sound, from \Samples\Music\Jingles >>
Once again a very similar event, this one is for the seashell laying on the floor:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.seashell] object >>
THEN: [object.seashell] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=727, y=35 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-1, y=-2, relative to [object.seashell] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN7.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.book] object >>
THEN: [object.book] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=740, y=41 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-1, y=-4, relative to [object.book] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN1.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.wrench] object >>
THEN: [object.wrench] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=698, y=37 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-1, y=-1, relative to [object.wrench] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN2.wav” sound, from \Samples\Music\Jingles >>
We’re almost done with this series of events… Here’s one for the globe-shaped ball:
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.earth] object >>
THEN: [object.earth] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=674, y=36 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-3, y=1, relative to [object.earth] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN3.wav” sound, from \Samples\Music\Jingles >>
IF: [Keyboard & Mouse Object] >> The Mouse >> User clicks on an object
<< select: LEFT BUTTON, SINGLE CLICK >>
<< choose the [object.coins] object >>
THEN: [object.coins] >> Destroy
THEN: [Create New Objects] >> Create Object
<< Select the [scratched.out] object >>
<< Set the coordinates to x=650, y=36 >>
THEN: [Create New Objects] >> Create Object
<< Select the [white.blast] object >>
<< Set the coordinates to x=-1, y=-3, relative to [object.coins] object >>
THEN: [counter.objects] >> Subtract from Counter
<< input: 1 >>
THEN: [Sound Object] >> Samples >> Play sample
<< Choose the “VIOLIN4.wav” sound, from \Samples\Music\Jingles >>
Got it? Great! That means we’re done with our pickupable items. All we need now are seven
more events and we’ll have our game up and running!
Here’s what we’ve got so far (don’t panic if isn’t exactly the same as in your Event Editor):
4) This little event will be responsible for destroying the “white.blast” object once its animation
has finished:
5) Time for our “Always”-conditioned event, one that happens on every loop, no matter what.
This event is actually all about positioning – it repositions the “Lens” and “magnifying.glass”
objects so that they always follow the player’s cursor, and then brings them to front, so that
they won’t be covered by the white explosion we create in earlier events:
8) But if you’ve gathered all the required items, you’re gonna’ hear a nice little victory sound…
9) …and then you’ll have no more than three seconds to say goodbye to this level…
10) …until you move on to the next one. Of course, if there will be a next one…