Making a block water flowing system

Hopefiully you’ve al played Minecraft and at least placed a block of water (cant actually find a gif of this wth lol)

I wanna try to recreate this in Roblox for my block-based game and to add to my upcoming resource :flushed:

Does anyone have any similar posts / ideas on how to start with this? My first thought is a grid check and raycasting but not sure if that’d even work

4 Likes

Do you want to make a working clone of the minecraft water simulation, or just place static water blocks according to the schematic?

A working clone that can actually flow because I want to make my own block-game in Roblox in the future and I think this whole thing would be a very helpful start to that.

You can use the idea from this post:

I mean an actual flowing water system not the placement system. Like how Minecraft’s water source blocks spread out and cover things with water

Ohhh ahaha sorry my bad! Something you can look into for water “flow” would be flowfields. I used them for pathfinding before, but they can also be adapted for a water spread system like you’re talking about, as long as it’s a grid based system.

For example, the image below is a visual representation of a flow field. As it expands, the numbers decrease and you can use that as a “put less water here” indicator"

Good article: Flow Field Pathfinding for Tower Defense

2 Likes

Do you know where I can get the math to create these kind of wedges? (also pls dont kill my brain i havent taken algebra 2 or geometry yet in high school)

Islands figured it out somehow (then again their dev team is incredibly competent)

1 Like

What do you mean by that? Like how to get depth?

I suppose, I want it to have slightly more detail than just flowing blocks and get like shallower with wedges over time but I don’t know if I have enough mathematical experience for attemtping something like that yet

If you’re trying to make the blocks dynamically cut into wedges I guess you could? But I would just associate a specific angled block with a number on the flowfield, then index that block from RS or something. Also look into 3d flowfields, they are just like 2d flowfields but include depth

If it helps at all, you’ll need to use trigonometry for this. Specifically, for wedges like that, you’ll need the opposite side of a triangle.
7WkNK

3 Likes