Closed Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: [Release]EGP clock+EGP radar

  1. #11
    Wirererer NikoKun's Avatar
    Join Date
    May 2008
    Posts
    124

    Default Re: [Release]EGP clock+EGP radar

    ah, cool.

    Yeah, I tried out the clock too, pretty neat.
    Although, I think it was 1 hour ahead of my OS time. And when I remarked out the "Hour++" and "Hour = Hour%24" part, it was the correct time, although I'm not sure yet what those do. lol That probably screws up something else, by doing that. lol

    I've been playing around with a lot of EGP lately, but I really suck so far.
    ------------------------------------
    aka "Nik of the Wired" in gmod.

  2. #12
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    Quote Originally Posted by NikoKun View Post
    ah, cool.

    Yeah, I tried out the clock too, pretty neat.
    Although, I think it was 1 hour ahead of my OS time. And when I remarked out the "Hour++" and "Hour = Hour%24" part, it was the correct time, although I'm not sure yet what those do. lol That probably screws up something else, by doing that. lol

    I've been playing around with a lot of EGP lately, but I really suck so far.
    yes, thats right, coz the time on my server is gmt+0 (Uk), and im GMT+1

    at the Hour%24:

    time uk=23 hrs
    Time++ -> Time=24 hours, so I have to do Time%24=0

    Coz Im pretty sure there is no such time as 24:00 but only 00:00



    But its unlikely that youd be at the server at 23, but you know, crash proof code must be.



    new radar code: (updated on OP too)


    Last edited by Unsmart; 01-26-2010 at 04:57 AM.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  3. #13
    Wirererer NikoKun's Avatar
    Join Date
    May 2008
    Posts
    124

    Default Re: [Release]EGP clock+EGP radar

    Awesome, now the radar works!

    Just curious, why use the entity marker/becon sensor? Is there some advantage to using that, rather than just using the chip as the centerpoint?
    ------------------------------------
    aka "Nik of the Wired" in gmod.

  4. #14
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    Yes, as I like to keep the chip on the EGP, and the EGP is rotated, well, and I like to use object for bearing rather than the chip. Its easier to move object than the whole eGP

    ---------------------------

    away for 1 week, dont expect any replies from me, unless I get to a free wifi spot and use my phone.
    Last edited by Unsmart; 12-24-2009 at 12:17 AM.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  5. #15
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    UPDATE!

    I finished the radar code, I added variables for:
    +max find distance (the grid data changes too!)
    +max people to find
    +higher find rate to prevent lag, BUT fast updater of pos for FOUND entities (see note 1)
    ~fixed the scale, so when you 500 units away, you will be at the circle, its perfectly scaled now!
    ~you cant see the disposed circles anymore (covered it up with highest index circle!)


    Code is in OP

    -----
    Note 1: it works like this:
    FINDS new players AND updates pos
    step 1a: find players in 1K (or the variable MaxDist, 1K is default) units from cube
    step 1b: draw/update the player pos
    step 1c: dispose of lost people(no more in scan area)
    UPDATES pos of FOUND players (will NOT update if it previously found the players (logic, duh!))
    step 2a: scan the found people in array
    step 2b: clamp distance, so it wont draw outside the circle
    step 2c: update position



    This way, I dont need to query for new people as often, while reducing OPS.
    Attached Thumbnails Attached Thumbnails [Release]EGP clock+EGP radar-radar3.jpg   [Release]EGP clock+EGP radar-radar2.jpg   [Release]EGP clock+EGP radar-radar1.jpg  
    Last edited by Unsmart; 01-26-2010 at 05:18 AM.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  6. #16
    Alopex Lagopus DanKing's Avatar
    Join Date
    Aug 2009
    Location
    Bergen, Norway
    Posts
    632

    Default Re: [Release]EGP clock+EGP radar

    That is pretty cool Unsmart, you have to show it to me (when I get home)

  7. #17
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    Quote Originally Posted by DanKing View Post
    That is pretty cool Unsmart, you have to show it to me (when I get home)
    sure, but you can actually show it yourself :P I released the code (in OP, well, the code was released from beginning). But Ill be glad to show if we will be both on. also, I hope the setup instructions in OP are clear enough.
    Last edited by Unsmart; 01-26-2010 at 06:44 AM.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  8. #18
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    OK, I decried to come back to this, and add some finishing touches to the clock.

    ~Made it selfaware, no need for time gate now
    ~added random colors to the hour showers
    +made the hour clock take into account minutes, so now it just doesn't hand at a hour, but rather goes in between them, like on real clock.
    ~the hour clock is now the shortest hand
    +the minute hand is shorter too, but only slightly
    +the above changes take the RATIO var into account

    Code:
    @name EGP clock by Unsmart v3
    @inputs W:wirelink 
    @outputs Ratio:vector2  Min Hour Sec
    @persist Mid
    @trigger 
    interval(500)
    if(first())
    {
        W:egpClear()
        timer("draw",500)
    }
    if(clk("draw"))
    {
        #base
        #edit me
        RatioReal=vec2(1,1)
        RatioReal=clamp(RatioReal,vec2(0.1,0.1),vec2(1.2,1.2))
        
        
        Size=220
        Size=clamp(Size,10,220)
        Ratio=RatioReal*Size
        Mid=256
        #dont edit me  below
        
        #base 4 digits
        W:egpBox(12,Mid-5,Mid-Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(6,Mid-5,Mid+Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        W:egpBox(3,Mid+Ratio:y()-5,Mid-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(9,Mid-Ratio:y()-5,Mid-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        #other
        W:egpBox(1,Mid-sin(30*11)*Ratio:y()-5,Mid-cos(30*11)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(2,Mid-sin(30*10)*Ratio:y()-5,Mid-cos(30*10)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        W:egpBox(11,Mid-sin(30*1)*Ratio:y()-5,Mid-cos(30*1)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(10,Mid-sin(30*2)*Ratio:y()-5,Mid-cos(30*2)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        W:egpBox(4,Mid-sin(30*8)*Ratio:y()-5,Mid-cos(30*8)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(5,Mid-sin(30*7)*Ratio:y()-5,Mid-cos(30*7)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        W:egpBox(8,Mid-sin(30*4)*Ratio:y()-5,Mid-cos(30*4)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        W:egpBox(7,Mid-sin(30*5)*Ratio:y()-5,Mid-cos(30*5)*Ratio:x()-5,10,10,randint(0,255),randint(0,255),randint(0,255),255)
        
        #render
        W:egpDraw()
        timer("hands",100)#max FPs=12 D:
    }
    
    Min=time("min")
    Hour=time("hour")
    Sec=time("sec")
    
    #Hour++ #for server thats GMT+0 and your gmt+1
    #Hour=Hour%24
    
    if(clk("hands"))
    {
        
        #hands
        W:egpLine(20,Mid,Mid,Mid+1,Mid+1,255,255,255,255)#sec
        W:egpLine(21,Mid,Mid,Mid+1,Mid-1,0,255,255,255)#min
        W:egpLine(22,Mid,Mid,Mid-1,Mid-1,255,255,0,255)#hour
        
        #digital timed
        Str=""
        if((Hour+""):length()==1){Str+="0"+Hour+":"}else{Str+=""+Hour+":"}
        if((Min+""):length()==1){Str+="0"+Min+":"}else{Str+=""+Min+":"}
        if((Sec+""):length()==1){Str+="0"+Sec}else{Str+=""+Sec}
        W:egpText(23,Str,vec2(Mid-50,Mid+50),vec(255,0,0),255)
        
        #circle
        #W:egpCircle(-1,Mid,Mid,100,100,255,255,255,255)
        
        W:egpDraw()
    }
    
    
    
    
    #clock is only 12 hours!
    if(Hour>12){Test=Hour-12}else{AmPm=Hour}
    
    W:egpPos2(20,Mid-cos((Sec+15)*(360/60))*Ratio:y(),Mid-sin((Sec+15)*(360/60))*Ratio:x())
    W:egpPos2(21,Mid-cos((Min+15)*(360/60))*(Ratio:y()-(Ratio:y()/7)),Mid-sin((Min+15)*(360/60))*(Ratio:x()-(Ratio:x()/7)))
    W:egpPos2(22,Mid-cos((AmPm+3+(Min/60))*(360/12))*(Ratio:y()-(Ratio:y()/3)),Mid-sin((AmPm+3+(Min/60))*(360/12))*(Ratio:x()-(Ratio:x()/3)))
    
    
    Str=""
        if((Hour+""):length()==1){Str+="0"+Hour+":"}else{Str+=""+Hour+":"}
        if((Min+""):length()==1){Str+="0"+Min+":"}else{Str+=""+Min+":"}
        if((Sec+""):length()==1){Str+="0"+Sec}else{Str+=""+Sec}
        W:egpText(23,Str,vec2(Mid-50,Mid+50),vec(255,0,0),255)
    
    
    
    
    W:egpDraw()
    Attached Thumbnails Attached Thumbnails [Release]EGP clock+EGP radar-clock-rand.jpg  
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  9. #19
    Wirererer Maxaxle's Avatar
    Join Date
    Sep 2009
    Posts
    177

    Default Re: [Release]EGP clock+EGP radar

    Whenever I select the code for the radar, the list numbers show up as well! Can you fix it or attach a file, please?
    Still very clueless about code in general.
    92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.

  10. #20
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: [Release]EGP clock+EGP radar

    Quote Originally Posted by Maxaxle View Post
    Whenever I select the code for the radar, the list numbers show up as well! Can you fix it or attach a file, please?
    quote my post, and extract code from there -.-

    edit: Iv changed it to code tags, since the new forum just sucks, why did they even update?! Also, the highlight=e2 thing is STILL unfixed.
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

Closed Thread
Page 2 of 4 FirstFirst 1234 LastLast

LinkBacks (?)

  1. 01-27-2010, 03:13 PM

Similar Threads

  1. [Release] Balls of Steel (Re-release)
    By Moglizorz in forum Finished contraptions
    Replies: 95
    Last Post: 09-05-2010, 02:30 PM
  2. [Release] Holographic Digital Clock
    By Moglizorz in forum Finished contraptions
    Replies: 1
    Last Post: 08-09-2009, 10:38 AM
  3. ZP's Phys Clock
    By F12Bwth in forum Finished contraptions
    Replies: 12
    Last Post: 06-25-2008, 11:00 AM
  4. Binary Clock?
    By timas in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 05-12-2007, 11:30 AM
  5. Clock chip
    By HL-SDK in forum Ideas & Suggestions
    Replies: 13
    Last Post: 04-02-2007, 01:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots