Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MickeyMouse

Best scripting language

This topic is 5361 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My only question is what scripting language would you recommend for a big game engine that could be used for any action, adventure or RPG game. I''m interested in what are most popular scripting languages among game developers and why?

Share this post


Link to post
Share on other sites
Advertisement
python and lua are the big ones right now. Python is a somewhat more complex and featureful language, with a large runtime; Lua has a more lightweight syntax, and relies on customizable "metatables" to emulate things like OOP. Google is your friend.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Personally I use Lua for my little game engine. It''s very easy to setup and handle from Delphi or C/C++. Also the syntax is rather easy to learn (depends how you design the functions etc., of course).
Another plus, at least for me, is the size. The compiled Lua interpreter and toolkit DLLs are hardly 100k in size, where the Python DLL(s) are some 800k.
I also read somewhere that Lua was faster than Python.

Share this post


Link to post
Share on other sites
Lua is 3 times faster than python(benchmarked) and even if doesn''t support classes you can manage to do some nice OOP programming.The bigger problem is the garbage collector that is freakin'' slow.

Python is too big and slow for a realtime app I wouldn''t suggest it.Maybe for a RTS.

I''m personally developing a open source language that has many aspects of lua; is smaller has C-like syntax is as fast and IMO solves some real-time related issues I had with lua. Is still in alpha but is already stable(I''m just tring to make it rock solid )

already a couple of commecial engines are using it(one company hired me ) take a look here : http://squirrel.sourceforge.net

if not i''d go for lua.

Alberto

Share this post


Link to post
Share on other sites
i used lua in a realtime 3d engine and got performance problems with the garbage collector.
when i write scripts that are called once per frame and has some local variables the game pauses regularly for about 1/10s when gargabe is collected. not very nice...

Share this post


Link to post
Share on other sites
quote:
Original post by fagiano
already a couple of commecial engines are using it(one company hired me ) take a look here : http://squirrel.sourceforge.net



Ahh so you''re the squirrel guy, I saw your screenshot on FlipCode.



James Simmons
MindEngine Development
http://medev.sourceforge.net

Share this post


Link to post
Share on other sites
quote:

i used lua in a realtime 3d engine and got performance problems with the garbage collector.



I had the same experience in my past project.
That''s why I''ve started working on squirrel.

Alberto

Share this post


Link to post
Share on other sites
i currently have written a rtD, a runtime D compiler, wich allows me to compile code written in D into dll''s at runtime, and use those dll''s then.. works like a charm so far..:D

and yes, i use d for the maincode, too, and now even for scripting, i can stay with d. nice, not?:D




If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net

Share this post


Link to post
Share on other sites
quote:
Original post by cody
i used lua in a realtime 3d engine and got performance problems with the garbage collector.
when i write scripts that are called once per frame and has some local variables the game pauses regularly for about 1/10s when gargabe is collected. not very nice...



It is possible to disable the gc by setting the threshold to something very high. Then you can call the gc manually at a convenient time. And don''t run scripts every frame; load them once and then call functions each frame. It''s faster.

Share this post


Link to post
Share on other sites
oh i didnt mean that i load the script every frame, i call lua functions every frame i wanted to say.

i tried different settings for the garbage collector but nothing really solved the problem.
there is no time to run a huge gc process in a fast game. it is better to collect often but fast, but this didnt work for lua either.
so i removed local variables and added them to the class scope.
i will try that squirrel thing now.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!