Mini-games

Ren’Py Sliding Puzzle Mini-game Tutorial

March 2, 2023
Sliding Puzzle Mini-Game Tutorial Using Ren'Py

I used to like playing those “unblocking” puzzle games on my phone where you have a bunch of horizontal and vertical wooden blocks that can be moved up-down or sideways. The goal is to unblock a red block so it can reach it’s goal by sliding the other blocks out of the way. It was a fun thing to do if I had to wait around for something while out and about or for winding down before sleep. So I thought it would be a fun mini-game tutorial to create for my channel!

To go to the tutorial directly, you can watch it on my Youtube channel: Ren’Py Sliding Puzzle Mini-game Tutorial.

Learn to make a sliding "unblock" puzzle mini-game using Ren'Py!

The blocks for this type of mini-game has some limits in how they can move. Horizontal blocks can only be moved horizontally, and vertical blocks can only move vertically. And they can’t of course move across each other, as they block each other’s movements on collision.

The mini-game code for the tutorial works by using a Spritemanager to create sprites for each block. Using sprites makes it easy to control their movement with custom functions depending on the player’s mouse interactions and movement. Then we can lock the block’s movement to an axis as well depending on the block’s orientation.

In the video, I also go into how you can create the graphics for the mini-game using an image editing software. That’s because you will need to plan out initial formations of blocks in a way that makes the puzzle a little challenging to solve. Using for example Photoshop or Krita for this, helps us to plan out where the blocks should go and test to see if the formation is solvable. We can also then test by moving each image on the canvas to see how easy it is to solve the puzzle.

For the tutorial I have of course provided all the necessary images you need and a block formation you can use, but the part of the tutorial for how to create it yourself is useful if you want to use your own images and make your own block formations.

I have also made an “add-on” script on my Patreon with 3 more block formations in case you don’t want to spend time trying to figure out some for yourself. 😉

You can watch the tutorial on my channel: Ren’Py Sliding Puzzle Mini-game Tutorial.

    Leave a Reply