Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1352702 Posts in 62410 Topics- by 54145 Members - Latest Member: pushkidman

December 14, 2018, 02:49:44 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsSpring and Flow - A puzzle game about water, erosion, and growth
Pages: 1 [2]
Print
Author Topic: Spring and Flow - A puzzle game about water, erosion, and growth  (Read 3469 times)
SparseGameDev
Level 0
**



View Profile WWW
« Reply #20 on: July 09, 2018, 02:44:09 PM »

This looks profoundly interesting, very excited to see how it comes along.

Thanks so much!

Update 9

I've been experimenting with a couple new mechanics. First is seismic tiles:


When you swipe down on a seismic tile, it goes down while all of the surrounding tiles go up.

While I found that this one had some potential to expand the puzzle space, it doesn't play very well -- because so much happens all at once it's too confusing. I think for now I'll leave this mechanic aside.

The second mechanic I prototyped came out better so I gave it a proper animation:


These fertile tiles will pop up a level after moss is spread to them, allowing the moss to continue spreading on the upper level. This should also allow for a bunch of other interesting possibilities, like needing to raise a tile so that water on an upper level has more places to go without spilling, or allowing you to drain water from an area before growing the tile back and blocking off the area again.

I might do away with the dirt tile mechanic I developed before in favour of this new tile type. I think it's a lot more satisfying to have this visible upwards animation and changing of the terrain rather than just having moss spread up the sides of the dirt tiles. It also reads much better than the seismic tiles shown above because all of the action happens sequentially, much after you've pushed the tile down. I'm not totally set on the visual aspect - it may be better to have something like a bush plant that grows leaves, or stalks that grow upwards - but I think the mechanic is sound.

I want to start pumping out more levels but I've gotten frustrated with the state of my level editor and the difficulty of keeping track of / reordering the different puzzles, so I'll be focusing on those things next.
Logged

Kyuugatsu
Level 1
*



View Profile
« Reply #21 on: July 09, 2018, 03:02:48 PM »

This game looks great! Even before the water was animated it looked quite polished.

Part of the reason the seismic tiles might be confusing is because the action isn't "instantaneous" (animations are playing) as well as the water that has 'nowhere to go' falls directly into the new space instead of disappearing. I don't know why the latter makes more sense to me...but it does.

Are there tiles you can't swipe down at all?
Logged

Zorg
Level 9
****



View Profile
« Reply #22 on: July 10, 2018, 03:10:25 AM »

The new dirt tile mechanic looks good!

You could reuse the seismic tile as a path-blocking tile if you remove the mouse interaction. A tile that does not get wet by adjacent water and simply stays at the same height. Maybe it's helpful to build compact/complex levels. Shrug

But i like the idea of splitting water which occurs if tiles rise up. Maybe you could visually connect any two tiles (texture?) and if you push one of them down, the other tile rises at the same time?

Edit: A quick sketch of three pairs.
« Last Edit: July 10, 2018, 03:30:45 AM by Zorg » Logged
SparseGameDev
Level 0
**



View Profile WWW
« Reply #23 on: July 12, 2018, 08:39:36 AM »

Part of the reason the seismic tiles might be confusing is because the action isn't "instantaneous" (animations are playing) as well as the water that has 'nowhere to go' falls directly into the new space instead of disappearing. I don't know why the latter makes more sense to me...but it does.

Thanks for the insight! I think you're right, but I think that the water disappearing would probably also be a bit strange... maybe this mechanic could be usueable with a bit of tweaking (delayed reaction?) -- I'll have to think about it.

Are there tiles you can't swipe down at all?
You could reuse the seismic tile as a path-blocking tile if you remove the mouse interaction. A tile that does not get wet by adjacent water and simply stays at the same height. Maybe it's helpful to build compact/complex levels. Shrug

Having a tile that you can never swipe down is an interesting idea. Currently, you can only swipe down on tiles next to water, and if they are >1 height above the water they also can't be interracted with. So I can already use pillars sticking up as blockers, though this does obscure your view a bit -- it may be useful to have specific blocker tiles to make it easier to see.

But i like the idea of splitting water which occurs if tiles rise up. Maybe you could visually connect any two tiles (texture?) and if you push one of them down, the other tile rises at the same time?

Edit: A quick sketch of three pairs.


This is a cool idea, thanks for sketching it out! Something like this could be interesting. I'm wary of putting any important information on underwater tiles because they can be hard to see but if a tile started out above water and was used to split water later om in the puzzle that could work.
Logged

Zorg
Level 9
****



View Profile
« Reply #24 on: July 12, 2018, 11:05:25 AM »

Having a tile that you can never swipe down is an interesting idea. Currently, you can only swipe down on tiles next to water, and if they are >1 height above the water they also can't be interracted with.

Oh, i thought you could interact with every tile (except the shiny tiles and the possibly new blocking tile, of course).

It could lead to non-optimal solutions. I think it would be cool to see if players find different solutions. You could award those with a silver/bronze rank, or establish a scoring system which counts the number of additional moves needed (golf-like). Or you award the numbers of solutions found for the same level? Lots of possibilities. Grin
Logged
SparseGameDev
Level 0
**



View Profile WWW
« Reply #25 on: August 28, 2018, 12:13:53 PM »

Oh, i thought you could interact with every tile (except the shiny tiles and the possibly new blocking tile, of course).

It could lead to non-optimal solutions. I think it would be cool to see if players find different solutions. You could award those with a silver/bronze rank, or establish a scoring system which counts the number of additional moves needed (golf-like). Or you award the numbers of solutions found for the same level? Lots of possibilities. Grin

Thanks for the ideas! Currently the constraints of which tiles you can interact with are very important to a lot of the puzzles, and I feel it's easier to teach mechanics when there are fewer options avialable. I might do some experiments with more open play, and I have some ideas for mechanics which could give you more options as the game progresses. As far as scoring/ranking goes, I like the minimalism of just having to complete the puzzles without any scoring mechanic but I'm sure it would appeal to some players... I'll think about that.

Update 10

I've spent most of the time since my last update refactoring code and working on my level editor. As I created content for the game I was having trouble naming new levels and keeping track of which was which, and re-ordering levels was getting tedious as well. I made an in-game level browser to help me out -- instead of working with filenames, I use only thumbnails now, and I can drag and drop them to rearrange the ordering of levels:



The left strip in the level browser is the current pool of unused levels and the right strip is the in-game ordering. Clicking on a thumbnail opens the editor to that level. I've also added a UI with buttons for all of the different tools, and a test level button that will save a temporary copy of the level so I can try it out and restore it after. All in all it's a much nicer workflow and I've been able to create a bunch of new levels this past week, doubling the number I had before -- It's amazing what good tools can do for productivity!
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #26 on: September 03, 2018, 11:21:05 AM »

I love the drag and drop level reordering with the thumbnails. On puzzle games in the past I've always added some quick way to reorder levels but it was never this visually clear. Would definitely take this approach in the future.
Logged

RainWorldIsAwesome
Level 0
**

Rain


View Profile
« Reply #27 on: September 03, 2018, 02:53:53 PM »

Are there any plans to keep the level editor in the final version of the game? It would enable "community levels" which may be interesting.
Logged

Felius Limax
Venator Lacertae
SparseGameDev
Level 0
**



View Profile WWW
« Reply #28 on: September 08, 2018, 11:20:17 AM »

Are there any plans to keep the level editor in the final version of the game? It would enable "community levels" which may be interesting.

I've thought about it before, I think it would be cool but it would require a lot of extra work and introduce some requirements like hosting for the levels. I'm not ruling it out but it's not super likely, at least for the initial release.
Logged

gamedev123
Level 0
**


...it's alright. Really...


View Profile WWW
« Reply #29 on: September 09, 2018, 10:22:45 AM »

I really like the mechanics and clean visuals here and will definitely keep an eye on the game's development.
Logged

Visual designer, gameplay and game content designer based in New York City.  I done work\'d on iPhone, Web, casual downloadable and handheld console games.
Fuzzy Branch
Level 0
***



View Profile WWW
« Reply #30 on: September 09, 2018, 02:32:31 PM »

Your level editor looks really nice! Good tools can make all the difference. Looking forward to seeing this develop more!
Logged

SparseGameDev
Level 0
**



View Profile WWW
« Reply #31 on: September 28, 2018, 02:34:55 PM »

Update 11

Flowers!

I've been working mostly on polish stuff in the last month for a change of pace. I've replaced the placeholder sprite flowers with a new parametric flower generation system. This lets me make every flower in the game unique and nicely animated without actually modelling/rigging/animating 200 flowers!

There are about 50 parameters for each flower, and through tweaking them I can get a lot of variation:



Generation details

The stem is composed of two segments with independent controls for length and curvature, and also has a width parameter. The actual mesh for the stem is broken up further, and I send a series of transforms to the vertex shader so it can bend the stem and any leaves/petals attached to it. So for the purposes of curving the stem, it's set up pretty similarly to a standard skinned mesh with bones.

In nature, there are many different configurations that leaf and petals can grow in; I implemented a few of the more common ones so I can cover a lot of bases. The leaf/petal configuration uses a layer system, with the ability to define the number of petals/leaves per layer, and the number of layers. Petals within a layer will be equidistant from each other in angle. Between each layer, the petals/leaves can either
1) stay at the same angle
2) alternate and grow halfway between the angles of the previous layer
3) grow at 137.5 degrees from the previous layer. This is an approximation of the golden ratio and a lot of plants in nature grow their petals at an angle close to that. With 1 petal per layer, it allows many layers to be added before they start overlapping. Most of the flowers above are using this growth pattern.

There are also parameters so that the scaling and curl of petals can change with each layer.

The petals and leaves themselves are composed of 9 vertices each, and they have a bunch of parameters for their shape --width and length of each segments, and a few parameters which curl them lengthwise or at the edges.


Shadows

You may notice that the flowers have hard stencil shadows, compared to the soft shadows in the rest of the game. This is for 2 reasons:
-I want to emphasize that they are in direct sunlight, compared to the rest of the tiles which have more of a cloudy diffused lighting.
-I can't do dynamic soft shadows. The shadows are only redrawn after a tile is raised/lowered and doing it every frame would kill performance on mobile.

The shadows are rendered with an extra pass which projects the vertices onto the flower's ground plane. The stencil buffer is used to make sure there's no overdraw. Currently the shadow can extend out of the sunlit tiles but I'm planning to fix that by setting a stencil value when rendering those tiles and only rendering the shadows in those pixels.


Animations



Having actual 3D geometry rather than scaling sprites lets me do way more expressive animations! The transforms of the stem are recalculated each frame which allows me to animate its length and curvature. The curling and scaling of the petals and leaves is done in the vertex shader rather than at generation, so I can animate those as well. Each vertex has an animation index which tells it which curl value to look at, so the leaves and petals can be animated independently.

You may notice the bulb-like thing before the flower grows. This was added to draw your eye to the goal tiles and clearly show that they're important, but it also integrates nicely into the growth animation. It has the same parameters as the leaves and petals, except that they're global and don't change from flower to flower.

Wind

The flowers also sway in the wind. I do this by modifying the stem curvature with a noise function. There's also a higher frequency displacement applied to the petals and leaves. On generation, each leaf/petal is assigned a random value between 0 and 1, and the vertex shader uses this to interpolate between two wind values, and curl the petal based on the result. This way, the leaves and petals don't all move in unison.

Variations

When I find a flower I like, I save the generation data (stored in a ScriptableObject) to a template. Then in my level editor, I can select templates from a drop-down list and place flowers in a level. On placement, I randomize the stem length and curvature, as well as the rotation of the petals and leaves to get a bunch of variations of the same flower type:



That's it for this update! I've been working on the transition between levels and will post about that shortly.
Logged

Ishi
Pixelhead
Level 10
******


coffee&coding


View Profile WWW
« Reply #32 on: September 29, 2018, 10:52:28 AM »

Beautiful, perfect use of procedural generation to save yourself a ton of work in the long run!
Logged

SparseGameDev
Level 0
**



View Profile WWW
« Reply #33 on: October 19, 2018, 02:19:00 PM »

Update 12

New name

So for a long time I've been not really happy with the name Hexagon Falls, and I've decided to change it. The new name is Spring & Flow!



Level Transitions

I've been working on making the level transitions nicer. Previously, after completing a level you would have to wait a couple seconds and then an automatic transition would happen. This caused a couple problems:

1) people would be confused or get impatient, pressing on random stuff with no effect
2) sometimes people would miss something or the level would change while they looked away.

I added a draggable handle that appears after completing a level, so the players can now initiate the transition themselves. Here's what that looks like:



Previously, since the camera view was changing I was re-rendering the depth map and shadows every frame during a transition and this brought the framerate way down. Now I'm adding a vertical offset to the shadow/depth texture lookups to compensate for the movement of the camera, so I don't need to re-render anything. This works because the sections below and above the levels are just straight pillars so I can stretch the top/bottom of the texture for off-screen stuff. I might run into problems with off-screen waterfalls but I think I can work around it.

I also added a full-screen motion blur which is only enabled while the camera is moving. Since it's a very predictable vertical motion I was able to tailor the shader to my needs and get away with only 3 samples per pixel, which runs well on my test phone. The samples are equally spaced, but I'm stippling them by offsetting each vertical line to bring the visual quality up. Here's a freeze-frame:



Shadow Optimizations

I was bothered by the noticeable freeze when moving a tile on my test phone, and this was due to having to re-render the soft shadows when the level changes. I managed to get it to only re-render the shadows in a quad around the tile moved, pointed away from the light source. I did this by manipulating the vertices of the full-screen quad in the screen space shadow rendering shader. And then, when rendering my depth/shadows map, I don't clear it and only render to the new section using the stencil buffer. This way I only need to redraw about 10-25% of the screen instead of the whole thing. Now the freeze is no longer noticeable and everything feels way smoother!

Improved selection and touch input

Instead of instantly pushing down a tile as soon as you drag it down enough, now the action won't happen until you lift your finger. This feels a lot nicer (more control, less mistakes), and also has the added benefit of giving the player something to fiddle with. I also added a subtle animation to the selection area when you press it or slam it down which feels nice, and made it render in front of the selected pillar so it's easier to see. I also made the central puddle be part of the selection highlight so it moves with your finger as well. Here's what all of that looks like:



Additionally, I added a bit of fudging to the touch input so if you press near a tile it will still work. If the initial raycast fails to find a selection, I do a couple sphere casts with increasing radius.

Grass blades

I've added little blades of grass to the green tiles. This helps add some life to the scene as they sway in the wind, and also helps distinguish the tiles from the rocky ones with something other than just color. The placement and shape of the grass blades are determined procedurally, and seeded based on the level and tile coordinate for consistency.



That's it for now! I'm currently working on adding background elements, and doing a first run at music & sound. More on that soon.
Logged

SparseGameDev
Level 0
**



View Profile WWW
« Reply #34 on: November 26, 2018, 12:55:54 PM »

Update 13

Here's a video showing the first few seconds of the game in its current state.





Audio

Spring & Flow now has music and sound! It's really amazing how much it has transformed the feeling of the game.

I did a first pass at recording music a few weeks ago. The background track is electric guitar running through a bunch of effects, with acoustic guitar flourishes when flowers grow.

The wind sound is a combination of a synthesized sound I created with a public domain gusty wind recording. I'm also modifying the volume, pitch and panning based on the in-game wind values used to animate the flowers and grass as well as the camera movements.

The water sounds are done by fading between three separate audio loops. These are field recordings of streams I made while hiking, and represent three discrete levels of flow. Since I have values for the flow level of each tile, I can use this information to fade between the samples and pan them appropriately based on the average position of the water flow on screen.

The moss and flower growth sounds, as well as the rock interactions were my first foray into foley, which was a lot of fun. I'm particularly happy with the rock sounds (made by hitting and dragging bricks on concrete). The flower growth sound is a balloon being rubbed, and the moss "pop" sound is a little rubber cap being popped off of a 9v battery contact (slowed down).

This was also my first time dealing with audio in Unity, and although it seemed a bit barebones (I was surprised the built in audio sources don't support picking randomly from multiple samples, randomizing pitch etc), I got it working quickly enough. The mixing features are nice, with support for mixing groups with sidechain compression and reverb. A funny thing I noticed is that the sidechain compression (ducking) effect works better as a regular compressor than the default compressor does, since it gives you control over ratio, knee and wet/dry mix for parallel compression. (What kind of compressor doesn't have a ratio control???)

I'll probably re-record the background guitar track at some point, and I would like to have different songs as you progress through the game, but I think this is a good start for now.

Background scenery

In the above video, you can also see the new background scenery. The sky color is now determined by blending between two colors (which shift slightly overt time) based on a full-screen lookup texture.

The mountains are 3D models made in Blender, with fog density determined based on height and distance, and fog color calculated again using the sky lookup texture and colors. The clouds are simple 2d sprites, with their color set based on the sky color at their location to give a sort of rolling volumetric fog look.

Again, the background scenery will change as you progress through the game, but for now this gives a much better feeling than the plain gradient from before.

Interface stuff

I've made a few UI improvements to the game as well. There's now a working title screen, which you swipe up on to begin, and a "tutorial" animation directing you to swipe down on the first tile. Buttons can also "pulse" when they want your attention. The next level indicator pulses when you can swipe to advance, and the restart button pulses when no interactable tiles remain.

Overall the first chunk of the game is feeling pretty solid and polished now. I'm back to experimenting with and refining mechanics for later puzzles.
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic