Forum Discussion

Ron_Katz's avatar
Ron_Katz
Community Member
3 years ago

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

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.

How to Change Direction of the Unicorn

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

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).

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

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.

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

Animate the "yes" or collision state.

Now check for collision with the slider

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

Catch a 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")

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.

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

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

 

  • ChristyTucker's avatar
    ChristyTucker
    Community Member

    My 8-year-old daughter thought this was very cool and says thank you for making it. "When I grow up, I want to make my own unicorn game!"

    Thanks for the demo and the clear explanation on how to build it!

    • Ron_Katz's avatar
      Ron_Katz
      Community Member

      Thanks Christy.

      I had fun building it and am glad to see someone enjoyed it.  Unicorns are AWESOME!

  • This is such a magical game, Ron! 🦄 Thanks so much for sharing your process. It's always helpful to see what creators are thinking as they build these types of interactions. The slider was a great solution! And I did notice the unicorn changing directions...nice touch! 🙂