Page 3 of 4

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 10:17 am
by miko
MarekkPie wrote:These terms have always thrown me off, and it's frustrating, because it seems everyone else learns it through osmosis. People talk about "adding scripting into games" so that "non-programmers can add some logic." To me, this doesn't make sense, and it seems to imply that scripting is a derisive term for "real programmers."
I think this is a historical term. At the beginning all games were written in assembler or C (because the computers were much slower than today), and their code was highly optimized (and so, had to be compiled/tested/debugged/distributed). Then some games allowed changing something in their logic by using config files, then scripts. The main difference was that the scripts could be changed in real-time, without using SDK (so "for non-programmers"), but they were simple languages, without any advanced constructs, and without low-level API. In fact, often these were just some keywords with some list of arguments allowed, not a real language. I would say they were extension of simple configuration files.

The same goes in unix: there were programs (compiled) written by programmers, and there were scripts (using shells), often written by the system administrators.

Now, as the computers became more powerful, so did the scripting languages. Lua is no more a simple bash. OTOH, people tend to like some dynamic properties of languages (garbage collection, variable types, etc.), so even the "compiled programs" look more like scripts today. So, programs and scripts were in different worlds once, but today they are much closer to each other, so the distinction can be difficult.

I am using lua for some scripting (usually in linux system), but when I write for love, especially when using object oriented design, and calling low-level API (which love offers), I am definitely programming in lua.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 11:07 am
by vrld
miko wrote:I think this is a historical term. At the beginning all games were written in assembler or C (because the computers were much slower than today), and their code was highly optimized (and so, had to be compiled/tested/debugged/distributed). Then some games allowed changing something in their logic by using config files, then scripts. The main difference was that the scripts could be changed in real-time, without using SDK (so "for non-programmers"), but they were simple languages, without any advanced constructs, and without low-level API.
Lisp is older than C and Lisp programs can be changed without recompiling them. You can even change Lisp programs while they run. Lisp basically invented live coding before it was cool. Also, Lisp has - and continues to have - the most advanced programming constructs there are. Just look at common lisp's loop for construct (you can basically write English sentences and the thing figures out what to do) or the object system.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 11:36 am
by ston
MarekkPie wrote:If the question is invalid, then why did you answer it?
I didn't; I clarified it.

[edit: I felt this deserved some further detail of what I meant]

A computer programmer was originally a person who used to physically punch instructions into a machine, bit-by-bit, thereby programming it. Literally flipping switches to set bits.

An analogy to this would be the computer operator; this was originally a person who used to manage the input and output media, schedule and control job runs, etc. The tasks performed by a computer operator have now been completely replaced by software: the Operating System.

One could therefore argue that the task of actually programming the computer is performed these days by the compilers, linkers, interpreters, run-time libraries and operating systems. So nobody really programs computers any more; they've become far too complex for a human being to manage this task.

If the meaning of the word 'programming' has changed to mean 'coding', then writing code in any language, be it a scripted or compiled language could be considered to be programming. It just depends on what that word actually means to you.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 12:05 pm
by bartbes
As far as I'm concerned scripting and programming doesn't really have anything to do with the language.
Scripts are, in my opinion, smaller pieces of code that either do trivial things, automation, or provide a way for a 3rd party (/users) to change parts of your program.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 4:18 pm
by GijsB
making things in a engine = programming
making things in a engine in a engine = scripting

._.?

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 4:25 pm
by thelinx
That's not what he said at all.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 6:11 pm
by runyonave
To me, writing code on LOVE is programming, not scripting. When you write a game, you are writing the collision detection, A.I., game states, save system, game loops etc. Your basically creating a game from scratch. Now compared to writing a game in C++, in LOVE you don't specifically set pointers, or need to worry about memory leaks (unless you do something ridiculous in love that would slow down the computer). You also don't need to bother with coding for video cards. These are all handled by LOVE. You just worry about the actual code for the game.

Now a scripting language could be something like JavaScript. When you make a dynamic website you use HTML and PHP. If you want to make a menu that expands when a user hovers over it, you can use JavaScript. JavaScript acts as an extension to HTML and PHP. In this case, it isn't a necessity but adds more content and compliments the website.

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 6:35 pm
by Robin
runyonave wrote:Now a scripting language could be something like JavaScript. When you make a dynamic website you use HTML and PHP. If you want to make a menu that expands when a user hovers over it, you can use JavaScript. JavaScript acts as an extension to HTML and PHP. In this case, it isn't a necessity but adds more content and compliments the website.
But that doesn't have anything to do with JavaScript. I often use Lua like the way you described, so does that make it a scripting language? Also, you can make games and applications in JavaScript just like you can make them in Lua (in fact, I'm working on a text adventure game written completely in CoffeeScript (which compiles to JavaScript)).`

Re: When does "scripting" become "programming"?

Posted: Tue Jan 31, 2012 10:03 pm
by runyonave
Robin wrote:
runyonave wrote:Now a scripting language could be something like JavaScript. When you make a dynamic website you use HTML and PHP. If you want to make a menu that expands when a user hovers over it, you can use JavaScript. JavaScript acts as an extension to HTML and PHP. In this case, it isn't a necessity but adds more content and compliments the website.
But that doesn't have anything to do with JavaScript. I often use Lua like the way you described, so does that make it a scripting language? Also, you can make games and applications in JavaScript just like you can make them in Lua (in fact, I'm working on a text adventure game written completely in CoffeeScript (which compiles to JavaScript)).`
Sorry I should have been more clear, I didn't mean to say that JavaScript is a strictly scripting language, it isn't. I know you can a do a ton of stuff with JS, I'm a web developer so I use JS/JQuery on a daily basis. I meant that within the context of my example (using JS to write an expanded menu function on top of HTML/PHP) it could be considered scripting. But as you stated, you're making a text adventure game using CoffeeScript and JS. In that case, I would call it programming because you are applying the full functionality of CS and JS to create something.

Re: When does "scripting" become "programming"?

Posted: Wed Feb 08, 2012 5:54 pm
by owen
i don't think this is something you need to worry about because its all "programming". Using a calculator is a form of programming. I think scripting is just used to represent writing a program in a language that is interpreted instead of compiled. Its why Javascript is called "Java"-"Script" instead of just "Java" (even though its relatively the same). There is nothing derogatory about it the name its just a class. Programming on a interpreted language is most times HARDER than programming in a scripting language because the error checking is stronger which is probably why scripting is regarded as the easier of the two. Once you start coding in a compiled language you are no longer scripting. Don't worry about it.