Hi there.
During my quest to warp a 32x32 grid (http://www.glbasic.com/forum/index.php?topic=7077.msg59173#msg59173) for my game, I figured out how to draw spirals. If I want to warp the grid, I'll have to stretch the polygons to a logarithmic spiral. Anyway, I haven't figured out the grid warp yet, but I had so much fun creating this spiral I wanted to share it with you anyway.
(http://www.psyview.nl/rwi/img/warp.bmp)
If you want to see it swirl around you can download the source here. (http://www.psyview.nl/rwi/glbasic/warp.src.2011-17nov.rar) Pressing the up arrow resets the spiral.
If I succeed, the example code for the grid warp will be posted in this thread too.
Ok, I've got a grid warp now. It's not exactly what I had in mind, but it's a spiral warp of a grid anyway, so I'll post it here. Gotta test it out in the game to see if it looks right for a black hole spell.
(http://www.psyview.nl/rwi/img/warp2.bmp)
Get source here. (http://www.psyview.nl/rwi/glbasic/warp.src.2011-18nov.rar)
Warp the grid by pressing the up and down arrows. Reset with left arrow.
No attempt has been made to clean up, or make readable, the sourcefile.
I've got it figured, the grid warp is now how I want it to be.
(http://www.psyview.nl/rwi/img/warp2.png)
Code here. (http://www.psyview.nl/rwi/glbasic/warp.src.2011-24nov2.rar)
Press up arrow to rotate the spiral.
Nice work :)
Cool! :good:
Nice! Download links seem to be broken though...
Cheers
Quote from: Crivens on 2011-Nov-25
Nice! Download links seem to be broken though...
Cheers
Oops, sorry. Cleaned up the server. It's back on there.