Lua: Script help - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: Lua: Script help (/thread-7448.html)
Lua: Script help - hyperzoanoid - Dec 14, 2002 09:12 PM
So far ive been using special variables for my game, with their own apps to set their values. I have characters, control panels, vehicles etc. I heard somewhere that scripting would allow me to make one variable and then use scripts to make it do anything in its capacity. This means i wouldnt have to use seperate variables with their own apps to make them but instead i could use one universal one. I searched apples cocoa documentation and i only found stuff on applescript.
I have several questions too.
1) When a script goes into an app, how does it get converted to code?
2) Does the script need to be translated constantly to perform tasks?
sorry if this does not make sense, im completely lost, and completly tired.
Lua: Script help - hyperzoanoid - Dec 14, 2002 09:30 PM
cant stop thinking........
ok i got an idea.
translate the script to pure code.
save it to the hard drive as a source code file
load it dynamically using NSBundle this will make a class
make as many variables as there are of that one script
untested. Is this feasible? Is it healthy for the app?is it cheating?
once again i am a complete nooB with scripts, the only reason i want to use them is to make my code better and to allow users to make stuff to the last iota as it exists in my app.
Lua: Script help - OneSadCookie - Dec 14, 2002 09:57 PM
Read the other threads on this forum about scripting. I think they'll give you an idea of what scripting can and can't do for you.
I'll give you a clue: the second idea isn't feasible
Lua: Script help - codemattic - Dec 15, 2002 07:18 AM
A couple of uDG2002 entries used Lua <http://www.lua.org/> (like OSC's 'Smiley Tag' and Monster Kodi's 'Kiki the Nanobot') - so when the source code is made available you can look at that and see how it was embedded.
Python <http://python.org/> is used often for games. There is even a cross-platform SDL/Python game developement <http://pygame.org/>
Lua: Script help - hyperzoanoid - Dec 15, 2002 08:15 AM
ok ill check those out. Thanx for the advice.
Lua: Script help - OneSadCookie - Dec 15, 2002 12:49 PM
IIRC, Kiki uses Python...