Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: LuaTenshi on November 24, 2012, 05:45:13 PM

Title: RADAR (Radar is A Death-match Addition to Role-play)
Post by: LuaTenshi on November 24, 2012, 05:45:13 PM
ERRO (http://forums.ulyssesmod.net/index.php/topic,5970.msg27915.html#msg27915)R 40 (http://forums.ulyssesmod.net/index.php/topic,5970.msg27915.html#msg27915)4
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. (http://forums.ulyssesmod.net/index.php/topic,5970.msg27915.html#msg27915)
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: Megiddo on November 24, 2012, 07:11:44 PM
Very nice work, Hellfox!
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: LuaTenshi 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.
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: Megiddo 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.
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: LuaTenshi 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.
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: Megiddo on November 30, 2012, 11:20:05 AM
If it's more than about 1k lines, my personal preference is multiple files...
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: JamminR 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)
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.50]
Post by: LuaTenshi 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 )
Title: Re: RADAR (Radar is A Death-match Addition to Role-play) [Alpha 0.10]
Post by: MrPresident 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.

(https://dl.dropbox.com/u/5982978/ForumLinks/strandedfiles.png)

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.