forums

TNT Basic Forums > Programming Q&A
Unlimited points in a polygon
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-03-2006 17:28

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

I want my game to create a polygon. Is there any way to do this, or would I have to make my own polygon filler.

02-03-2006 18:25

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

"create" a polygon is a bit vague, but if you meant "draw" a polygon, just look in the command reference:


http://www.tntbasic.com/learn/help/commands/poly.htm

02-03-2006 19:03

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

I know I can do that.
What I want to do is kind of like this:

for n=0 to 100
x[n]=random(0,60)
y[n]=random(0,60)
next

set pen color red
Fill Poly With Array x, y


I know that dosen't work, but it's just an example.

02-05-2006 16:50

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Yes you want a command like:

Fill Polly Array my2DArrayOfPoints, myNumberOfPoints

If you submit it into the features request tracker on sourceforge it would be trivial to implement.

Mark

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.