Line Escape Puzzle

Another puzzle game in the works. This type of game isn’t new, but it’s popular. Here’s a version on mobile that’s estimated to generate $250k/day (but unsure how much of that is profit considering it could be $245k spend on ads!)

Some of the ways I can differentiate my version – and compete with the top performers – are to:

  • Reduce build size and download speed
  • Add better effects and a more enjoyable user experience

Maybe I’ll have more ideas as the game develops.

Currently, the game looks and plays like this:

The idea is to tap the lines in the direction they’re facing to escape the grid. Cars were used a lot for this type of game, but arrows apparently more popular. I thought about using something else such as lines, blocks, or bubbles. Maybe I can test these variants in side levels and see if players prefer them.

As for the design, I was a little stuck on how to accomplish the lines moving the way I wanted to in Defold. But then it hit me, I would use the same method used as the lava in Tricky Temples (another game I’m working on but taking a break from).

The idea is to scale a sprite. It’s a simple concept that creates the flow of a line moving. Each pivot has a new block and the block scales down to 1 and triggers the next block in the arrow’s shape. I’ll post a video once I get it working how I want.

For level generation, I’ll rely on a script. It’s common for these types of games to have thousands of levels and there’s no way I’d be able to create them all by hand.

6 Likes

Some progress. I’m still figuring out how to make the final arrow have a line trail. Scaling isn’t ideal here because the scale has to go in both directions – once for off the screen and then again to clear the trail.

Example:

Final arrow is a go that moves in a direction off scree. A line (16x16) spawns under the arrow when it starts to move and has its pivot to follow the arrow as it scales. See this screenshot.

Issue here is when the “trail” is ready to unscale, the arrow isn’t off screen and this is tricky because it would require scaling in multiple directions.

Like most things, there is likely a simple and easy way. That’s usually the case in game dev for me. I just haven’t figured it out yet. :slight_smile:

Maybe the hypertrails would be useful here. Need to experiment.

3 Likes

Got the logic working for deciding if a line should escape or not. Basically I store all grids in a table with a has_line value. The line’s arrow checks the path along the x,y to see if the grids have a line. If it does, it doesn’t move. If it’s clear, the grids that the line is on are cleared and the line moves.

Later, I will add better effects and animations.

3 Likes

Working on a script that helps me create levels. This will be vital if I want to grow the game to 100s to 1000s of levels. As you can see, it needs improvement.

In retrospect, it would have been faster to design the first 50 levels manually. This would have allowed me to launch it faster and get feedback on the prototype; then, I could have worked on the generation script while the game was undergoing testing.

2 Likes

Latest prototype of the first 5 levels. The basic game loop is there with sounds and animations.

Need to add zooming and panning next for bigger levels.

The level generation script is better but still could be improved. Levels 1-4 were manual. 5 was made with a script. The script is good enough to use for now.

1 Like

It’s been crazy difficult for me to get a script that generates levels correctly. I took a step back and made a script that generates grid shapes based on images. I will have to add arrows manually, but at least it will be faster that trying to get a script to work – and I can make more interesting patterns.

2 Likes

To help add the arrows manually a level editor would be best. In the meantime, I have a mock editor that prints out my mouse movements in a format that I can copy/paste into the level data.

For example, by drawing this pattern in the game…


I get a print that, once added, creates the arrow when I reload the map.

This isn’t doing so well in Poki testing. On hold for now.