Post
Sat Jul 19, 2014 8:58 am
#1
LTSL - The LT script language
There is no "I" in Tea. That would be gross.
I could tell exactly what was going on before you even explained it. My hat is off to you making it so easy to read! I'll be honest - I kind of miss a ( ) around the initiating line of the For loop, and the lack of an ending line is a bit off-putting. I do like the necessary indentations, though, I'll admit. I've always been a fan of indenting code.devlog wrote:systemCode: Select all
Script System_Simple Param int asteroids Param RNG rng Var kSystemScale 1000 Var system System_Create For i 0 (< i asteroids) (++ i) Var asteroid (Asteroid_Create (RNG_Int rng)) Object_SetPos (* kSystemScale (RNG_Direction rng) (RNG_Exponential rng)) Object_AddInterior system asteroid
I lol'd.Code: Select all
MyFunction arg1 arg2 FunctionComputingArg3 blah blah AnotherFunction blah
Yeah, images would have been nice, especially since I'm (and possibly many more? ) are visual learners. I do love an indent-based scripting language, because I use Python primarily, and find it a lot more easier than using tons of brackets, parenthesis, and a lot of other junk when you can just indent. Great job!Helgisa wrote:Last devlog was great , only thing I'd like 'bout it is some pics to show of what the script made/creates ingame .
I'm there with you. These are really interesting questions, and I'd love to hear Josh's thoughts.Flatfingers wrote:So. How off on my own am I going to be on this one?
Code: Select all
if(thirsty){
if(largebottles){
buy(largebottle);
}else{
for(int i=0;i<10;i++){
buy(smallbottle);
}
}else{
eat(chocolate);
}
Code: Select all
if(thirsty){
if(largebottles){
buy(largebottle);
}else{
for(int i=0;i<10;i++){
buy(smallbottle);
}
}else{
eat(chocolate);
}
Code: Select all
if(thirsty)
if(largebottles)
buy(largebottle);
else
for(int i=0;i<10;i++)
buy(smallbottle);
else
eat(chocolate);
Splitting - sure.Flatfingers wrote:Suggestion to mods: would it be worthwhile to split the UDF comments in this thread off into their own thread, maybe even the first thread in a new sub-forum for LT scripting? I suspect this is just the first of what's going to be a very active collection of related comments and discussions.
At least two thread already !Gazz wrote:Splitting - sure.Flatfingers wrote:Suggestion to mods: would it be worthwhile to split the UDF comments in this thread off into their own thread, maybe even the first thread in a new sub-forum for LT scripting? I suspect this is just the first of what's going to be a very active collection of related comments and discussions.
A new forum? Let's see how much content there is to fill it...
I almost suggested this very thing - the modding subforum is going to absolutely explode as soon as Mr. Parnell releases more of the functions and everything. Pre-made mods are something you see a lot with games utilizing something like this. I imagine the beta backers will have a lot of mods to choose from, if they ever tire of vanilla, or simply want a different experience.Gazz wrote:Splitting - sure.Flatfingers wrote:Suggestion to mods: would it be worthwhile to split the UDF comments in this thread off into their own thread, maybe even the first thread in a new sub-forum for LT scripting? I suspect this is just the first of what's going to be a very active collection of related comments and discussions.
A new forum? Let's see how much content there is to fill it...
I believe prefix versus infix has more to do with which languages you are familiar with, and that infix is not inherently more readable. I don't mind using prefix, at least, but I study math so might have a bias in the other direction. Could go the Haskell route and make everything prefix, but possible to make infix by adding grave accents (`) to each side.Flatfingers wrote: 1. This at first looked to me like operator-precedence based on prefix notation. I have never thought prefix notation was the best choice in any programming language. Programming languages ought to be designed to be easy for humans to read and write, not to be easy for computers to parse. That means infix notation, even if it requires some syntactic sugar.
I am considering whether implementing operators as functions satisfies that goal. Right now I'm thinking "not so much." It's certainly LISP-like, but is LISP really all that readable even if you invent special new rules to avoid parentheses? I also question the real-world utility of imposing the lambda formalism in what I assume is meant to be a comprehensible scripting language, given that more-or-less normal human beings -- i.e., not recent Computer Science graduates -- will want to use the LT scripting language to tweak the game. Simpler for users is better, regardless of perceived theoretical elegance behind the scenes.
Users browsing this forum: No registered users and 7 guests