Thesnidr's Grid Distortion
#21
Posted 22 March 2011 - 09:00 AM
#22
Posted 14 April 2011 - 04:18 AM
Views were tricky until I figured out to draw the grid at (view_xview,view_yview) and to create the explosion effect at (-view_xview,-v_yview)
One suggestion:
in eg_explode there's the line:
eg_vx[a0,i]+=(eg_dsx[a0,i]+lengthdir_x(dist,dir)-eg_dx[a0,i])/5; eg_vy[a0,i]+=(eg_dsy[a0,i]+lengthdir_y(dist,dir)-eg_dy[a0,i])/5;Since "5" here is effectively the damping of the effect, maybe you should include it as an argument? (The argument would stored into a variable before the loop of course, and that variable would be used in the loop rather than referring to the argument for the sake of performance, of course.)
#23
Posted 14 April 2011 - 09:57 AM
I think "argumentn" is going to be just as quick as "var n; n = argumentn".(The argument would stored into a variable before the loop of course, and that variable would be used in the loop rather than referring to the argument for the sake of performance, of course.)
#24
Posted 17 April 2011 - 07:27 AM
I think "argumentn" is going to be just as quick as "var n; n = argumentn".(The argument would stored into a variable before the loop of course, and that variable would be used in the loop rather than referring to the argument for the sake of performance, of course.)
Oh, my bad. I always kind of assumed "argument" was slower since it was passing the value by reference every time or something, but now that I think about it I don't really know why I assumed that.
#25
Posted 17 April 2011 - 08:34 AM
#26
Posted 13 July 2011 - 03:58 PM
The velocity variables, eg_vx and eg_vy were not declared in the create script, so it threw errors until i added them, but seriously, amazing work!
btw, I was able to implement a very nice ripple effect by layering an implode on top of an explode, with the implode radius a bit smaller.
#27
Posted 03 September 2011 - 10:03 PM
#28
Posted 07 September 2011 - 12:51 PM
#29
Posted 22 February 2012 - 06:23 PM
Edited by lolmister, 22 February 2012 - 06:23 PM.
#30
Posted 27 June 2012 - 08:05 PM
I was wondering if there would be a possiblity to have this distortion effect on the surface of the game itself, not just a background or a created surface.
I've tried some things, but it works quite slow and I was wondering if someone has done this already?
#31
Posted 28 June 2012 - 10:14 AM
*bump* ^^
I was wondering if there would be a possiblity to have this distortion effect on the surface of the game itself, not just a background or a created surface.
I've tried some things, but it works quite slow and I was wondering if someone has done this already?
Yep. All you have to do is draw everything on to a surface instead of using the standard draw event, and use that as the distortion surface.
#32
Posted 19 May 2013 - 01:13 PM
Hello! ![]()
I was just wondering what variable would have to be changed in order to place the grid somewhere other than the default one? For instance if I wanted to place a 200* 200 grid in the lower right corner.
Thx in advance
Alex
#33
Posted 29 May 2013 - 08:39 AM
![]()
#34
Posted 09 June 2013 - 08:45 PM
Neat example, I love seeing things like this with GML.
The movement seems localized to where it originates from, I'd love to learn how to make motion pass on to other points and 'ripple' out.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











