Hard Light Productions Forums
General FreeSpace => FreeSpace Discussion => Topic started by: TheGardinator on February 20, 2013, 04:29:25 pm
-
Last time i worked around with some missions, this thought spooked in my head.
I mean, creating events, setting SEXP and all this stuff, based on logical linkages look for me like a, kinda simple, programming language.
I wonder, if you could define it as one, or it's just a way to create missions?
-
sexps are a lisp dialect. Describing them as a programming language is completely correct.
-
I don't see how it isn't a programming language. Most talented and experienced Fredders even use notepad to edit their missions.
-
It's turing-complete, isn't it ?
-
so, theoretically, when someone asks me, if i know a programming language, i can say: "Yes, i speak FRED" ?
I don't see how it isn't a programming language. Most talented and experienced Fredders even use notepad to edit their missions.
Oh, that's really a common way to edit missions? :eek2: I do it that way even if I'm not very experienced. :D
-
Notepad-editing of missions is useful in certain specific scenarios where FRED would be ill-suited, like large replacings by name, or simply not being arsed to wait for FRED to load :p
A .fs2 isn't much harder to decipher than your average table. A good way to see this would be to simply open FRED, save a blank mission, and see what the .fs2 looks like.
-
Thanks for the hint, Matth, it's as you say.
New ways of epic FREDding open up for me. *tries to sound like a god, creating a new race*
-
Don't get in over yer head, even our most senior FREDers here still use FRED for most of the job. UI has its undeniable advantages. It's just good to know that it's text-editable when you need it.
-
i can't imagine trying to remember all the available SEXPs and their syntax to write a mission entirely by notepad.
-
I use notepad sometimes, but I'm always scared I'll break something.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
-
Yes, it's a sort of programing language.
-
FRED is Turing-complete because its programming language provides sequential execution, branching, and looping, plus variables.
Additionally, FRED comes with a bonus Turing-complete language if you consider the variable array (all 200 FRED variables) as "memory" and create sexps to interpret variable values as program instructions.
-
I use notepad sometimes, but I'm always scared I'll break something.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
No, it wouldn't. POF files are binary, so you're better off using a hex editor; text editors have much greater potential to **** things up.
-
i can't imagine trying to remember all the available SEXPs and their syntax to write a mission entirely by notepad.
The Wiki and the source code provide a handy reference.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
There are chunks which are relatively easy to edit with a hex editor (I've done this in the past for certain things), but a lot of the data is simply too complicated and dense to reasonably expect it to be human-understandable. Particularly for things like collision data. An XML format like DAE might be a bit more readable, but I wouldn't recommend trying to get any substantial amount of editing done this way.
-
Out of curiosity: could there be any FS2 mission designs that are impossible to achieve using FRED, but can be coded through a text editor?
-
It's possible, though both FRED and Freespace check for the same sort of errors when parsing missions. So any tricks you try to bypass FRED with, Freespace would probably catch them.
BUT, there are some campaign file shenanigans you can only pull off in notepad and not FRED. FRED doesn't really allow infinitely looping campaign paths. You can go down a path, but not up. But by fiddling with the advancement conditions in notepad, you can make the campaign advance to a previous mission. FRED and FreeSpace will allow it and won't complain about it. JAD2 and War in Heaven Act 3 have used that technique for some neato tricks. As well Goober's FreeSpaceLancer was a proof of concept for the whole technique.
-
Out of curiosity: could there be any FS2 mission designs that are impossible to achieve using FRED, but can be coded through a text editor?
Actually anything involving in-mission cutscenes like Wing Commander had is impossible since I never got around to creating the Editor to add them. :D
-
I use those in BtA too.
-
FRED is Turing-complete because its programming language provides sequential execution, branching, and looping, plus variables.
Additionally, FRED comes with a bonus Turing-complete language if you consider the variable array (all 200 FRED variables) as "memory" and create sexps to interpret variable values as program instructions.
Hm, so in theory, FSO could be used to implement a compiler or interpreter? I look forward to seeing a C compiler (or JVM!) written in FRED. I wonder if those would be fun to play. ;7
-
I have a build knocking about which allows mission designers to implement deques if that would help. :p
-
I use notepad sometimes, but I'm always scared I'll break something.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
No, it wouldn't. POF files are binary, so you're better off using a hex editor; text editors have much greater potential to **** things up.
Oh. I thought that any type of file could be edited in Notepad, even if it's extremely difficult to do it that way.
-
I use notepad sometimes, but I'm always scared I'll break something.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
No, it wouldn't. POF files are binary, so you're better off using a hex editor; text editors have much greater potential to **** things up.
Oh. I thought that any type of file could be edited in Notepad, even if it's extremely difficult to do it that way.
lolwot
-
I use notepad sometimes, but I'm always scared I'll break something.
You know, POF files can be opened in notepad. I guess it would be technically possible (though extremely difficult) to make a model that way. :D
No, it wouldn't. POF files are binary, so you're better off using a hex editor; text editors have much greater potential to **** things up.
Oh. I thought that any type of file could be edited in Notepad, even if it's extremely difficult to do it that way.
:wtf: Lol... You can't even edit a .doc file with notepad! About 99% of the files you are likely to have on a PC cannot be edited in n/p
-
Oh. I thought that any type of file could be edited in Notepad, even if it's extremely difficult to do it that way.
If a text editor is able to write all 256 possible bytes (I'm not sure if M$ Notepad does), then yes, it is technically possible. But, as you noted, for binary-encoded files (like .doc, .pof and also .exe) this would be extremely difficult, bordering on the impossible. Hex editors are more suited for that, they are for binary files what Notepad is for ASCII files.
-
Damn I remember the days when I used a dos hex editor to edit dune2, simcity (etc.) player files and get infinite cash.