Author Topic: RADAR (Radar is A Death-match Addition to Role-play)  (Read 8250 times)

0 Members and 1 Guest are viewing this topic.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
RADAR (Radar is A Death-match Addition to Role-play)
« on: November 24, 2012, 05:45:13 PM »
ERROR 404
Due to recent events I have stopped working on RADAR, and started working on DarkScape.
DarkScape is based on the original RADAR code, how ever the idea behind it is to make an open source game-mode.

---

I have added a Click-Me button in my signature to link to my DarkScape post, you can also click here to go to it.
« Last Edit: January 21, 2013, 12:29:04 AM by HeLLFox_15 »
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #1 on: November 24, 2012, 07:11:44 PM »
Very nice work, Hellfox!
Experiencing God's grace one day at a time.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #2 on: November 29, 2012, 09:23:14 AM »
I hope to release Alpha 0.15...

...soon but here is one question, should I seperate the code into diffrent files or keep it as one big lua file?

Also does any one have key combo ideas, or just ideas in general? Because some ideas would be greatly appreciated.
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #3 on: November 29, 2012, 01:58:57 PM »
Manage the code in one file or multiple, whichever is most convenient for you as the developer.
Experiencing God's grace one day at a time.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #4 on: November 30, 2012, 08:20:45 AM »
Manage the code in one file or multiple, whichever is most convenient for you as the developer.

I want to make this as easy to edit as possible for other people to be able to integrate it into their server in whatever way they like. ( I bet 50 percent of the file size is going to be just comments. )

So that's why I am asking is it easier to look through one huge file or just find a specific file in your add-ons folder.

So in short, what is most convenient for you as developers.
I cry every time I see that I am not a respected member of this community.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #5 on: November 30, 2012, 11:20:05 AM »
If it's more than about 1k lines, my personal preference is multiple files...
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #6 on: December 01, 2012, 02:49:03 PM »
When you start getting large, and have sections that are client only, and sections that are server only, and then some that do both, it's often easier (again) with large projects to have all three (Which, ULib/ULX does, cl, and sh)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.50]
« Reply #7 on: December 26, 2012, 09:44:49 PM »
I have updated the code above and I have moved the old code to PasteBin, Also I have added another file called rdr_invis.lua its pretty much a copy of what ULX uses for invisibility, but this one will not give you any errors. (Look at the code to see what I mean.)

I am still looking for people to help me with this, I really don't want to post this on facepunch because I am afraid that people will steal it, so please just spread the word to people you think may be interested and together we can make this thing awesome.

Oh and the scores are kinda messed up, and they wont save.

---snip---

Here is the AntiPK code because some people where asking me for just the AntiPK code. (The damage to sender does not work yet but it will, after I update it.)

Code: [Select]
function antiPk( target, dmginfo )
    if( dmginfo:GetDamageType() == DMG_CRUSH ) then
        -- local atk = dmginfo:GetAttacker()         
        -- if( IsValid(atk) and atk:Alive() ) then
            -- if(atk:Health() >= 1) then
                -- atk:SetHealth(atk:Health() - dmginfo:GetDamage())
            -- else
                -- atk:Kill()
            -- end
        -- end
        dmginfo:ScaleDamage( 0 )
    end
end
hook.Add( "EntityTakeDamage", "antiPk", antiPk )
« Last Edit: December 27, 2012, 10:58:16 PM by HeLLFox_15 »
I cry every time I see that I am not a respected member of this community.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
« Reply #8 on: December 31, 2012, 04:08:15 PM »
...
So in short, what is most convenient for you as developers.

I know this isn't a gamemode, but for instance here is a snip of my gamemode's gamemode folder.

Technically this could ALL be in one huge file but considering the init.lua file alone has over 10,000 lines of code in it... It would just be an unreadable mess.



Just be sure you set up your includes correctly and keep in mind that certain things are called in order, such as setting up tables and such. For instance.. make sure a table exists in your code before you try to modify it. This is pretty basic and easy to understand if you keep your code in one file, but can start to get tricky when you break it down.
« Last Edit: December 31, 2012, 04:09:49 PM by MrPresident »