FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Lua and the iPhone SDK

4 posters

Go down

Lua and the iPhone SDK Empty Lua and the iPhone SDK

Post  m85 Sat Oct 25, 2008 4:14 am

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

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  sio2interactive Sat Oct 25, 2008 8:56 am

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 Wink

Hope that clarify the issue Wink

Cheers,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  thebo Tue Oct 28, 2008 6:50 am

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

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  sio2interactive Tue Oct 28, 2008 4:39 pm

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...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  lane Thu Oct 30, 2008 11:29 am

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.

lane

Posts : 2
Join date : 2008-10-30

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  sio2interactive Thu Oct 30, 2008 4:18 pm

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,
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Lua and the iPhone SDK Empty Re: Lua and the iPhone SDK

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum