water example

For questions about using Classic.

Post » Thu Aug 02, 2012 8:50 pm

hi guys!

i had some big issues understanding the water behavior in the example .cap posted by rojohound in this thread:

http://69.24.73.172/scirra/forum/viewtopic.php?f=3&t=7752#p60271

the effect is brilliant,but after spending alot of time trying to understand how it works i just got frustrated. is there anyone who would like to break it down for me and explain the basic idea and behavior of those few lines of code?
is it possible to have multiple instances of those water "puddles" ? meaning that i could scatter small puddles all over the level (layout)? i didnt have any luck with that and now i feel completely stupid
arrays are pretty alien to me still. also, i get stupid everytime i see "loopindex" lol , it scares me.
B
1
Posts: 12
Reputation: 249

Post » Fri Aug 03, 2012 5:01 am

Basically, It remembers the previous 2 frames, then uses them to affect the data.

Honestly, you're better off trying to recreate the effect yourself by looking at that site, you'll understand the basics and be able to adapt them to your own implementation. Don't feel bad if you don't understand it right away, it's tricky.

However, if you don't know what loopindex is, or aren't experienced in "real programming" (ie, algorithm design, with traditional programming methods) then this might be a bit too complicated to understand for now, but don't let that stop you from trying.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests