Jump to content


Photo
- - - - -

Drawing N-gons


  • Please log in to reply
No replies to this topic

#1 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 28 May 2008 - 12:21 AM

* Drawing N-Gons
* Tutorial Description - A simple and effective way of drawing n-gons (polygons with a desired amount of faces) and parts of n-gons for any Game Maker creation.
* Game Maker version - GM 6
* Registration Requirements - Registered
* File Type - .gm6
* Direct Link - BOX.net (DOWNLOAD)
* Filesize - 9.1kb
* Credit it required

How it's done:
The reason this is registered is because of the primitive drawing functions. The script uses the precision number to find out how many faces it must draw for the N-Gon. Once it finds the precision, it must divide 360 degrees by the precision to be able to make a perfect N-Gon without missing pixels, or without big blank spots in the N-Gon. After finding that out, it uses the "for" statement to add a vertex at every desired location in concurrence of the direction desired. In the end, it's not as hard as it seems, it just takes time to figure it out :)
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-