Scripting Laungages
Moderator: Coders of Rage
Scripting Laungages
As i have been looking through the forums i have found a lot about scripting languages such as lua or ruby and I was wondering what there importance is in a game and do you have to know them in order to write a game.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: Scripting Laungages
Importance: Handle things outside the engine, easily changeable and expandable. Easy to test and modify on the go. Used to handle special events or non-generic things, typically (like an NPC's conversation).
Necessary: No. You can do everything in the engine and combine it with data files and essentially write your own mini script engine. For instance, you might load an NPC from a text file that specifies their conversation and how they move on such and such a level.
Necessary: No. You can do everything in the engine and combine it with data files and essentially write your own mini script engine. For instance, you might load an NPC from a text file that specifies their conversation and how they move on such and such a level.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Re: Scripting Laungages
Would you recommend that I learn one once i finish learn c++ and the direct3d api and if so which one and why.
Re: Scripting Laungages
XML would be a good format to start with, as it's based off HTML. There are some C++ XML parsers already available for use in your engine. XML is an easy, straightforward manner to express data, especially if it's hierarchical.
If you know even a hint of HTML, XML is easy to pick up on. Even if you don't it's still easy since its whole purpose is to define your own custom markup language with custom tags and attributes. A lot of programs use XML in a way to keep data in a context separate from the usage and manipulation of data.
If you know even a hint of HTML, XML is easy to pick up on. Even if you don't it's still easy since its whole purpose is to define your own custom markup language with custom tags and attributes. A lot of programs use XML in a way to keep data in a context separate from the usage and manipulation of data.
Re: Scripting Laungages
I hear that for AI you need to use a scripting language could xml do that fairly well?
- aamesxdavid
- ES Beta Backer
- Posts: 347
- Joined: Wed Jan 07, 2009 8:49 pm
- Location: Bellevue, WA
- Contact:
Re: Scripting Laungages
You don't need a scripting language, but it can certainly be useful. I've done most of my scripting in Python, and I like it a lot. Scripting languages are generally slower at runtime than programming languages like C++, but if you keep most of the heavy load on the engine and not the scripting, you'll be fine. A scripting language is good to know, but keep in mind you'll also have to know how to implement it in your engine.herby490 wrote:I hear that for AI you need to use a scripting language could xml do that fairly well?
Re: Scripting Laungages
It is definately worth your interest to learn a scripting language such as lua. All the cool kids are doing it, which explains why I don't know any..... But yes after you are competent in c++ you might as well look into it.
Re: Scripting Laungages
What advantages do they provide
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Scripting Laungages
Personally I would recommend you go ahead and attempt those things first. You will learn a lot along the way and will almost definitely be able to answer this question for yourself long before you "finish learning" C++ or Direct3D.herby490 wrote:Would you recommend that I learn one once i finish learn c++ and the direct3d api and if so which one and why.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Re: Scripting Laungages
In a nutshell, they are very simple and flexible
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: Scripting Laungages
do you realize that half of your posts make me laugh? loleatcomics wrote:It is definately worth your interest to learn a scripting language such as lua. All the cool kids are doing it, which explains why I don't know any..... But yes after you are competent in c++ you might as well look into it.
well i guess this makes me cool XD
LUA, is what i am going to start learning later... probably next week lol
Perl,(not just for scripts) is what i already know, and its gay as shit so i dont actually use it
another approach would be to make your engine read a certain file extension, and have the engine plain and simply receive variables, hashes, and arrays from that
(E.G.) lets say i have set up my engine to read a file called *.vag where as, in place of the Astrix (*) you would actually put a filename/exact location. For the sake of this i am putting an Astrix.
SO my engine reads *.vag which all this vagina file has in it is a C++/C(whatever language) array that the engine will read... this way you can just keep creating vagina files for the engine. without changing the engine its self in any way.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
- ansatsusha_gouki
- Chaos Rift Newbie
- Posts: 37
- Joined: Fri Jul 04, 2008 1:19 am
- Location: Cleveland
- Contact:
Re: Scripting Laungages
Is python easy to learn cuz I would like to try it out.
Re: Scripting Laungages
had a friend that tried to tell me python was better then c++ that made me laugh.ansatsusha_gouki wrote:Is python easy to learn cuz I would like to try it out.
Re: Scripting Laungages
there is some truth to that statement your friend made.deryni21 wrote:had a friend that tried to tell me python was better then c++ that made me laugh.ansatsusha_gouki wrote:Is python easy to learn cuz I would like to try it out.
the easy of use makes it better to use in lab environments where quick and small scale applications are needed.
ps: this notion that scripting languages are slow is fallacy by the way.
REXX for instance is one of the most powerful scripting languages, and runs just as fast a C.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
Re: Scripting Laungages
he tried to tell me that it was twice as powerful though so he just sounded ignorantavansc wrote:there is some truth to that statement your friend made.deryni21 wrote:had a friend that tried to tell me python was better then c++ that made me laugh.ansatsusha_gouki wrote:Is python easy to learn cuz I would like to try it out.
the easy of use makes it better to use in lab environments where quick and small scale applications are needed.
ps: this notion that scripting languages are slow is fallacy by the way.
REXX for instance is one of the most powerful scripting languages, and runs just as fast a C.