When does "scripting" become "programming"?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

When does "scripting" become "programming"?

Post by MarekkPie » Sun Jan 29, 2012 1:08 am

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."

Isn't what we are doing on this site "scripting?" We haven't built the inner code to handle image loading, drawing, and the more taxing stuff. From my (limited) understanding, LOVE is built on top of C++, and we are just providing some inner logic to tell that code to do something.

Yet we are also going beyond the "simple stuff" that people usually equate to scripting. We have game loops; we "load" images (in the sense that we tell the C++ code that we want to load something now), we implement physics, etc. So, hopefully you can tell, I am thoroughly confused by all of this.

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

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

Post by TechnoCat » Sun Jan 29, 2012 1:52 am

I think the main difference is applications involve programming directly for an OS and scripting does not. Not really sure though. Seems to be a grey area.

User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

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

Post by tentus » Sun Jan 29, 2012 2:15 am

I hear scripting used in a fairly pejorative way... I think it's just another example of "I'm better than you" thinking, unfortunately.

Generally when I use the term scripting it means that you're not building something, you're just giving it a sequence of things to do. You don't plan out how the structure of the program works, you operate entirely in its existing design. Thus, programming (for me) happens when you actually do some design legwork, figuring out how the insides of a game or something are going to actually work.
Kurosuke needs beta testers

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco » Sun Jan 29, 2012 7:20 am

I don't really care what you call it as long as I can type in stuff and make cool things happen on my screen.

User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

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

Post by MarekkPie » Sun Jan 29, 2012 7:28 am

Well it seems as if there is a distinction between the two in terms of game development; the aforementioned "adding scripting into a game" is one of them. Heck, even Wikipedia's list of game engines has a category specifically for "scripting." Is it just the "interpreted" over "compiled" that is the ACTUAL difference, as opposed to this pseudo-derogatory garbage? Or is there more to it?

User avatar
ivan
Party member
Posts: 1548
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

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

Post by ivan » Sun Jan 29, 2012 7:46 am

Is it just the "interpreted" over "compiled" that is the ACTUAL difference
I believe that the terms 'script' and 'scripting' apply to all interpreted languages (languages that do not run natively on a platform).
Lua code can be 'compiled' too but the resulting Lua bytecode still runs through a virtual machine.
as opposed to this pseudo-derogatory garbage? Or is there more to it?
Scripting IS a form of programming.
But yeah, I can see why some programmers wouldn't take Lua as a 'serious' language, since it wasn't designed for making or maintaining large-scale projects.

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin » Sun Jan 29, 2012 10:22 am

TechnoCat wrote:I think the main difference is applications involve programming directly for an OS and scripting does not.
I'd disagree that that covers it. That would mean many large applications like Exaile and Mercurial are "just" scripts.* (Also, it would mean all the games on this forums are scripts.)
*Probably. They're both written in Python and although you could communicate directly to the OS in Python, it's usually not done.
TechnoCat wrote:Not really sure though. Seems to be a grey area.
I'd agree to that. Where the boundary between scripting and programming lies is extremely subjective. I'd say making LÖVE games is programming, not scripting.
tentus wrote:Generally when I use the term scripting it means that you're not building something, you're just giving it a sequence of things to do. You don't plan out how the structure of the program works, you operate entirely in its existing design.
Yeah, I'd say so too. But it is not a hard line. Is a Bash file a script or a program? How about web apps that run in your browser? Are Python files scripts? If so, how about PyPy? Etc.
Help us help you: attach a .love.

User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

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

Post by nevon » Sun Jan 29, 2012 11:09 am

Going by that distinction, wouldn't Java be scripting, since it's run in the JVM?

User avatar
ivan
Party member
Posts: 1548
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

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

Post by ivan » Sun Jan 29, 2012 11:42 am

nevon wrote:Going by that distinction, wouldn't Java be scripting, since it's run in the JVM?
I would say so, although it should be mentioned that there were attempts to make processors that run Java code natively.

User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

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

Post by kikito » Sun Jan 29, 2012 1:51 pm

MarekkPie wrote: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.".
The problem is that the original premise is simply wrong. In two ways.

1. The reason for adding scripting to videogames is not making it easier to "non-programmers". It's making it easier for programmers. C and C++ are languages very close to the machine. That gives them lots of power and speed ... but that comes with a cost: extra complexity. You have to manage your memory yourself. The type system (specially in C++) is ... peculiar. Pointers can point to invalid addresses relatively easily, etc. This kind of complexity, while being ok in certain parts of the game (like the graphical engine) are simply overkill in others. On those scenarios, a scripting language is simply a better tool for the job; programmers will produce the desired result faster, since they don't have to deal with the extra complexity. This doesn't mean that scripting languages are "worse" than compiled ones; it just means they are different tools.

To make a metaphor with cars: C and C++ would be heavy-duty, enormous trucks. They can transport lots of cargo from one place to other. Lua would be a small utilitary car. It can transport people easily and comfortably from their homes to the workplace, and it's very easy to find parking space with it. Using the truck to move people to the workplace would be expensive and slow - same as using the utilitary car for transporting construction materials. But none is worse than the other.

2. There is also a very dangerous assumption on the text: "non-programmers can do programming if a language is simple enough". That is incomplete. The complete phrase is "non-programmers can do programming if a language is simple enough and the task they have to do is simple enough". Once the task reaches a certain amount of complexity (typically, when you start needing more than a simple "if") it takes a programmer to do the job. In game programming, the tasks are very complex. What you usually see is not "designers programming in scripting languages on their own"; you see them working with a programmer. The designer explains what he needs, and the programmer implements it. With a scripting language, this process is much faster and fluid.
When I write def I mean function.

Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests