Creating the Snake Game in Articulate Storyline without using JS and web objects.

Jan 11, 2024

Hello, everyone!
 
I've always been drawn to creating something unique using Articulate Storyline, and I decided to challenge myself by developing the classic game "Snake" without using JavaScript and web objects, relying solely on Storyline triggers.
 
Snake Game
 
Development:
It took me around 600 triggers to develop the Snake game.
 
How is the snake movement implemented?
Each segment of the snake is a separate object with four movement directions (up, down, left, and right), triggered sequentially. When element1 completes its movement (e.g., upward or in any other direction), element2 starts moving in the same direction. Essentially, each subsequent element replicates the movement of the previous one after its completion.
 
Game
 
How is the snake growth mechanic implemented?
In reality, our snake is always at its maximum size, but at the beginning of the game, only the first 3 snake elements have a "State Normal," while the rest have a different state with elements' transparency set to 100%. So, we simply don't see the remaining part of the tail. After picking up an apple, we switch the next tail element to "Normal."
 
How is the losing mechanic implemented?
When the head of our snake collides with any tail element (visible or invisible), we check how many apples have been collected. This helps us determine whether this element is visible or not. If visible, we lose; if not, the game continues.
 
lose
 
Conclusion and Lessons:
This project confirmed for me that Articulate Storyline can be a powerful tool not only for education but also for creating engaging games. The limitations became a source of inspiration, and I learned to see new possibilities where I hadn't seen them before. Creating the "Snake" game in Articulate Storyline is a story of how creativity can overcome technical constraints.
 
You can view the project using the link below:
5 Replies
Adam Zamczyk

This is a really great implementation, and thanks for sharing the logic behind it. Can I suggest to make the control buttons slightly bigger (it's hard to click on a phone) or even consider changing the game size to a mobile first 1080x1920?

Similar to this game built by me https://aiquiz.spongelearning.com/