Page 1 of 1
Scripting
Posted: Sun May 03, 2009 10:46 pm
by deathsangel
Hey guys, I have 3 quick questions about scripting.
1) why would you use scripting(lua, perl, ruby, etc...) instead of pure c++ inside of your game.
2) which scripting language should I chose, is there a difference in them?
3) how do you implement a scripting language
Re: Scripting
Posted: Sun May 03, 2009 11:10 pm
by wtetzner
deathsangel wrote:1) why would you use scripting(lua, perl, ruby, etc...) instead of pure c++ inside of your game.
One reason is to separate game logic from the engine.
Another is that scripting languages tend to be more expressive, meaning you can implement a concept in less code. They make development faster. So for anything that doesn't need to be especially optimized for performance, scripting languages make development more efficient.
deathsangel wrote:2) which scripting language should I chose, is there a difference in them?
There are differences between them, and I don't know which one you should choose. Lua is typically used for games, because it is designed to be embedded in other programs. Another choice for a language that's designed to be embedded is JavaScript.
deathsangel wrote:3) how do you implement a scripting language
It's different for each language. Basically, there's a library for the language interpreter, and there are methods that allow you to bind functions/objects in the scripting languages to functions/objects in the host application (the game).
Re: Scripting
Posted: Sun May 03, 2009 11:30 pm
by deathsangel
So your saying I should chose lua?
Re: Scripting
Posted: Mon May 04, 2009 7:08 am
by MadPumpkin
deathsangel wrote:So your saying I should chose lua?
yes, thats what he's saying.
personally ( everybody ) i like lua and python you should probably use lua its nice and easy
Re: Scripting
Posted: Mon May 04, 2009 9:35 am
by Falco Girgis
Nobody is saying you should use Lua. You should first decide what you want to use a scripting language for (and based on the fact that you're asking "why," I don't think that you really have a reason to use a scripting language).
There is a specific time and place for that kind of extensibility. If it isn't necessary, you're going to spend more time integrating the scripting language than if you had tackled the problem with just C or C++.
1) Identify the problem 2) Go research scripting languages. There is no "best" language. Some are better than others in particular scenarios. Perl is amazing at text-based manipulation, but it's slow as shit. Python is a great multipurpose language, but it's overkill for simple tasks. Ruby is getting really popular these days, and it's pretty much the object oriented scripting language of choice, but it's also slow and expensive as hell. Lua is fast and lightweight, but feature-wise it's a pussy compared to lots of other languages.
Re: Scripting
Posted: Mon May 04, 2009 10:52 am
by M_D_K
GyroVorbis wrote:Lua is fast and lightweight, but feature-wise it's a pussy compared to lots of other languages.
True. At least until you pimp it out with access to the engine/app.
Re: Scripting
Posted: Mon May 04, 2009 2:07 pm
by Ginto8
OMG MDK HAZ RANK EVIL
Re: Scripting
Posted: Mon May 04, 2009 3:17 pm
by MarauderIIC
Finally! Eatcomics was the only other one to hit it, but he posted past it and didn't notice.
Click here to see the hidden message (It might contain spoilers)
- temp.jpg (18.37 KiB) Viewed 1253 times
Re: Scripting
Posted: Mon May 04, 2009 4:04 pm
by Ewan
MarauderIIC wrote:Finally! Eatcomics was the only other one to hit it, but he posted past it and didn't notice.
Click here to see the hidden message (It might contain spoilers)
Does it change back when he makes one more post?
Re: Scripting
Posted: Mon May 04, 2009 4:38 pm
by MarauderIIC
Yes. Back to talking about scripting, everybody! On task!
Re: Scripting
Posted: Mon May 04, 2009 5:19 pm
by dandymcgee
MarauderIIC wrote:Finally! Eatcomics was the only other one to hit it, but he posted past it and didn't notice.
Marauder, you are the man.
EDIT:
MarauderIIC wrote:Yes. Back to talking about scripting, everybody! On task!
What he said.
Re: Scripting
Posted: Tue May 05, 2009 5:57 pm
by eatcomics
Ewan wrote:MarauderIIC wrote:Finally! Eatcomics was the only other one to hit it, but he posted past it and didn't notice.
Click here to see the hidden message (It might contain spoilers)
Does it change back when he makes one more post?
Lusikka got it didn't she???
Then back to scripting
Re: Scripting
Posted: Tue May 05, 2009 7:58 pm
by MarauderIIC
Click here to see the hidden message (It might contain spoilers)
I think Lusikka has/had a special rank, so it didn't show. I might have done it after she passed it, too.