Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 1,258 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Has anyone integrated LUA with 3dgs? #181642
02/02/08 17:59
02/02/08 17:59
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco
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

Last edited by clone45; 02/02/08 18:00.
Re: Has anyone integrated LUA with 3dgs? [Re: clone45] #181643
02/02/08 18:05
02/02/08 18:05
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
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).

Last edited by HeelX; 02/02/08 18:05.
Re: Has anyone integrated LUA with 3dgs? [Re: HeelX] #181644
02/02/08 18:11
02/02/08 18:11
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco

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. :-)

Re: Has anyone integrated LUA with 3dgs? [Re: clone45] #181645
02/02/08 18:20
02/02/08 18:20
Joined: Mar 2002
Posts: 580
San Francisco
clone45 Offline OP
User
clone45  Offline OP
User

Joined: Mar 2002
Posts: 580
San Francisco
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!

Re: Has anyone integrated LUA with 3dgs? [Re: clone45] #181646
02/02/08 18:20
02/02/08 18:20
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
What advantages does LUA have over Lite-C?

Re: Has anyone integrated LUA with 3dgs? [Re: Excessus] #181647
02/02/08 18:53
02/02/08 18:53
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
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,...

Re: Has anyone integrated LUA with 3dgs? [Re: ventilator] #181648
02/05/08 16:54
02/05/08 16:54
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
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

Re: Has anyone integrated LUA with 3dgs? [Re: TWO] #181649
02/05/08 20:35
02/05/08 20:35
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
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.


Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1