Author |
Message |
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
Lua
I think CC would be a lot better off if it used Lua as its scripting language, it's a lot more flexible and easier to understand(And read ) and would allow for people to create much more complex stuff than currently possible. What do you think? Heh, my first post is a suggestion..
|
Fri Jul 13, 2007 9:37 pm |
|
|
AlphaCommando
Joined: Wed May 02, 2007 10:27 pm Posts: 514 Location: Eating ice cream at Graeter's
|
Re: Lua
I think its fine as is, but there is always room for improvement, however; I think we have gotten used to how it is now.
|
Fri Jul 13, 2007 9:39 pm |
|
|
Alenth Eneil
Joined: Mon Dec 04, 2006 3:34 am Posts: 2378
|
Re: Lua
Putting in lua would require a bunch of work for payoff that Data probably doesn't need.
|
Fri Jul 13, 2007 9:41 pm |
|
|
p3lb0x
Forum Moderator
Joined: Fri Feb 02, 2007 3:53 pm Posts: 1896 Location: in my little gay bunker
|
Re: Lua
Lua isnt "easy to understand" if you cant understand simple variables, you have no chance to do ANYTHING in Lua
|
Fri Jul 13, 2007 11:59 pm |
|
|
Shade
Joined: Sat Apr 28, 2007 3:22 pm Posts: 493
|
Re: Lua
Once I saw Lua code, I was baffled. Much later I found Cortex Command code, and I could at least understand the variables well enough on my own.
|
Sat Jul 14, 2007 12:19 am |
|
|
couchcaboose
Joined: Tue Oct 31, 2006 6:10 pm Posts: 358 Location: at ze kopta!
|
Re: Lua
I'm fine by how the script works currently. No need to change it. (well for my opinion)
|
Sat Jul 14, 2007 3:00 am |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Lua
The code base requires more comments, or at least someone should post an indepth description of each variable possible.
|
Sat Jul 14, 2007 4:25 am |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
Re: Lua
IMO the current system is messy as hell - It's basically just a bunch of variables, sure, it's easy as moving an eye lid but it's inefficient and messy.
|
Sat Jul 14, 2007 7:24 pm |
|
|
Pyrorex
Joined: Sun Jun 24, 2007 6:13 am Posts: 505
|
Re: Lua
It takes finnesse to make it efficient. You just haven't done enough for it to be easy and clean.
|
Sat Jul 14, 2007 7:26 pm |
|
|
Xera
Joined: Fri Jul 13, 2007 12:11 pm Posts: 15 Location: Xera
|
Re: Lua
Pyrorex wrote: It takes finnesse to make it efficient. You just haven't done enough for it to be easy and clean. Seriously, how can you say something like Code: AddAmmo = Round InstanceName = Round Supreme Blast ParticleCount = 4 Particle = MOPixel InstanceName = Particle Supreme Digger Mass = 0.2 RestThreshold = 500 LifeTime = 20 Sharpness = 28 HitsMOs = 1 GetsHitByMOs = 0 Color = Color R = 35 G = 171 B = 255 Atom = Atom Material = Material CopyOf = Bullet Metal TrailColor = Color R = 35 G = 171 B = 255 TrailLength = 10 Shell = None FireVelocity = 95 ShellVelocity = 10 Separation = 10
AddAmmo = Round InstanceName = Round Very Supreme Blast ParticleCount = 4 Particle = MOPixel InstanceName = Particle Very Supreme Digger Mass = 0.35 RestThreshold = 500 LifeTime = 20 Sharpness = 28 HitsMOs = 1 GetsHitByMOs = 0 Color = Color R = 255 G = 255 B = 255 Atom = Atom Material = Material CopyOf = Bullet Metal TrailColor = Color R = 255 G = 255 B = 255 TrailLength = 10 Shell = None FireVelocity = 95 ShellVelocity = 10 Separation = 10
isn't messy? Compared to this Code: if(SERVER) then
AddCSLuaFile("autorun/healthfix.lua")
function UpdateHealth() local Ents = ents.GetAll() for k,v in pairs(Ents) do if(v:GetHealth() != v:Health()) then v:SetNWFloat("hp", v:Health()) end if(v:GetNWMaxHealth() != v:GetMaxHealth()) then v:SetNWFloat("maxhp", v:GetMaxHealth()) end end end
hook.Add("Think", "HealthThink", UpdateHealth) end
local meta = FindMetaTable("Entity")
function meta:GetHealth()
local hp = self:GetNWFloat("hp")
return hp
end
function meta:GetNWMaxHealth()
local mhp = self:GetNWFloat("maxhp") return mhp
end
if(CLIENT) then
local function hphud() if(!LocalPlayer():Alive()) then return end local TR = LocalPlayer():GetEyeTrace()
if(TR.HitWorld || !TR.Entity || !TR.Entity:IsValid()) then return end
local sw,sh = ScrW(), ScrH() --draw.RoundedBox( 0, sw/2-53.5, sh/2-20, 107, 40, Color(173,255,47,200)) local String1 = "" if(TR.Entity:IsPlayer()) then String1 = TR.Entity:GetName() else String1 = TR.Entity:GetClass() end local Percent = TR.Entity:GetHealth() / TR.Entity:GetNWMaxHealth() --print(Percent) Percent = Percent*100 local Colour = Color((Percent*100)*4,0,math.fmod(255,(Percent*100)*3)) draw.RoundedBox(0, (sw/2)-Percent, sh/2+20, Percent*2, 10, Colour) local Text = {} Text.text = "Name: "..String1 Text.font = "GModWorldTip" Text.xalign = TEXT_ALIGN_CENTER Text.yalign = TEXT_ALIGN_CENTER Text.pos = {sw/2, sh/2-60} Text.color = Color(0,0,0,255) draw.Text(Text) Text.text = TR.Entity:GetHealth() Text.pos[2] = sh/2-40 draw.Text(Text) end hook.Add("HUDPaint", "hphud", hphud)
end
Yeah, that's for a completely different game but the same principle could be applied to CC.
|
Sat Jul 14, 2007 7:30 pm |
|
|
Alenth Eneil
Joined: Mon Dec 04, 2006 3:34 am Posts: 2378
|
Re: Lua
It would take a lot of work to put in lua, and Data doesn't need anything near as powerful as lua for CC. Not to mention we are comparing apples to oranges here. CC's .inis are just variables, not code, not script, used properly you can emulate script... but that's not exactly it's real purpose. We can't see the scripts or code of CC right now. Lua is a rather different thing than our beloved .ini files.
|
Sat Jul 14, 2007 7:34 pm |
|
|
ProjektTHOR
Banned
Joined: Tue Feb 27, 2007 4:05 pm Posts: 2527
|
Re: Lua
Also, I like working with a higher-level "language." That is--to be very similar to English. If I wanted to code in assembly, I would.
|
Sat Jul 14, 2007 9:17 pm |
|
|
Kokits
Joined: Sun Dec 03, 2006 4:00 am Posts: 578 Location: America
|
Re: Lua
Alenth wrote: It would take a lot of work to put in lua, and Data doesn't need anything near as powerful as lua for CC. Not to mention we are comparing apples to oranges here. CC's .inis are just variables, not code, not script, used properly you can emulate script... but that's not exactly it's real purpose. We can't see the scripts or code of CC right now. Lua is a rather different thing than our beloved .ini files. Yep, yep, yep.
|
Sun Jul 15, 2007 12:56 am |
|
|
BreenedandScrooned
Joined: Tue Dec 26, 2006 9:35 am Posts: 481
|
Re: Lua
I can't even understand the Lua code. I probably could learn it if I wanted to, but I don't think Cortex Command needs it. The .inis are fine, in my opinion.
|
Sun Jul 15, 2007 1:27 am |
|
|
venn177
Joined: Sun Mar 18, 2007 5:35 am Posts: 3778 Location: Largo, Florida
|
Re: Lua
Lua is easy to learn, but it's not necessary for ANY 2d game that people want to learn to mod. Anything lua can do we can emulate with variables.
|
Sun Jul 15, 2007 2:56 am |
|
|
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|