Grid with variable height plots.

BlitzMax Forums/BlitzMax Programming/Grid with variable height plots.

Paul "Taiphoz"(Posted 2011) [#1]
I need to create a grid over my play area, each point in the grid needs to be deformable along the y axis debending on that points proximity to an object.

My first thought was to create the points and the draw lines between each point to form the grid, but it occurs to me that hundreds of drawlines might cause a lot of slow down potenitally.

Or, I was thinking of createing a line sprite 1 pixel wide by 3 pixels high, and the positioning it and scalling it to stretch to the next point in the grid.

any of you got any other ideas on how I might go about this ?

trying to replicate this effect , but in real time with moving objects.




matibee(Posted 2011) [#2]
If it's full 3d using minib3d & opengl, a pre-made line array where you adjust the Y values on the fly would render in one call.

Other than that, try the lines.


Armitage 1982(Posted 2011) [#3]
Hi

I know it's not exactly the same language, but I spot this the other day in Processing and it's exactly the effect you are researching : http://www.openprocessing.org/visuals/?visualID=9151

The code is pretty straight forward so I hope it could help.


*(Posted 2011) [#4]
Have you tried Sin/Cos and DrawLine, 3d would be MUCH easier though as you could use a 3d mesh and vertexcoords


Paul "Taiphoz"(Posted 2011) [#5]
It's a 2D game , and one that I plan to port to mobile and html5 so trying to keep it as simple as possible to avoid compatibility issues.


Paul "Taiphoz"(Posted 2011) [#6]
WOW - phew for a second there Armitage I thought some one else had done my idea , but yeah thats exactly the effect I'm after but 2D of course with no 3D.