Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

SheepStareGames

3
Posts
1
Topics
A member registered Dec 29, 2015

Creator of

Recent community posts

haha loved the call from the US government!

Pipe Puzzle Solution

Today I made the pipe puzzle fill with the fluid shader when it's solved! It's possible to tweak how fast this fluid moves around and its scale but I decided to leave that until the end as it's more important to get a finished game done before making it look pretty.

I also utilised libgdx's TexturePacker to put all our pixel art in a TextureAtlas. The atlas has a map of all the regions on the atlas texture and initially reads them from atlas files generated by the TexturePacker. Russ now gives us sprites as separate images so that the packer can do all the work. This way if we change the size of sprite images or remove some unnecessary ones we don't have to change anything in the code. It also makes the code cleaner!

Next up I want to introduce a timer, and a pipe on the side that effectively counts down until the fluid enters the grid and starts filling segments while you're still solving.

Introduction

I'm Harry, a developer from Leeds, UK. During the day I'm a PhD student researching the formation of massive stars, as are the other two developers on my team, Jake and Greg and also Marc our game designer! Our artist, Russ, is from Southern Ontario, Canada. Jamming has been great fun so far :D.

Game Idea

Imagine you've lost your tether to a space station and you're now floating in space. You must safely move your astronaut through an infinite maze of asteroids, finding and picking up important resources as you do. These resources (most importantly oxygen) need to be maintained in order for you to survive longer.

Picking up a resource will move the player to the POV of the astronaut, looking out his/her helmet into a slowly rotating view of stars. Your arm passes in front of you and you have to solve a Pipe Mania-style game, guiding fluid through pipes, in order to collect the resource within a time limit. These pipe puzzles get harder the longer you play and the longer you play the higher your score.

The pipe puzzle minigame starts you with a random grid of pipes (imagine Pipe Mania or the hacking game in Bioshock). You have to solve the grid by clicking pipe segments to rotate them, so that the entry pipe leads to the exit pipe. This gets more difficult the longer you play by giving you a larger grid, longer pipe solutions or a shorter time limit. For the different resources we plan to introduce "colour splitters" for more valuable resources. These are entry pipes that split the fluid down more than one pipe which you have to guide to separate exits (matching their colour) - meaning you have to solve for more pipes simultaneously. We've tried to make this game different from the games mentioned before - and also trying to make this fun to play as it looks like this'll be the main focus of the game.

Pipe Puzzle

Here begins the dev stuff: first off I made a generator to produce grids that have a solution (possibly more than one). The generator starts at the entry pipe and recursively searches each path for a solution. At the easiest difficulty the generator guides the solution pipe straight towards the exit. For harder puzzles though I decided to keep a "turn-off counter", i.e. the remaining number of times a pipe needs to be put down that is aimed away from the exit.

The pipe shape is determined afterwards by looking at a bitmask calculated during generation for each segment in the grid. The parts of the grid not filled in after this generation are randomly generated and all tiles are eventually randomly rotated.


Pipe Fluid Shader

We needed to find a way to animate these pipes filling up with fluid. At first Jake had the idea to use animated masks along with a fluid texture to do this. After trying for a few hours I finally figured out how to do it but along the way I found a tutorial on shaders which included a Simplex noise effect. The effect doesn't look exactly fluid-like so I searched around some more until I found a "flow noise" GLSL shader by Ken Perlin and Fabrice Neyret (2001). This noise is typically used to create fluid, lava, smoke effects in games and it looks pretty good!