How I Built this Valentines Themed Heart Catch Game in Under 4 Hours

Feb 11, 2022

This week's ELH challenge was to build a Valentine's interaction.

I built three different ones (see below), but the last one was a game I built in under 4 hours.

Demo: https://360.articulate.com/review/content/a31f7035-ff75-405d-9e6c-533158cce789/review

In this article I discuss how it was developed in less than 4 hours.

The Concept

I wanted to create a game where hearts fell from the sky and the unicorn caught them.

The Challenge

When I initially began playing with the idea, I couldn't figure out how to keep my unicorn from going off the screen.  I didn't want to calculate where the unicorn was at any particular time because that just seemed like 'too much'.

The Solution

I started thinking about how the various components available in Storyline work and I thought of Sliders.  A slider has a starting value and an ending value.  If you change the 'thumb' of a slider to a picture, then that thumb can't move beyond the limits of the slider.

slider image showing setting up variables in the slider

How to Change Direction of the Unicorn

Changing the direction of the unicorn was as easy as changing the state of the slider.

slider state with unicorn facing left

slider state with unicorn facing right

Let's Get Things Moving

How do we make our unicorn move back and forth on the screen?  We just change the variable which represents the Slider value.  To increase the excitement, I created a variable called speed, which starts at 20 and drops each time there is a collision between the unicorn and a black heart (more on this later).

speed and energy variables set

We will use a key press to determine if we want to move right or left.

key press triggers to move left or right

Adding Game Elements

Now we need something for our unicorn to do, we want those falling hearts.  Start by placing a heart off the screen and giving it a down-ward motion path.

heart motion path

Give the heart a couple of states and place its initial state as hidden

heartstates

Animate the "yes" or collision state.

animate collision state

Now check for collision with the slider

collisiontriggers

Copy and Paste Your Work for More Objects

Now that we have the basic mechanics in place, we can just copy and paste our heart and spread it across the top of the screen using the "Arrange", "Distribute Horizontally" feature in Storyline.

What's the Score?

Now we need some simple triggers to adjust our score variable as well as our energy and speed variables.

Catch a red heart

score good

Catch a black heart

energy drop black heart

That Was Random

Games shouldn't be too predictable, so I created a layer to randomly select which heart to activate (they drop automatically when their state changes to "normal")

randomly pick a heart to drop

This layer has a really short duration (< 1 second) and is set to close when it reaches the end of the timeline.  It displays nothing, just chooses which heart to change to normal, then closes.

How Am I Doing?

The levels change when the player reaches 200 points and 500 points.

level up trigger

The "Game Over" layer is shown when the energy level drops below 10.

game over trigger

Conclusion

This is how I rapidly designed this simple, but fun game.  You could use the same format to create almost any type of game in Storyline.

Learn More?  Check out the Storyline file!

 My other two Valentines demos for this week

Demo 1: https://360.articulate.com/review/content/841eac35-7649-409d-ad51-8d727baf6e52/review

Demo 2:  https://360.articulate.com/review/content/25d3ebb3-20ae-4b79-9a26-62067b513dcb/review

 

3 Replies