Rick Posted April 14, 2013 Share Posted April 14, 2013 I feel like the Lua editor could use a new look to be more efficient. I think the windows on the right side (Output, Warnings, Errors, Debug) should be along the bottom and able to be hidden. In their place I feel the Script directory structure should be displayed so that we get a view of the project scripts all in one place and can more easily switch between our files. When I created my game I put everything under App: because it's so much faster and more efficient than going back and forth to the editor and opening every file I want to work in so they show up as tabs. This would also put the Lua editor more on par with vs/xcode. What else might be cool would be a Create Class Wizard that creates a Lua class in it's own file automatically for us where we give the class name. Much like VS does. This would help keep code consistent since there are a few ways to create classes in Lua. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 14, 2013 Share Posted April 14, 2013 If you grab the separator and move your mouse to the edge of it, it will turn into a horizontal orientation. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 16, 2013 Share Posted April 16, 2013 What would a class look like in your idea rick? Quote Link to comment Share on other sites More sharing options...
Rick Posted May 8, 2013 Author Share Posted May 8, 2013 Missed this, but in LE2 the way I was doing classes was: Bubble = {} Bubble_mt = {} Bubble_mt.__metatable = Bubble Bubble_mt.__index = Bubble Bubble = setmetatable(Bubble, Bubble_mt) function Bubble:New() local obj = {} table.CopyFromTo(self, obj) --obj.color = color obj.sphere = CreateSphere(32) --obj.sphere:SetKey("color", colorNumber) --obj.tmrTurnOff = Timer:New(250) --obj.tmrTurnOff:AddEventHandler(obj, self.TurnOff) obj.sphere:SetScalef(.125, .125, .125) obj.sphere:SetColor(Vec4(1, 0, 0, 1)) return obj end function Bubble:Update() --self.tmrTurnOff:Update() --self.sphere:Turnf(1, 1, 1) end function Bubble:TurnOn(silent) --if silent == false then --PlaySound(self.sound) --end --PaintEntity(self.cube, self.onMaterial) --self.tmrTurnOff:Start() end function Bubble:TurnOff(tmr) --PaintEntity(self.cube, self.offMaterial) --tmr:Stop() end A template for new classes could be made very easily like this with a "Create Class" option for the Lua editor. Could help the Lua programs from making everything global and all in 1 file. When games start getting bigger in Lua and aren't using the entity scripts, using classes like this will help organize it better. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.