Lua: Script help
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.
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.
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.
..........
..........
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.
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
I'll give you a clue: the second idea isn't feasible
If you want to use Javascript as you scripting engine check out <http://www.mozilla.org/js/spidermonkey/> This is what ggadwa's Dim3 uses for scripting. And he scripts almost everything you see with it.
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/>
good luck!
Codemattic
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/>
good luck!
Codemattic
IIRC, Kiki uses Python...
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Running a .APP from within a shell script (osx) | Jamie W | 3 | 2,966 |
Dec 8, 2009 03:06 AM Last Post: Jamie W |
|
| java script using UNITY | imaumac | 6 | 5,345 |
May 16, 2009 08:07 AM Last Post: imaumac |
|
| What do you think about this free cute doggie script :) | Polycount Productions | 1 | 2,091 |
Apr 7, 2006 04:04 AM Last Post: Taxxodium |
|
| Running a lua script multiple times... errors on 2nd,3rd etc | Joseph Duchesne | 10 | 4,856 |
Jul 19, 2005 05:01 AM Last Post: unknown |
|
| Lua: Script glue resources | Fenris | 5 | 3,847 |
Oct 7, 2004 07:24 AM Last Post: AnotherJake |
|

