Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Development Update – Water Drafts

Hey guys, been a while since the last devlog update. Got a new set of approaching deadlines for different applications, so have been a bit stressed out and busy with those. Also, the weekend right after IndieCade East, there was another small indie game dev meetup here in Chicago. I spent the few days right up to the meetup implementing a lot of the suggestions and feedback from IndieCade East. From the latest playtesting session, it’s definitely an improvement.

One of the biggest design challenges for Relativity has been trying to find a balance between freedom and linearity of the puzzles, and I think I’m finally starting to find the right way to do it.

On the technical side of things, I’ve started really looking into how the water mechanics in the game would work. To make water fit within the context of the world, it will need to be very constrained and follow a very specific set of rules, so that its behavior will be very predictable to the player. This is because water will be an important role in solving several puzzles, and I can’t just have water splashing all over the place.

I’m still not finished with it yet, but just wanted to give you guys a preview of what I’ve been working on so far.

Here’s the first draft of the water system I wrote:
Relativity_Water_version1

What’s happening here is that I start with a game object called the Water Starter. The Water Starter does raycasting in a number of directions (forward, down, left, and right) to determine if anything is there. If there’s nothing below it, it will fall down one step, and then re-perform the check. If something is below the water starter, it will check to see if something is in front of it. If there isn’t, it will move forward one step, and re-perform the check. At each step of the way, it creates a collider.

It looks pretty good, but it’s not what I want from a technical standpoint. There are simply way too many colliders that are created, and also, it isn’t responsive to environmental changes. So, for example, if the ground were to be removed at certain point for whatever reason, the water would remain in place, which is not what I want.

Here’s the second draft:
Relativity_Water_version2

What I’m doing here is looking for changes in the blocking situation, for example if the water starter detects that there’s now no ground beneath it, it signals a state change. What I do then, is that I use the starting and ending positions to get a midpoint, and a distance between the points, and create one single collider. It doesn’t look as good as the previous version, since the colliders just pop into place, but from a technical standpoint, it’s closer to what I have in mind.

Here’s the third draft:
Relativity_Water_version3

As you can see, I’ve started the check if there’s something in front, to the right or left of the water starter, and react accordingly, thus creating bends in the water. Also, in this version, each subsequent segment of the waterfall is actually a child of the previous segment. This way, if the source of the waterfall gets cut off, or if something changes higher up in the waterfall, all the subsequent segments will be affected.

Still quite a lot of work to do, but I’m celebrating the small victories for now.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.