witawat Posted April 11, 2012 Share Posted April 11, 2012 hello why use lua codeing, it good or not and protect code ok ? then god how to learning and use support pascal ? thankyou Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted April 11, 2012 Share Posted April 11, 2012 Lua was introduced really as an object scripting language and support for it is embedded in the Leadwerk API code, so it works regardless of what language you are using to write your game. Some people are taking it further and writing their entire game in Lua. I personally wouldn't do that, but if the game is simple enough and doesn't involve a lot of heavy computation then it's quite practical to do so. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Birdman Posted April 11, 2012 Share Posted April 11, 2012 I use LUA to code some parts of stuff i would like to let Map makers or artists modify. Atm most of my LUA code is for objects like Cars, or static objects that have some behaviour (like lights etc). A thing that would be good to code in LUA would be also Interface, i'm trying to work on that, also to let non programmers be able to modify part of the stuff i code. With things like SetGlobalObject or SetKey you can set global objects or object variables from LUA that you can use in code. I use this to send settings of object files to my C++ code. Quote Link to comment Share on other sites More sharing options...
Benton Posted April 11, 2012 Share Posted April 11, 2012 I use LUA for everything because I get none of the hassles of C++. If I need to really optimize some code I will compile the LUA code into a .luac file. Compiled LUA is almost as fast as C++. Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Josh Posted April 11, 2012 Share Posted April 11, 2012 In Leadwerks3D, Lua will also be an easier route because you don't have to mess around with different projects and compilers, especially for mobile platforms. 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...
Benton Posted April 11, 2012 Share Posted April 11, 2012 Wooo! Josh, how about compiled Lua, is that safe to put in a distrobution folder? Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Pixel Perfect Posted April 11, 2012 Share Posted April 11, 2012 I use LUA for everything because I get none of the hassles of C++. One could equally argue you get none of the advantages of C++ either, but I don't want to rain on your parade. We each choose a path and live with the consequences 1 Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Josh Posted April 11, 2012 Share Posted April 11, 2012 Wooo! Josh, how about compiled Lua, is that safe to put in a distrobution folder? Probably not:http://luadec51.luaforge.net 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...
Birdman Posted April 11, 2012 Share Posted April 11, 2012 Is there a way to protect LUA files? I tried to place em in a zip protected file, but they won't run from there. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 11, 2012 Share Posted April 11, 2012 I think they will run from a passworded zip, but the main app has to be given the password through code somehow. 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...
Benton Posted April 11, 2012 Share Posted April 11, 2012 But passworded zips are easy to break, and can be read, right? Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Josh Posted April 11, 2012 Share Posted April 11, 2012 If you make the password long enough they can't be broken in a reasonable amount of time. 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...
Birdman Posted April 11, 2012 Share Posted April 11, 2012 You can always Envelope a file to work only with your EXE, adding more protection. Still is better than having the files left on the open. So Josh, how do you make the lua work inside a zip? i wasn't able to do that. Quote Link to comment Share on other sites More sharing options...
Benton Posted April 11, 2012 Share Posted April 11, 2012 i think you rename the .zip to .pak Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Daimour Posted April 11, 2012 Share Posted April 11, 2012 So Josh, how do you make the lua work inside a zip? i wasn't able to do that. Try to watch "hiding password" video here: http://www.leadwerks.com/werkspace/files/file/329-obfuscator2lua/ May be it will help. Quote Link to comment Share on other sites More sharing options...
Birdman Posted April 12, 2012 Share Posted April 12, 2012 I launch LUA from c++ code using BP L=GetLuaState(); lua_pushobject(L,fw); lua_setglobal(L,"fw"); lua_pop(L,1); Problem is, i have no clue on how to protect the scripts folder and make it work. I can protect the data folder and it works ok with something like this: SetZipStreamPassword("data.pak","pass"); RegisterAbstractPath("/data"); I been trying to do the same with scripts folder in the same data.pak, or in scripts.pak with RegisterAbstractPath("/scripts"), but it simply won't work. Error i get is "can't open script/class". So far i wasn't unable to solve this. Quote Link to comment Share on other sites More sharing options...
Aily Posted May 13, 2012 Share Posted May 13, 2012 What do you talking about? Hide..code..password. Ok, seems like Quake3 code are shared, which one of you all see it? I think is code doesn't need anyone. Need ready product. And if some peace of my code will have somebody - he's welcome (after project release). Because next code - is always better than previouse. Quote "Better" is big enemy of "good" Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted May 13, 2012 Share Posted May 13, 2012 why use lua codeing seamless integration with the editor... most people use lua to implement functional capable instances of their object in the editor... at least that's what i see as the primary benefit... conceivably, if you script enough self contained objects you should be able to load and play your game entirely in the editor... not sure how practical that'd be, but... also (as mentioned above), there's the cross platform aspects to consider... --Mike Quote Link to comment Share on other sites More sharing options...
shadmar Posted May 13, 2012 Share Posted May 13, 2012 Mike is right on the money, Editor makes my life easy (atleast), so design levels and setup smart lua objects in the editor and load the scene using whatever language you want to run your game code in (c++ / pascal etc..) including all libs you need etc.. Or just use lua for everything. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB 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.