Lua and the iPhone SDK
4 posters
Lua and the iPhone SDK
I thought that Apple disallowed embedding interpreters in iPhone application so I was surprised to see Lua scripting in the SIO2 engine. Have I misinterpreted the guidelines?
m85- Posts : 1
Join date : 2008-10-25
Re: Lua and the iPhone SDK
No iPhone specific API are wrapped around LUA, its only SIO2 API, standard OpenGL API and standard OpenAL API, nothing is specific to the iPhone inside... so its cool... it would cause problem if some iPhone specific API were "callable" from LUA but there's none, checkout the source code you'll see it for yourself
Hope that clarify the issue
Cheers,
Hope that clarify the issue
Cheers,
Re: Lua and the iPhone SDK
How big is the hit on performance using lua? What do you think? Because it is not compiled into native code before it is executed, right?!
thebo- Posts : 3
Join date : 2008-10-02
Re: Lua and the iPhone SDK
I didn't really do an extreme profiling session on that but for small functions, or affectation routine the performance is quite acceptable. Don't get me wrong here, I am not encouraging nobody to write its full game in LUA, I just want to provide a scripting language that can be used and easily expanded depending on the user needs...
Re: Lua and the iPhone SDK
Having used LUA on mobile devices in the past, I would recommend only using it lightly. LUA does a lot of small memory allocations (and I do mean a lot), which are extremely costly on device, both because the memory allocation is costly and because touching RAM is extremely costly. On device access, especially writing, to RAM is to be avoided whenever possible.
We had to strip LUA out and re-code everything in C++ for one project, and are now using my custom scripting language instead. However, if you are not trying to use LUA in an FPS intensive manner (for example to control your UI) then it should be fine.
We had to strip LUA out and re-code everything in C++ for one project, and are now using my custom scripting language instead. However, if you are not trying to use LUA in an FPS intensive manner (for example to control your UI) then it should be fine.
lane- Posts : 2
Join date : 2008-10-30
Re: Lua and the iPhone SDK
I totally agree with Lane, it is really convenient and basically fast compare to other scripting language around, but its like "handle with care". It is really handy to handle small job or configuration but should not be abused...
lane: You mention that now you are using your own scripting language... would it be possible to check it out? Maybe if its suitable enough I can integrate it inside SIO2 as well. Would you mind share the source code? If its ok with you I would like to see an example of the syntax and also would like to know if in which programming language is written in C or C++?
Tks in advance,
Cheers,
lane: You mention that now you are using your own scripting language... would it be possible to check it out? Maybe if its suitable enough I can integrate it inside SIO2 as well. Would you mind share the source code? If its ok with you I would like to see an example of the syntax and also would like to know if in which programming language is written in C or C++?
Tks in advance,
Cheers,
Similar topics
» SIO2 and iPhone OS 3.0
» iPhone 3D CPU & Bus Speed
» iPhone OS 3.0 experiences
» App crashing on iphone
» optimizing GFX calls on iphone 2G and 3G
» iPhone 3D CPU & Bus Speed
» iPhone OS 3.0 experiences
» App crashing on iphone
» optimizing GFX calls on iphone 2G and 3G
Permissions in this forum:
You cannot reply to topics in this forum