LUA

LUA

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

LUA

Post by AF »

I'm fiddling about tryign to integrate a lua interpreter into a groupAI dll, but I realise all I knwo about lua I learnt in the last hour ro two. SO please post anythign of use here.
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

I know nothing of lua. All I know when it comes to interpreted languages right now is python (which isn't much faster than Java).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

And I do know there is a lua <> python bridge.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

LUA (loo-ah) is an interpreted AND a compiled language. Yes, it can be both.

There's something called LUA Bind that's Object-based LUA, very snazzy.

-Buggi
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

All I know when it comes to interpreted languages right now is python (which isn't much faster than Java).
afaik basic python is one of the slowest interpreted languages around.
http://osnews.com/story.php?news_id=5602&page=3

good idea though, it would be good to support basically any other language to allow more people to work on an AI
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

Python is entirely interpreted though. Such slowness is expected if you have to parse all of the tokens again when you load the program up again. When using compiled python files (which python now uses by default now), you get quite a performance boost. Lua is still a better choice for game scripting, because its a lot lighter weight than python is.

The fact of the matter is that all interpreted languages are slow, so your best bet is just going with the one that is the fastest. Impliment it so that it isn't consulted every single cpu cycle and you are in luck. =)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

BF2 uses Python...
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

FLOZi wrote:BF2 uses Python...
That is cool.... :lol:

I like python...
User avatar
Cheery
Posts: 129
Joined: 09 May 2005, 10:30

Post by Cheery »

I think python is more like it's own language. LUA looks like a ripoff of C -language, which is hard to learn.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Whereas Python is exceptionally easy to learn...

Yes, I'm also a Python fan. :-)
User avatar
Ace07
Posts: 348
Joined: 21 Apr 2005, 20:46

Post by Ace07 »

FLOZi wrote:Whereas Python is exceptionally easy to learn...

Yes, I'm also a Python fan. :-)
I still hate "self". I hate typing that in....I really do.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

BF2 also has the worst engine backend I've ever seen in a game. It ran twice as worse as Doom 3 while struggling to get graphics that rivalled Unreal... just Unreal. As in Unreal I. Come on, I ran Doom 3 at medium settings at 800x600 and HL2 at high across the board, except water, with 2xAA at 1024x768, and those games are around a year old already! BF2 has no excuse for such a shitty engine.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

C++ isn't hard to learn.

And what the hell is twice as worse?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Perhaps your eysesight is failing you, but BF2 graphics arefar better than Unreal :P

BitTorrent, Google... just some more notable users of Python. :wink:
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

still, a number of apps using python doesn't mean it's fast enough for a game like spring.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Its important to know what it was doing, rather than that it was just doing something.
coryrc
Posts: 81
Joined: 01 May 2005, 23:09

Post by coryrc »

Whoa, I love Python, but don't use it in-game for scripting the units or AI.
el_muchacho
Posts: 201
Joined: 30 Apr 2005, 01:06

Post by el_muchacho »

Cheery wrote:I think python is more like it's own language. LUA looks like a ripoff of C -language, which is hard to learn.
No, Lua has absolutely nothing to do with C.

Lua has the advantage of being lighter and faster than Python, but is less powerful.
Another lightweight language which can be nearly as fast as Lua and is slightly better equipped while retaining its lightness is Squirrel .
still, a number of apps using python doesn't mean it's fast enough for a game like spring.
Very true. I think that Spring is (much) more CPU intensive than the average game, and I don't believe that's because of lack of optimization.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Buggi wrote:LUA (loo-ah) ...
About the way it is pronounced, you can think of it as this:
Let's put a little bit!

This way, the translation of letters into sounds can be thought of as other similar translations we do in english.
Post Reply

Return to “Engine”