Has anyone integrated LUA with 3dgs?

Posted By: clone45

Has anyone integrated LUA with 3dgs? - 02/02/08 17:59

Hello!

I was just reading up on LUA. Has anyone attempted to integrate LUA with 3d GamesStudio?

http://www.gamedev.net/reference/programming/features/lua/default.asp

Thanks,
- Bret
Posted By: HeelX

Re: Has anyone integrated LUA with 3dgs? - 02/02/08 18:05

Afaik LUA is natively includable into ANSI-C programs without any fancy STL stuff, so it should be easy to plug it in (into Lite-C).
Posted By: clone45

Re: Has anyone integrated LUA with 3dgs? - 02/02/08 18:11


I figure that it might be easy to create a .dll plug-in for 3d Gamestudio that exposes the lua functionality. I was hoping to avoid installing my trusty rusty version of Visual C++ and doing it myself. I probably won't, as I could imagine myself getting waaaaay of on a tangent instead of actually finishing my game. :-)
Posted By: clone45

Re: Has anyone integrated LUA with 3dgs? - 02/02/08 18:20

I also wonder if it would be possible to register the 3d gamestudio functions into Lua. For example: ent_create(). Could Lua be a replacement to c-script/lite-c? Interesting!
Posted By: Excessus

Re: Has anyone integrated LUA with 3dgs? - 02/02/08 18:20

What advantages does LUA have over Lite-C?
Posted By: ventilator

Re: Has anyone integrated LUA with 3dgs? - 02/02/08 18:53

yes, lua could be a complete replacement of lite-c if you made wrapper for the engine sdk.

i would find it more interesting to embed lua into lite-c though like that tutorial on gamedev.net describes. that could be useful for many things. for example you could use it as a simple yet powerful system for ini files, for string processing, for making parts of your scripts modifiable,...

http://www.coniserver.net/ubbthreads/sho...e=0&fpart=2
it could be used for scripting robots in an updated arena game. you could make only the wanted functions and variables available in lua.

Quote:

What advantages does LUA have over Lite-C?



lua is a dynamic language. it's slower than lite-c but more high level. it supports object orientation, automatic memory management, its string functions are more powerful,...
Posted By: TWO

Re: Has anyone integrated LUA with 3dgs? - 02/05/08 16:54

Because the Lite-C compiler is only half-conform with the ANSI-C standard, it shouldnt be that easy to integrate lua directly into LC. Additionally, binding functions directly to lua in ugly, boost::luabind should be used in combination with C++.

I used lua in some projects of mine, it's great for configuration and events aso. But writing a whole game with it? This will make you crazy because the language itself it crazy =) And please note, lua does not directly support OO features, these things are just some language hacks.

Python it a far better scripting language for big things like a complete game. Py directly supports OO features, the language itself offers more things and it has a great set of standard library
Posted By: ventilator

Re: Has anyone integrated LUA with 3dgs? - 02/05/08 20:35

i agree, i also like python much more as a language.

but lua is more lightweight and easier to embed than python, so in some cases it could make more sense. i didn't look into the lua headers (how many enums and other stuff lite-c doesn't support there are) but from what i have seen in the gamedev.net tutorial it shouldn't be that hard to use with lite-c.
© 2024 lite-C Forums