How do i make water move like minecraft?

Get help using Construct 2

Post » Tue Sep 03, 2013 7:36 am

hi everyone,
i have been on the forums on and off for the past few days trying to figure some stuff out about 2d water.
so far i have had a low success rate on finding topics that match my game style.I have block tiles that are 32x32 in size and i wanted to know how do i make a single tile act like water?I am hoping that someone has some info on how i can make this happen.thanks everyone i hope to get some feedback about thisRookieDev2013-09-03 07:37:35
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Tue Sep 03, 2013 8:52 am

Maybe it's just me, but what would it mean for a tile to "behave like water"?

What I mean is, what do you expect the tile to do?
Could you tell me what actions the tile should have on what conditions, maybe if you break the expected "behaviour" down into little pieces it becomes clearer how to set up the events.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 03, 2013 9:23 am

@LittleStain I would like the water to flow until it is blocked by a solid,the game im making this for is a sandbox/platformer/sidescroller.
Terraria and Minecraft are my best references to what im trying to do,I apollogize about the lack of informationRookieDev2013-09-03 09:24:44
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Tue Sep 03, 2013 11:34 am

Check this thread and search for the keyword "Fluid physics" at any date in advanced search.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487

Post » Tue Sep 03, 2013 6:46 pm

Thank you @Kyatric i have been trying to figure this out for awhile now,I did check out the link you posted but the type of water effects that are being used will cause way too much performance loss and i can almost guareentee that it will cause lag.
I was hoping to find a less powerful way of completing this.
Minecrafts water dosnt update everytick it is a slower updating system it i just cant figure out how. Thanks again guys i will check the keyword.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Tue Sep 03, 2013 6:55 pm

@Kyatric I think the way Notch approached water/lava in MineCraft doesn't require a lot of CPU, as he didn't go for ultra-realistic.

He has source blocks that water/lava can flow from, with a maximum distance of 8 squares from the source block.
If you have MineCraft, put a source block near the edge of the terrain, and you'll see that there is no limit to the drop, and that it either continues the 8 count or restarts it when it hits land (I forget which).

Also, it doesn't update every tick.
Far from it.
Water seems to update a few times a second when it's spreading, and lava seems to update every few seconds.

So it's not down to masses of computations, but more down to clever logic with timed updates.
And of course, you only need to update the flow of a source block if it's surrounding terrain changes.

It shouldn't be too difficult to get it working in 2D, but will probably take quite a bit of tweaking when in place (as Notch had to).
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Tue Sep 03, 2013 7:08 pm

There are a few examples for tile-based water like that...maybe they were in CC. Will search around.

Yep. http://www.scirra.com/forum/how-to-make-minecraftlike-lavawater-physics_topic41488_page1.htmlMadFactory2013-09-03 19:12:08
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Wed Sep 04, 2013 10:44 pm

@MadFactory Thats where i got the quote from in my last reply,Thank you for posting this it did help,I have downloaded construct classic to see how some things operate.They still have great tutorials and examples to learn from.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests