Why is scripting evil?


(sock) #1

I’m really curious to know why so many people dislike scripting? I get the impression from the forum that most people find scripting hardwork or difficult, so they try their best to avoid it.

Personally I find it a very useful tool and a million times more flexible than entity chaining. I remember when I was working on mp_rocket and saw the rocket launch sequence entities (Final map sequence) it was simply a nightmare trying to understand what was going on. Its fine if you created the entity chain because you know all of the routes but otherwise it just looks like a mess of colour boxes with strange lines draw in all directions.

Is scripting so difficult because its seperate from the mapping process? You generally write the scripts in text editors and test it with boxmaps in the game. The only interaction with the editor is creating the entities with the right targetname and scriptnames.

Any thoughts …

Sock
:moo:


(Loffy) #2

Hi Sock!

Good question! I want to talk about it, and also about motivation. What is it that makes me learn scripting although I am no hacker?

I had begun playing with the editor (radiant) in 2001. Made some boxmaps (small, crappy rooms and corridors) for RtCW. I stayed away from scripting initially because: a) didn’t understand it (it was like abstract art) and b) I felt that I didn’t have the capacity to learn scripting. But for some odd reason I kept on reading scripting tutorials. I also dissected other people’s scripts.

And I tried and tried, with scripting, over a period of months/years. Why did I focus on learning to script? I wanted to make a real map.
This was some time ago. Progress was slow. When ET came, May 2003, I said to myself: “Ok, now I AM going to make a map.” I spent some more hours reading manuals, tutorials and stuff. This time I was really focused. I made a beta. I had it play tested on 3 servers. I made alterations. More testing. Came up with this neat scripting so that the neutral command post controls forward spawn (who ever has it, will also have forward spawn). It took me one whole week just to get that spawning to work. I also had trouble with my pump (water rising/sinking). Phew, hours and hours of endless scripting trouble! But finally it worked.

Why map at all? It is because: a) I like computers, and 3d-worlds, b) I like to be creative. (I’ve always been interesting in drawing, for example. I’m no Picasso, but I always drew cartoons when I was in upper secondary school/high school.), and c) I enjoy shooters.

This text helped me understand how a script works (especially the paragraph “Nuts and bolt”):
http://www.planetquake.com/simland/pages/wolftut/tut01_door1.htm

In sum: Initially I stayed away from scripting, but eventually I got into it. I started to script because I wanted to make a real map. To finish my first mapping project the way I wanted it I had to learn to script. The things that have given the most, are: a) tutorials and b) looking at other people’s scripts/maps.

Why did I dislike scripting in the beginning? Dunno. It’s like math in school I guess. Hard for the average person, and nothing you enjoy doing just for the fun of it until you reach a certain proficiency.

// Loffy
:slight_smile:


(Rought) #3

I think the problem is the connection between the map and the script! People work on maps because its a creative work and there are no stupid lines with some keys, values and coordinates…(and the other stuff :wink: )
Mapping is creating worlds, scripting is making the worlds realistic with movements and individual functions, but it isn’t as interesting as seeing all the brushes, how they look like and to create them etc.

Scripting is just a small-notepad-document with words and numbers…but it is necessary…:disgust:
Mapping is a drug and you have to pay for it to be satisfied and a map with a lot of features in it, good scripts and objectives included, makes me satisfied :banana: :wink:


(Mean Mr. Mustard) #4

First off, this will be an interesting thread to read… I think most of the mappers who complain about scripting either: 1) don’t realize its importance, 2) or assume it is easy and save it as the last step of their map (maybe they just hope it is easy).

I chuckle every time I see the quote “I’m done with my map. Now I just need scripting…” almost like scripting is the unimportant part of the map. Then they actually try to script, can’t do it in 2 minutes and start complaining. Scripting is the ‘ugly sister’ (I think Infurita said something like that) - so no one wants to learn it, they just want sexy architecture in their map.

Scripting is an intergral part of an ET map (or should be). It allows all the cool stuff in a map - building bridges/barriers, truck/tanks, capturing items… all the things we like in the SD maps. I think the ‘scripting complainers’ don’t realize that, put massive amounts of time into making their map (without scripting) then have their world crushed when they blindly copy an SD script and it doesn’t work in their map. (and they don’t want to take the time to learn scripting)

Every component of my map is tested in a ‘box map’ to make sure I can get the scripting to work. Did it for a bridge, did it for a truck… Life is so much easier when you do that.

Scripting is not difficult or evil (but I’ve had many years of programming experience…) It took me a few days to figure out the syntax and flow of a script. Once I did that, the vail of evilness was lifted. Then you realize all the things you can DO in a map. Some one on my team will come to me and ask “can we do such and such?” - “oh, yeah, we just need to script it up”- IMO, what you can do with scripting will make some of these custom maps really stand out


(rgoer) #5

Architecture is the sexiest girl in school, and Scripting is her ugly sister that nobody realizes gives such good head. That is, nobody knows they want to be with her until they just jump on in–then they never want to go home, because all the good stuff happens all the time.


(Pepe Le Phew) #6

Architecture is the sexiest girl in school, and Scripting is her ugly sister that nobody realizes gives such good head. That is, nobody knows they want to be with her until they just jump on in–then they never want to go home, because all the good stuff happens all the time

That says it about all ROTFLOL :clap:


(joop sloop) #7

for me it’s the language itself that’ loks ‘frightening’ to me…

It looks nothing like any programming language I’ve ever worked with basically, and that’s whats keeping me from scripting for now.

(I will dive into it when (if?) my map gets to that stage)


(hhhmmmmm) #8

It just puzzles me :stuck_out_tongue:
but then again most thing do. :???:
I aint even got round to using entity’s properly yet never mind scripting.


(redfella) #9

I guess this is kinda obvious… but its really only those who don’t understand scripting that don’t like it. And vice-versa, those who do know scripting can see its possiblities and potential to add alot of cool stuff to a map. It’s really just a matter of understanding imo.

Have you ever seen someone who understood scripting complain about it?

:chef:


(blushing_bride) #10

well i agree with everyone. Making maps is a bit like playing with lego. If making a map was like doing work not many people would make maps, but it’s not, it’s fun fun fun. Scripting on the other hand is not fun, its more like maths and i hated maths at school. One of the other problems with scripting is that it is not very well documented and there aren’t many tutorials for it. Poeple with programming experience might be able to work it out on their own but some of us find the whole concept alein. There must be hundreds if not thosands of tutorials about making stuff with radiant but i suspest you could count the scripting tutorials on one hand. And how many scripting tutorials are there for ET. As far i know Ifurati has made a couple of scripting things on his site but thats about it. Sometimes you need to read a few different tutorials on a subject before you get the hang of something and with ET scripting there’s almost nothing. So i think the reason that scripting is the bastard ugly step sister of mapping is because it is so poorly documented compared to making basic rooms. If there were twenty different ET scripting tutorials then there would be hundreds less people getting stuck on scripting.

I find scripting a nightmare because i do not understand the concepts of scripting. I can copy and paste scripts and entities but i honestly dont understand how it all works. And ive looked long and hard at scripts but again they just make no sense what so ever. As far as im concerned they may as well be written in a foriegn language. I can pick out certain words, i can get a vague jist of what a script does but i would have no way to write my own script as i dont know how to write in this foriegn language so what we need is to have scripting clearly exlpained.

Sorry to droan on but scripting has almost reduced to me tears of frustration in the past. I really hope that someone somewhere can write a tutorial that explains the logic behind scripting.


(StormShadow) #11

Its intimidating to those of us with little or no experience doing it. Its like learning a new language…
Mapping is fun, and a great way to express your creativity - scripting seems more like ‘work’. Not that there is anything wrong with work… but no one looks forward to it :slight_smile: I think (as stated earlier) that if more people had experience with scripting, they wouldn’t see it as a ‘necesarry evil’ that had to be done for their maps to work, but more as something that that opens up new possibilities for creativity and inventiveness.


(Computertech) #12

I think it’s more like mapping is windows (GUI), while the script is DOS. Nobody (at least most) don’t do dos or even know dos, but can get around windows with their eyes closed. If there was a way to identify/make the script inside the mapping program itself, that would be a major improvement.


(Drakir) #13

Scripting is a rather new concept, for me anyway. Only been using scripting since RTCW. So its kinda hard to get the entity worx out of the system. Since i have been using entity work much much more, since i started mapping for Doom.

Also would like some sort of editor for the scripting part to make the commands easier to find and a better way to communicate between the map and the actuall scriptfile.

Like some sort of way to incorporate the scripting engine into the compile process. (HINT to Ydnar, maybe a switch for the BSP to output a txt file with all entitys that have “scriptname” with a standard setup done.)

Also another way is that most mappers have to learn scripting by looking at other peoples scripts, mainly the pro´s work. So its understandable that we find it hard.

If there where some sort of “Scripting Bible” out there with all usuable commands explained then perhaps the anger towards scripting would be in a completly other state.

Well as time goes by mappers will get used to scripting and all the possibilty with it. And i am convinced that scripting is here to stay.


(SCDS_reyalP) #14

One thing is that when you do something that is mostly visual, you can learn by doing. You make some brushes, you see what it looks like, you go back and revise. People assume (wrongly IMO*) that most of what it takes to be a good mapper is just making good looking stuff. Scripting, OTOH, requires some actual understanding to get right, and if you try to learn just by trial and error will be very frustrating. Especially when the effects of errors are unpredictable, and diagnostics are not clear. Obviously, good documentation and examples would help this out a bit, but it still requires people to actually sit down and read the stuff that is there.

*What people miss is that mapping, even without scripting, actually requires a lot of abstract technical knowledge to get right.

In my experience, there is a also certain mindset to coding that some people have and others don’t. I’ve seen people go through a whole semester of ‘introduction to programming’ without getting it, while other people pick it up naturally without any formal education.


(ConchMan) #15

Scripting gets the job done. Furthurmore if you comment your own scripting, then when you come back to it years down the road then it will still make sense to you or whoever may be reading it.

But I guess I agree with Drakir more because without a reference of commands and their relevent syntax, then you’re stuck with trying to learn from other ppl scripts. And while that is very helpful in that you can learn about a command from another person’s example, it’s not nearly as much as you can learn if you had an accurate explanation of the commands along with its syntax.

By looking at someone’s examples you can clearly see one method to achieve one goal. By looking at a reference you can create your own method without being unsure about whether of not the commands can be used in “such and such” a way. Less confusion is a good thing, right?

The true capabilities of the language, any language for that matter can only be revealed if there is a reference available. Imagine what kind of C++ written programs we’d have if there weren’t any manuals and you could only look at other’s examples. Hehe, do you remember the first program you ever wrote?


(Machine for to kill) #16

Of course you do. You know what everything does and how to use it. Unfortunately for the rest of us who haven’t been mapping since the stone age, scripting is another component that we must learn. So how do you learn things? Well you read documentation and tutorials that people have posted about how to do things. Which brings me to the answer to your question:

Well you find me a complete guide or document that explains all the scripting keywords and what they do(that doesn’t involve the phrases “not sure what this does� or “mess with this a little bit�) and I will forever love scripting. Do you really think that we don’t want our maps to have all kinds of cool stuff in them and make them a lot more dynamic?
I am no stranger to coding but I find it really frustrating to learn what things do by trying on a million things for a week and then in the end when it finally works having no idea why it’s actually working. The truth is that I find it rather pointless to give us this great tool and not tell us how to use it. I would love to learn how to script and I am more than willing to put in the effort that it requires, but give me something to study. And since I’m gonna get flamed with a million links to tutorials (actually I really hope this happens) and “read official map scripts� answers, let me tell you right now that that’s not learning, that’s tinkering and there’s a big difference.
Anyway I know you guys have no obligation to give us any manuals and blah blah blah… but you asked so…


(Moonkey) #17

Appendix A of the LDR has a (complete?) listing of scripting commands.


(Drakir) #18

No it doesnt! I have found several things that is not in there.

How about explaining:

  • timelimit_hit
  • wm_setwinner
  • wm_endround
  • wm_announce
  • alertentity
  • accum

I know that some of the above is probablt explained somewhere else in the LDR. But the fact is that there are probably several more stuff that can be used that we dont know of, maybe some aint even used by the scripts that SD used. But could be usefull for someone else.


(sock) #19

Well I have asked and its something I want to fix … so here’s your chance to let me know. :wink:

Ok my spin on scripting, TBH as a couple of you have said its here to stay in games, most new games will support scripting in some shape or form and its already been around for a long time. Unreal, SIN, EF to name a few engines with a very strong connection to scripting. Learning scripting is something worthwhile because it can unlock creative map potential.

A quick list of quotes of what everyone has said so far on scirpting. (These are all cut and pasted from above in the thread order)

  • didn’t understand it (it was like abstract art)
  • I felt that I didn’t have the capacity to learn scripting.
  • It’s like math in school
  • nothing you enjoy doing just for the fun of it until you reach a certain proficiency
  • connection between the map and the script! People work on maps because its a creative work and there are no stupid lines with some keys, values and coordinates
  • Scripting is just a small-notepad-document with words and numbers
  • don’t realize its importance
  • assume it is easy and save it as the last step of their map (maybe they just hope it is easy).
  • Scripting is the ‘ugly sister’ (I think Infurita said something like that) - so no one wants to learn it, they just want sexy architecture in their map
  • the language itself that’ loks ‘frightening’ , it looks nothing like any programming language I’ve ever worked with basically, and that’s whats keeping me from scripting for now
  • It just puzzles me
  • Scripting on the other hand is not fun, its more like maths and i hated maths at school
  • not very well documented and there aren’t many tutorials for it
  • Poeple with programming experience might be able to work it out on their own but some of us find the whole concept alein
  • I find scripting a nightmare because i do not understand the concepts of scripting. I can copy and paste scripts and entities but i honestly dont understand how it all works. And ive looked long and hard at scripts but again they just make no sense what so ever
  • Its intimidating to those of us with little or no experience doing it. Its like learning a new language
  • if more people had experience with scripting, they wouldn’t see it as a ‘necesarry evil’ that had to be done for their maps to work, but more as something that that opens up new possibilities for creativity and inventiveness
  • I think it’s more like mapping is windows (GUI), while the script is DOS
  • would like some sort of editor for the scripting part to make the commands easier to find and a better way to communicate between the map and the actuall scriptfile
  • some sort of way to incorporate the scripting engine into the compile process
  • some sort of “Scripting Bible” out there with all usuable commands explained then perhaps the anger towards scripting would be in a completly other state
  • Scripting, OTOH, requires some actual understanding to get right, and if you try to learn just by trial and error will be very frustrating
  • good documentation and examples would help this out a bit, but it still requires people to actually sit down and read the stuff that is there
  • without a reference of commands and their relevent syntax, then you’re stuck with trying to learn from other ppl scripts
  • Appendix A of the LDR has a (complete?) listing of scripting commands

Looking at above I would say that most people have found lack of documentation and tutorials frustrating and the concept of scripting alien. I can certainly help with the first part but I would recommend some alien loving for the second part … maybe watch ET the movie several times then you might love those aliens :wink:

Ok documentation, it does exist but in fragments all over the place. Infurita has a PDF file with an introduction to scripting which is a good place to start. I wanted to writing loads on scripting in the LDR but it sort of was reduced down to a small paragraph and a summary of commands in an appendix. When I started writing the manual (LDR) I suddenly realised how much was needed to be explained and ran out of time.

Here is my new copy of the LDR which hopefully once I fill out with all the new bits should go live with the next release. So this is really a W.I.P version or 1.1. Do not cut and paste the pages just yet, as I will update and change things as I go along. So far its just sample maps and a few documentation errors fixed.

http://www.planetquake.com/simland/ldr1_1/index.html

The orginal documentation does have a stab at scripting but it was buried in the construction system. Look for the scripting heading on the Construction page. I’m really looking to move this to a new section and hopefully give people a better insight to scripting.

http://www.planetquake.com/simland/ldr1_1/appendix_a.html

The above appendix is a one liner summary of commands with syntax supplied by RR2DO2 and djbob. its not 100% complete and TBH without samples not much use but its a start. Obviously this list needs to be updated because as Drakir has said things are missing.

http://www.planetquake.com/simland/pages/articles.htm

Me and djbob did start writing some scripting tutorials for RTCW which in theory do work for ET but (hopefully) explain stuff in more down to earth non-coding talk some scripting theory. Maybe these as example for ET would help? or maybe not.

What I really need is feedback and ideas on what tutorials or headings or topics or samples people need? What was the crowning moment when people realised they are starting to get the scripting thing? I’ve got some bits started like the scripting basices under construction, but is this the right style? Is it still confusing? Do people need visual clues as well to understand scripting?

Sock
:moo:


(leifhv) #20

Bit of a late entry into the discussion and this is probably not what you are looking for but…

I’ve been doing programming for a long time now…all the way from low level assembly up to high level scripting languages like JavaScript and Python.

I’ve mentioned this in earlier posts but what really irritate me about scripting in ET is the strange syntax for the language that is used here.

-There are no real identifiers (variablenames), something that even assembly programmers enjoy these days
-No support for more complex variable types (array?)
-No support for normal language constructs (if/else, loops, switch)
-No support for ‘normal’ function calls (with parameters and return values)

While I’m still able to work with scripts it sure does make it harder …and for people new to scripting it means that they will not be able to use existing textbooks/tutorials for other languages and draw paralles to the ET scripting language. Also, if they learn ET scripting it will not help them much for the scripting language they will try to use…

There are a lot of freely (GPLed) available scripting languages that is both stable, well documented and easy to work with. A bit late to change this I guess but for later projects I think it would be smart to consider something like this.

lh03