Jump to content



  • Please log in to reply
4 replies to this topic

#1 _202389


    GMC Member

  • New Member
  • 16 posts

Posted 06 February 2012 - 04:01 PM

its simple sigth drawing. very useful but not very fast when you decrease distance between points.

draw_sight(x,y,sight view,angle, distance between points,sight range,color,outline width,alpha)

for(i=0 i<argument2 i+=argument4)
{var uzaklik,uzaklik2;
do{uzaklik+=2    }
until(collision_line(x,y,x+lengthdir_x(uzaklik,i-argument2/2+argument3),y+lengthdir_y(uzaklik,i-argument2/2+argument3),argument6,1,0) or uzaklik>argument5)
do{uzaklik2+=2    }
until(collision_line(x,y,x+lengthdir_x(uzaklik2,i-(argument2/2-argument4)+argument3),y+lengthdir_y(uzaklik2,i-(argument2/2-argument4)+argument3),argument6,1,0) or uzaklik2>argument5)

if i=0 
if i=argument2-argument4
draw_line_width_color(x,y,x+lengthdir_x(uzaklik2-3,+argument2/2+argument3),y+lengthdir_y(uzaklik2-3,+argument2/2+argument3),argument8,argument7,argument7) }

Posted Image
Posted Image

  • 2

#2 kikjezrous


    Seer of Spaaace

  • GMC Member
  • 637 posts
  • Version:GM8.1

Posted 06 February 2012 - 04:08 PM

Wow, this looks awesome! This is a really wonderful engine that you have made - combined with collision_line() and point_distance(), you could create some awesome AI. I hope to see some games with this in it. (Maybe from me, even) Thank you taking the time to make this.
  • 0
MXfDv0N.png > braveadventurer@quest-DUTIMS:~$ _ don tseethebr akuhhuh Thread - Mirror - Tumblr


#3 wnsrn3436


    GMC Member

  • GMC Member
  • 192 posts
  • Version:GM:Studio

Posted 23 February 2012 - 02:41 PM

Oh, my God. This seems to be pretty good.
Only, Speed ​​only a little bad. :thumbsup:

Edited by wnsrn3436, 23 February 2012 - 02:43 PM.

  • 0

#4 Pigdug Gaming

Pigdug Gaming

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 26 February 2012 - 07:04 PM

this is pretty cool but it runs really slow :(
  • 0

#5 iam1me


    GMC Member

  • GMC Member
  • 380 posts
  • Version:GM8

Posted 26 February 2012 - 10:51 PM

I think you could get this to run faster if you started off by drawing the entire range (on to a surface) and then grab all of the instances in the area and subtract their "shadows." You could have a fast version that runs off of the bounding boxes and a slower one that is pixel precise.

Cool idea though :)

Edited by iam1me, 26 February 2012 - 10:51 PM.

  • 0
GUI API V1.0 is now here! http://gmc.yoyogames...0

Advanced Event Handling, Dynamic Interfaces, & Code Organization you can't get anywhere else using GML.

From a review by Creative Fusion:

It is extremely rare for me to comment, but all programmers that want to learn how to write professional code and everyone that wants a professional, easy-to-use, flexible, and FAST gui/hud/inventory/etc. system should support this project's development. I have been employed as a programmer (C++/CLI, C#, VisualBasic.NET, JavaScript, etc.) and know what companies look for and use, and I want to let people here know that they are using gui frameworks similar to what iam1me is providing here (if only gml were more object-oriented). For those that don't understand the current and massive potential benefits, I will try to help explain...

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users