Lines

Game Editor comments and discussion.

Lines

Postby willg101 » Fri Mar 18, 2005 9:29 pm

Is there anyway to draw lines between two actors?
http://www.wish-games.com
Old betas now available!!
User avatar
willg101
 
Posts: 473
Joined: Thu Dec 16, 2004 12:08 am
Location: West Michigan
Score: 5 Give a positive score

Postby Fuzzy » Sat Mar 19, 2005 12:56 am

use the pixel plotting command; (putpixel I think). to have it draw out a nice line, google "bresenhams" line drawing formula. He was/is a scientist who developed a simple way to draw lines way back in the 60's. The coding is ultra simple, and an excellent little lesson in programming.

Note that while the standard bresenham formula is simple and efficient, there are ways to improve upon it. Perhaps you will discover how?
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby makslane » Sat Mar 19, 2005 1:05 am

Just use the moveto, lineto functions.
See the tutorial: Help -> Script -> Drawing Functions
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron