• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Others HTML Creating a remake of Twine

thedude2866

Member
Apr 24, 2017
112
119
Hello yet again, around 2 months ago I have declared that I will be remaking a new game engine based on QSP (Thread Post), with plenty of research and testing, I have determined that as of right now, I simply don't have enough experience to make it, HOWEVER, I am not giving up, all I need is more experience, so for now I will be working on a remake of Twine, which will in my opinion, definitely be better, and more type safe, much less annoying runtime errors that could've been easily fixed if the language was type safe. This game engine will be playable in a web browser with html, however it will not be limited to that, so if any games require more processing power they will be able to run on the desktop with a custom player that I will create.

I will also make sure to keep the language simple so that the transition is simple, and I will also focus on making it easy to use for story writers rather than just programmers, however advanced features such as interfaces, classes, events e.t.c will still exist.

If anyone has any opinions of what features they would like to see simply make a post, I'll be sure to read all the recommendations and try to reply to as many as I can.

You don't have permission to view the spoiler content. Log in or register now.
 
Last edited:

Saki_Sliz

Well-Known Member
May 3, 2018
1,403
997
the project sounds pretty cool, really like the idea of being able to run in a custom player to help with more advance projects.
 

thedude2866

Member
Apr 24, 2017
112
119
the project sounds pretty cool, really like the idea of being able to run in a custom player to help with more advance projects.
The order of priorities will be first to make the language and make it playable in the web browser, then create an LSP so that it can be edited in VS code, then custom player, and then finally a custom editor.
 

HiEv

Member
Sep 1, 2017
384
778
I will be working on a remake of Twine, which will in my opinion, definitely be better, and more type safe, much less annoying runtime errors that could've been easily fixed if the language was type safe.
Um... Of all of the errors I see when people use Twine, type problems are among the rarest. Also, that's not really a Twine thing, it's a JavaScript thing. So what you're really proposing to "fix" is JavaScript.

That said, JavaScript may or may not already be "type safe", depending on your particular definition of that term. Compare the top two answers to " "

If you want to improve over Twine, then I'd recommend you look into what problems people actually commonly have when using it.

This game engine will be playable in a web browser with html, however it will not be limited to that, so if any games require more processing power they will be able to run on the desktop with a custom player that I will create.
You do realize that creating a custom player would basically be equivalent to creating your own web browser, right? Or maybe multiple web browsers, if you plan on supporting more than one OS. You'd have to implement everything a web browser could do for your custom player to work as well as a browser.

You either don't know how complicated this is or you're manic.

1) Will provide a way to ensure that urls are correct and properly return an image/video.
This is a combination of already being easy in some cases and being impossible in others.

It's easy because anyone can already check a URL just by putting it in their browser.

It's impossible because you may need to refer to URLs which don't exist yet, URLs which are composed of variables, or the URLs exist at the point where your code checks, but not at the point where the player needs them (or vice versa).

It might be nice to have an option to be able to pull the exact path and file name from a file dialog box for local file, thus helping ensure correct spelling and capitalization, but anything beyond that starts heading into the "more effort than it's worth" category.

2) Passage names will be type safe but will offer the same flexibility as strings when it comes to naming them with the use of a special literal value.
Huh? Twine passage names are always strings. Doesn't get much more "type safe" than that.

It sounds like you're just adding needless complexity.

3) [Links to 1) and 2)] I have though of an idea which will allow urls and passage names to be easily created and combined with functions like random to allow for picking a random passage/url, however it will still be type safe and will ensure that no broken passages or urls are created.
This suggests to me that you don't understand how Twine works or what "type safe" means.

The links to passages are not URLs, because Twine is a single-page HTML file. The links are references to other sections of the current HTML file.

Nor does "type safe" have anything to do with this. What you're talking about is ensuring that the code only goes to existing passages, and that isn't a "type".

How will you ensure that the passage called by the code "[['Room-' + $roomNo]]" always exists? You simply can't. Even if you somehow managed to validate all of the possibilities, what if the developer then deletes or renames one of those passages?

The order of priorities will be first to make the language and make it playable in the web browser, then create an LSP so that it can be edited in VS code, then custom player, and then finally a custom editor.
Er... How are you going to make a language that does the things you describe without an editor to enforce them?

Take for example ensuring URLs are correct. If this doesn't happen at the editor level, when you input the URL, then what's the point?

The language and the editor would need to be developed side-by-side for what you're describing to work.

Making a player before an editor exists is totally backwards.

Heh, I've seen this before, but trust me it won't be much of a competition, I plan to crush twine in every category, and also, this isn't a standard :p
Heh, I've seen people say that before, and trust me, you're right that it won't be much of a competition, but not in the way that you mean it. There's a graveyard of Twine-wannabes out there that never went anywhere.

Do you know why? Because no developer ever wrote anything worthwhile in them.

You can't just build a game console, you have to build good games for it as well, otherwise it will never sell. The same goes for game engines.

Even if you make the best engine of all time, if nobody uses it to prove how great it is, then it will just be another forgotten failure.

If I were you, instead of wasting time on problems that aren't really problems or are basically unsolvable problems, I'd step back, figure out what really does or doesn't need "fixing" in Twine, and then see if that could be done simply by creating a better Twine editor or Twine story format. Otherwise, you're just going to waste your time making something nobody needs, wants, or will ever use, until you give up in frustration.

You've already made this mistake once with QSP, so you should learn from your mistake so you don't merely repeat it.

And finally, yes, it would be a standard, it would just be your own standard, so you haven't actually circumvented that problem.
 
Last edited:

thedude2866

Member
Apr 24, 2017
112
119
Um... Of all of the errors I see when people use Twine, type problems are among the rarest. Also, that's not really a Twine thing, it's a JavaScript thing. So what you're really proposing to "fix" is JavaScript.

That said, JavaScript may or may not already be "type safe", depending on your particular definition of that term. Compare the top two answers to " "
In my book broken passages and using non declared variables is a problem of a weak type system, and its only a problem with javascript because twine decides to use javascript directly, I will not be, I will be writing a custom language with custom syntax that will be completely type safe and will then later convert to javascript.

You do realize that creating a custom player would basically be equivalent to creating your own web browser, right? Or maybe multiple web browsers, if you plan on supporting more than one OS. You'd have to implement everything a web browser could do for your custom player to work as well as a browser.
Linking back to what I said before, I will be making a custom language, it will not be directly written in javascript hence it does not have to run in a web browser, actually, the point of the custom player is so that it doesn't run in a web browser, what it will actually run in is LLVM code that I will generate in C# .Net Core, which is cross platform, therefore only one implementation of it will be needed.

You either don't know how complicated this is or you're manic.
To me it seems you're assuming quite a lot when you could've just asked some questions.

This is a combination of already being easy in some cases and being impossible in others.

It's easy because anyone can already check a URL just by putting it in their browser.

It's impossible because you may need to refer to URLs which don't exist yet, URLs which are composed of variables, or the URLs exist at the point where your code checks, but not at the point where the player needs them (or vice versa).

It might be nice to have an option to be able to pull the exact path and file name from a file dialog box for local file, thus helping ensure correct spelling and capitalization, but anything beyond that starts heading into the "more effort than it's worth" category.
And here you are forgetting important details yet again, I know that it is typically impossible because they are stored as strings, however, in my language they will be a special data type which you won't be able to edit as freely as you could a string, however, they will be special syntax in the program for editing them in the most common ways. And as well as that, the URL will be extracted by my parser as they will also be special literals in the code rather than just strings, and then they will be automatically checked for which status code and return format they return to ensure that its still a valid type of multimedia.

Huh? Twine passage names are always strings. Doesn't get much more "type safe" than that.
My problem is that they are strings when they really shouldn't be because then they can't be as checked at compile time, and as I've said earlier, to me broken passages are a problem of a weak type system.

This suggests to me that you don't understand how Twine works or what "type safe" means.

The links to passages are not URLs, because Twine is a single-page HTML file. The links are references to other sections of the current HTML file.

Nor does "type safe" have anything to do with this. What you're talking about is ensuring that the code only goes to existing passages, and that isn't a "type".
This suggests to me that you're assuming, what I mean was that both, passage names and urls to multimedia will be capable of being verified at compile time (url optionally since it will take longer and they are not necessary for the game to work). And again, broken passages and unverifiable multimedia urls are a problem created by a weak type system.

How will you ensure that the passage called by the code " [['Room-' + $roomNo]] " always exists? You simply can't. Even if you somehow managed to validate all of the possibilities, what if the developer then deletes or renames one of those passages?
This is exactly the problem I will be solving, if the developer deletes or renames passages, they should get an error about anything that is trying to go to that passage, and they shouldn't be allowed to continue without fixing it. And simple, since my passages are not strings, editing them as such will be impossible, however, as I said earlier in this post, there will be special keywords and functions which will be verifiable at compile time which will look something like this play(`Room-`.between(1,10)[roomNo]) and what this will do is tell the compiler that the passages `Room-1` to `Room-10` should exist, I will also be providing a formatting style to the names so that it won't have to strictly follow that format.

Er... How are you going to make a language that does the things you describe without an editor to enforce them?

Take for example ensuring URLs are correct. If this doesn't happen at the editor level, when you input the URL, then what's the point?

The language and the editor would need to be developed side-by-side for what you're describing to work.

Making a player before an editor exists is totally backwards.
I'm guessing you don't know that LSP means, it means a language server protocol, and it is used so that other already created editors can work with your custom language, so there will be an editor, and the things I describe will be enforced by the compiler/translator that I create which will be a command line utility, after wards I will be making a custom editor so that those things can be accessed through the GUI rather than the command line.

You can't just build a game console, you have to build good games for it as well, otherwise it will never sell. The same goes for game engines.
Really would wish you would stop assuming, it would makes things so much easier, of course I am going to make games in it myself too.

you're just going to waste your time making something nobody needs, wants, or will ever use, until you give up in frustration.
Again, I don't really care if no one else will uses it, I am making it for practice to gain experience so that I can remake other typical engines too, such as Renpy, QSP, and RPGMaker, because in my opinion, they all suck, and they all have problems that I know how to fix, so yeah, I don't care if no one uses this one, because its mainly for experience, and also because I will use it myself since I tried making games in twine and I absolutely hated it.

You've already made this mistake once with QSP, so you should learn from your mistake so you don't merely repeat it.
I would suggest you actually look at the QSP thread post (linked at the top) I haven't made a mistake with QSP, I acknowledged that because of all the optional features I wanted to add, it will be too difficult at the moment because I would be trying to make too many still unknown things to me perfectly all at the same time, so first I need experience in those things so that it is more managable and later I can just use my previous knowledge and experience to make my work easier, there wasn't anything on that QSP thread that I didn't have a clue how to program, it was simply too many features that I didn't have experience in at the moment.

And finally, yes, it would be a standard, it would just be your own standard, so you haven't actually circumvented that problem.
Here I was simply making a joke, since it wouldn't actually be a standard, but I guess that just flew over your head, and again, really wish you would've just asked some questions rather than assume so many things.
 
  • Like
Reactions: hiya02

HiEv

Member
Sep 1, 2017
384
778
In my book broken passages and using non declared variables is a problem of a weak type system,
Then you're using the phrase "type safe" in a totally nonstandard way.

is, to quote Wikipedia, "the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behavior caused by a discrepancy between differing data types for the program's constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point number (float)." That's not what you're describing at all.

Even if we ignore that, you're still trying to "solve" something which isn't actually a common problem. I can't remember the last time I saw an accidentally broken passage in a Twine game (which normally shows up as a red link), and I've very rarely ever seen them reported. (Keep in mind I'm an IGDB moderator over at TFGames.Site, so I see all of the posts in all of the game threads, many of which are Twine games.) A far more common problem, for example, is that the passage exists, but was never edited, so the player just sees "Double-click this passage to edit it."

Also, "non declared" variables are actually useful in Twine, because you want to declare as few variables as possible so as to avoid unnecessary bloat in the game history, which slows the game down during saves, loads, and passage transitions. Being able to test an undeclared variable is a good way to see whether it's been used yet or not, and undeclared variables act as a default "falsy" value for them.

So really you're just bragging that your system will do away with a useful tool in a developer's toolbox, and you don't even know it.

and its only a problem with javascript because twine decides to use javascript directly, I will not be,
Yes, you will be using JavaScript, because...
I will be writing a custom language with custom syntax that will be completely type safe and will then later convert to javascript.
If you're converting it to JavaScript, then you're using JavaScript.

Worse, since you're creating your own custom language, you're losing all of the advantages that direct access to JavaScript has, except for the places where you implement your own version of the functions, properties, and methods already found in JavaScript. Which is a lot of work to get anywhere near complete.

Worse still, there's no way you're going to "crush twine in every category" if you have the added barrier of people having to learn your custom language. Especially with such strong (and needless, IMHO) restrictions on even simple things, like naming passages.

Linking back to what I said before, I will be making a custom language, it will not be directly written in javascript hence it does not have to run in a web browser,
It does if your comment that, "This game engine will be playable in a web browser with html", is supposed to make any sense.

Your choices are to either cripple the game by limiting it only to the kinds of styling you allow, or you let people do all of the kinds of styling they could do in a browser, in which case your custom player has to be the equivalent of a browser. There is no other option.

To me it seems you're assuming quite a lot when you could've just asked some questions.
Well, that's your assumption. :sneaky:

And here you are forgetting important details yet again,
...and yet another assumption.

I know that it is typically impossible because they are stored as strings, however, in my language they will be a special data type which you won't be able to edit as freely as you could a string,
That sounds like "fun" to deal with. :p

Few things are more infuriating than a system trying to be "helpful", when it's actually just getting in the way of doing what you're trying to do.

however, they will be special syntax in the program for editing them in the most common ways. And as well as that, the URL will be extracted by my parser as they will also be special literals in the code rather than just strings, and then they will be automatically checked for which status code and return format they return to ensure that its still a valid type of multimedia.
LOL. Have you ever written code?

You need to allow people to reference media that doesn't exist yet, passages that don't exist yet, etc..., because often those things won't be created until later.

For example, if you want "Passage A" to be able to go to "Passage B", and you want "Passage B" to go to "Passage A", then in your system you'd need to create both, edit one, then edit the other, rather than simply creating one then the other. Or another example, what if you want to reference a bunch of images you haven't created yet? Forcing people to make placeholder images just changes the location where the error is likely to occur from "forgetting to make the image" to "forgetting to update the placeholder".

So, no, I didn't "forget" anything, I'm just considering things which you appear to have overlooked. Your attempt to constantly enforce existence is going to be an annoying hindrance during development.

My problem is that they are strings when they really shouldn't be because then they can't be as checked at compile time,
What? That makes no sense. At all.

If passage names can't be checked at compile time, when could they ever be checked?

And what does the passage names being strings have to do with that?

Certainly for simple references there's nothing stopping a compiler from checking strings to see if they match the list of passage names. Heck, the Twine editor already checks whether links within double-square-brackets are valid every time you look at the node window, and creates new passages as necessary for newly added links when you finish editing a passage. You can even see broken links in the node window.

This suggests to me that you're assuming, what I mean was that both, passage names and urls to multimedia will be capable of being verified at compile time (url optionally since it will take longer and they are not necessary for the game to work).
Not sure what you think I was "assuming" here, I'm just reading what you wrote. However, it seems to be a pretty huge assumption on your part that the URLs used are "not necessary for the game to work".

What are URLs even used for in the game if they supposedly aren't necessary for the game to work?

And again, broken passages and unverifiable multimedia urls are a problem created by a weak type system.
And again, that's not what a "type system" does, nor is there any way for your system to verify the validity "unverifiable multimedia urls" (whatever that's supposed to mean).

This is exactly the problem I will be solving, if the developer deletes or renames passages, they should get an error about anything that is trying to go to that passage, and they shouldn't be allowed to continue without fixing it.
And how is your system supposed to know where the error lies? Is it that the code referring to that passage is wrong or is it wrong in that it shouldn't have been deleted? Assuming it even is an "error", and not just the thing that the developer was already planning on changing next.

And how exactly is your system preventing them from continuing without first fixing it?

And simple, since my passages are not strings, editing them as such will be impossible,
Oof. Name one popular or widely used programming system that isn't written using strings of text.

I don't know what else you could mean by that, since by any other meaning, Twine passages wouldn't be all strings either.

however, as I said earlier in this post, there will be special keywords and functions which will be verifiable at compile time which will look something like this play(`Room-`.between(1,10)[roomNo]) and what this will do is tell the compiler that the passages `Room-1` to `Room-10` should exist, I will also be providing a formatting style to the names so that it won't have to strictly follow that format.
That looks like a string to me.

I'm guessing you don't know that LSP means,
Well, you'd be guessing (and assuming) wrong.

I'm guessing you don't know how LSPs work, or you wouldn't keep describing how your language would work in ways that couldn't be adhered to using an LSP.

For example, how would your LSP ensure only working URLs are used, as you've described? Answer: It can't be done. There's no protocol in the LSP spec to do such a thing. Think I'm wrong? Prove it.

Oh, and FYI, . In fact, the whole LSP structure is just one big JSON string.

I'm not sure what your big complaint about strings is, but you'll find that they're used all over the place for a reason.

Really would wish you would stop assuming, it would makes things so much easier, of course I am going to make games in it myself too.
I really wish you would stop assuming that I'm assuming things, and instead notice that I'm simply bringing up how much additional work would be required.

I'm trying to point out that what you're describing is a STUPENDOUSLY HUGE task, to produce something which is too complex for beginners to learn and too restrictive for experienced developers to like, and all for no particular benefit, since you don't appear to be fixing real problems.

I would suggest you actually look at the QSP thread post (linked at the top) I haven't made a mistake with QSP, I acknowledged that because of all the optional features I wanted to add, it will be too difficult at the moment because I would be trying to make too many still unknown things to me perfectly all at the same time,
No, you did make a mistake, in that you wanted to make something that was out of your league. And yes, you're making that mistake again, due to your own ignorance of how complex a task you're actually taking on.

This is what I've been trying to explain to you.

Here I was simply making a joke, since it wouldn't actually be a standard, but I guess that just flew over your head, and again, really wish you would've just asked some questions rather than assume so many things.
I believe that the whooshing sound you heard was still you missing the point. All programming languages have a standard, even if it's just built into the compiler/player. You're creating your own programming language. Thus it would actually be a standard, even if it's not registered with the ISO.

A joke isn't a joke if it's just you being wrong about what you're saying without realizing it.
 

thedude2866

Member
Apr 24, 2017
112
119
Not sure if I have ever before been so infuriated by someone's stupidy as much as I have been reading your response, first off let me just say that you are not providing any benefitial information into this topic, you are simply hating on it for absolutely no reason, it won't affect you in any negative way, so why in the world do you even care so much, you sound like a little kid who just wants to hate on others because you aren't capable of doing what they are.

program behavior caused by a discrepancy between differing data types for the program's constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point number (float)."
From what I remember Twine's macros (or atleast in SugarCube) doesn't care what types variables are, you don't even need to pass in the required arguments, and it won't even tell you if you have anything wrong, same with comparing variables, it doesn't care if one is an integer or one is a string, it will do the comparison in the default way that javascript does, same with arithemetics, it will use the exact same way that javascript does it, if the data types don't match it will upgrade them as it sees fit, go ahead, open up your browser's javascript console and type in "1" + 1 and you will see that it returns "11" however, now do "11" - 1 and you will see that you get 10 meaning that for addition it will cast the number as a string, and for subtraction it will cast the string as a number, meaning that arithmetic operations on different types do not match and are not reversible, it this doesn't strike you as a type error, or a weak type system error, then you clearly have no knowledge on the subject.

Even if we ignore that, you're still trying to "solve" something which isn't actually a common problem. I can't remember the last time I saw an accidentally broken passage in a Twine game (which normally shows up as a red link), and I've very rarely ever seen them reported. (Keep in mind I'm an IGDB moderator over at TFGames.Site, so I see all of the posts in all of the game threads, many of which are Twine games.) A far more common problem, for example, is that the passage exists, but was never edited, so the player just sees "Double-click this passage to edit it."
Well then clearly you haven't played enough games yourself, you can't honestly tell me you have never seen an error when the developer forgot to include the $ before the variable name and then it showed up as a runtime error while you were playing the game. And personally, I couldn't care less if you are a moderator at a website, you clearly didn't seem to gain enough experience from it to be able to understand.


Also, "non declared" variables are actually useful in Twine, because you want to declare as few variables as possible so as to avoid unnecessary bloat in the game history, which slows the game down during saves, loads, and passage transitions. Being able to test an undeclared variable is a good way to see whether it's been used yet or not, and undeclared variables act as a default "falsy" value for them.
Um, just no, you are extremely stupid, and yet again asuming in your tiny head that there is only one way to implement the history between passages, when you know, there isn't there are other ways than just saving every variable and each of their values every time you go to a new passage, and I don't plan on being stupid enough to try that way, I already have a way which will be much faster and much more memory efficient as well, so don't comment on shit you aren't capable of thinking through in your head. And jesus christ speak to any person who actually programs for a living and has a competent brain and you'll find out that they will probably hate default "falsy" values.


If you're converting it to JavaScript, then you're using JavaScript.
As again you're being completely stupid, I said that Twine uses javascript DIRECTLY, as in, it lets you write javascript code in the editor, which is why it uses javascript DIRECTLY, which my language will NOT DO, yes it will have an OPTION to convert to javascript, but its not going to be based around it, therefore I could use whatever the hell in the world I want to. And yes things like variable names and macros are not directly javascript, however they follow the same type structure and are just as weakly typed therefore there is no difference, my language will ensure that all the types are correct before converting to javascript so that there are no possible type errors caused by its weak type system.

Worse, since you're creating your own custom language, you're losing all of the advantages that direct access to JavaScript has, except for the places where you implement your own version of the functions, properties, and methods already found in JavaScript. Which is a lot of work to get anywhere near complete.
If you missed my previous answer, then I am going to add a lot more than just functinos, properties and methods, and no, that really isn't a lot of work, I know what I'm doing, and it won't be long until I am finished, so just be patient and I will show you how simple it actually is to create the things you think are so totally difficult, because in your limited experience you fail to notice how other people are way more capable than you think is possible.

Worse still, there's no way you're going to "crush twine in every category" if you have the added barrier of people having to learn your custom language. Especially with such strong (and needless, IMHO) restrictions on even simple things, like naming passages.
One, my language will be easier to use than twine, so it will have a simple learning curve.
Two, there won't be any restrictions on naming passages that you will actually miss, what did you ever just randomly xor a passage string in twine a couple of times and then attempted to go to it, probably not.


It does if your comment that, "This game engine will be playable in a web browser with html", is supposed to make any sense.
Omg, yes, it will be PLAYABLE in a web browser with html, that doesn't mean that the developer of the game HAS TO use javascript and a weak type system to write the game, omg, what a fucking shocker.


Your choices are to either cripple the game by limiting it only to the kinds of styling you allow, or you let people do all of the kinds of styling they could do in a browser, in which case your custom player has to be the equivalent of a browser. There is no other option.
Styling in the same manner as a web browser, is far from creating a web browser, you probably never even took a look into what would be needed to make a web browser have you, probably not, so trust me, its really not the same fucking thing. And I won't be crippling the game, there will be a lot of styling options, because unlike people like you who seem to defend twine and sugarcube, I don't settle on shitty stuff.


That sounds like "fun" to deal with.
Oh wow, yes, yet again, when have you never needed to xor a passage string in twine, probably never, omg but you are so totally going to miss being able to won't you.

LOL. Have you ever written code?
Yes, I have programmed before, for quite a lot time, I bet I probably programmed way more than you ever have.

You need to allow people to reference media that doesn't exist yet, passages that don't exist yet, etc..., because often those things won't be created until later.
Yes dumbo, they will be able to reference things, they just won't be able to compile the game without those things existing, which won't be a problem, because in my language creating new passages won't be as annoying as it was in twine, so don't worry, it won't be a problem.

For example, if you want "Passage A" to be able to go to "Passage B", and you want "Passage B" to go to "Passage A", then in your system you'd need to create both, edit one, then edit the other, rather than simply creating one then the other. Or another example, what if you want to reference a bunch of images you haven't created yet? Forcing people to make placeholder images just changes the location where the error is likely to occur from "forgetting to make the image" to "forgetting to update the placeholder".
Omg, I have so totally not though about that before, I really hope you have been able to understand my sarcasm through these messages. Yes in twine you would need to create a passage then edit it then go back to the previous on and edit that one, however in my language you won't be forced to keep each passage a seperate "file", in order to be able to do that all you need to do is.
Code:
passage `passage A` {

    play(`passage B`);
}

passage `passage B` {
}
But with your limited brain functionality I can see why you would think this would be so much effort you can't possibly bear to do this can you. And like I said earlier, referencing non existing images is allowed, because they are not required by the engine in order to be able to play the game, they are needed to enjoy the game, but the game won't suddenly just break and not allow you to continue just because an image is missing.

So, no, I didn't "forget" anything, I'm just considering things which you appear to have overlooked. Your attempt to constantly enforce existence is going to be an annoying hindrance during development.
What you call hindrance is called type safety and variable declaration by the sane people, and if you maybe ever actually programmed something, you would know how much this helps in debugging, or better yet, straight up lets you know when you have a problem so you don't need to waste hours trying to find where the bug or that one little typo is.

What? That makes no sense. At all.

If passage names can't be checked at compile time, when could they ever be checked?

And what does the passage names being strings have to do with that?
As you seem to keep missing the completely obvious point, the reason why twine passages cannot be properly checked at compile time is because they are strings, and they are very mutable, however since my passage names WONT be of the string data type, they will have the ability to be checked at compile time because they wa to edit them, if you ever really even need to,
will be limited to a few functions that you can call that my compiler will be able to pick up and evalute each possibility that can be generated from them, therefore ensuring that the passage names are correct at compile time, so yes, it is possible dumbo.

Certainly for simple references there's nothing stopping a compiler from checking strings to see if they match the list of passage names. Heck, the Twine editor already checks whether links within double-square-brackets are valid every time you look at the node window, and creates new passages as necessary for newly added links when you finish editing a passage. You can even see broken links in the node window.
Yes there is nothing stopping it if they are constant values, however as soon as you perform any operation on them they turn into an expression which twine is uncapable of resolving at compile time.

Not sure what you think I was "assuming" here, I'm just reading what you wrote. However, it seems to be a pretty huge assumption on your part that the URLs used are "not necessary for the game to work".
Here is your assumption, you're blatantly assuming that I meant that passages are urls.
The links to passages are not URLs, because Twine is a single-page HTML file. The links are references to other sections of the current HTML file.
What are URLs even used for in the game if they supposedly aren't necessary for the game to work?
They are used for multimedia dumbo, and they not necessary for the game to work, they are there to enhance the experience of playing the game, saying that images are necessary for the game to work and that if they fail to load will break the game is like saying that when you're reading a book and you see a typo you have to stop reading the book and you can't continue until they release a proof read version of that book, which clearly isn't the fucking case now is it.

And again, that's not what a "type system" does, nor is there any way for your system to verify the validity "unverifiable multimedia urls" (whatever that's supposed to mean).
And yet again here you are with your limited brain functionality, the point is that a strong type system COULD be used to verify for those things, and yes there really is a way to verify multimedia urls for my system, its called automation, wow spooky I know, I'll put it in basic words so that you can understand, my program, aka something with a more functional brain than you, will get every url you have used in the game, then it will put them in a web browser (not exactly but I'm simplifying for your tiny brain) and then check if it can load an image or a video through it, and then it will show you the results, so that if you created a game some time ago, and you used publically hosted images that are no longer available, you will be able to quite quickly figure out which urls it is that need to be replaced. Wow, wizardy.

And how is your system supposed to know where the error lies? Is it that the code referring to that passage is wrong or is it wrong in that it shouldn't have been deleted? Assuming it even is an "error", and not just the thing that the developer was already planning on changing next.
Yet again, that is very simple, the system isn't stupid and random, all it will say is that you are trying to use something that doesn't exist, and nothing else, it won't hinder you in any way except compiling before you fix it, how you fix it is up to you, maybe you typed in the wrong name, or you just haven't created it yet, it doesn't matter because I'm not stupid enough to try and make the compiler do that, no compiler would try to figure that out.

And how exactly is your system preventing them from continuing without first fixing it?
Have you ever even used a compiler before? Seriously, have you? I am genuinly questioning your abilities to have any sort of input on this topic.

of. Name one popular or widely used programming system that isn't written using strings of text.

I don't know what else you could mean by that, since by any other meaning, Twine passages wouldn't be all strings either.
Oh hey, you know C, or C++, or C#, or Haskell, or Rust where if you make a function like add(a, b); you call it as add(5,6); and not "add" 5 6. Just because they use characters, doesn't mean that they are of the data type string, just because they look fucking similar doesn't make my passage name strings either, so learn how things work, maybe look up what literals are, if you even have the brain capacity to understand it.

That looks like a string to me.
Yes, it does look like a fucking string, but can you see the `` instead of "", if you can't then go to an optician, if you can, then there you go, you have solved the fucking mystery, they look like strings but they are not strings. Well fucking done.

I'm guessing you don't know how LSPs work, or you wouldn't keep describing how your language would work in ways that couldn't be adhered to using an LSP.

For example, how would your LSP ensure only working URLs are used, as you've described? Answer: It can't be done. There's no protocol in the LSP spec to do such a thing. Think I'm wrong? Prove it.
Oof, yet again with your stupidy and missing what I say, I never said that checking urls will be directly within the language and the LSP, yet again you are forgetting to use your limited brain capacity to think about the problem and think through other solutions, like I said, it will be an external utility that will be capable of checking for the links, not the LSP directly, guessing you have never fucking used anything like that because even though its common it seems like you think its total wizardy.

Oh, and FYI, . In fact, the whole LSP structure is just one big JSON string.
Omg, of course, oh please forgive me for my bigger intellectual ability to understand the fact that just because one language uses a string means that the developer of a different language (aka mine) will also have to use strings, honestly I am starting to feel sorry for who ever has to put up with your limited brain capacity.

I'm not sure what your big complaint about strings is, but you'll find that they're used all over the place for a reason.
Yes they are used all over the place, I know, I don't have a limited brain, my problem isn't with strings, its that passage names in twine are the same as strings, that they are equivalent, when a lot of problems could be solved if they were different data types. Even if under

I really wish you would stop assuming that I'm assuming things, and instead notice that I'm simply bringing up how much additional work would be required.
I would stop assuming if you stopped wording your responses that clearly indicate that you are assuming things like I have proved many times before.

the hood they are still stored as strings, it doesn't matter, because in the language they will be different.
I'm trying to point out that what you're describing is a STUPENDOUSLY HUGE task
Oh hey, you know this guy called HiEv, he seems to really hate doing work, I bet he thinks writing 500 lines of c# code, would be excruciatingly painful, well guess what, just because you think its a huge task, its really fucking not, you just don't have the actual experience that is to do with said work to be able to understand it, you're just letting your brain wonder without any actual facts.

to produce something which is too complex for beginners to learn
And here again you are completely assuming as you have no idea what the final product will be like, and have you ever heard of the philosophy of C++?

too restrictive for experienced developers to like, and all for no particular benefit, since you don't appear to be fixing real problems.
And here we can see an unexperienced developer attempting to cause chaos in the wild, as he clearly has not used a high level language before and doesn't understand how languages with strong type systems and interfaces, classes and events are useful when you are wanting to create a complex game, jesus christ twine doesn't even have classes, you would have to create them in almost the same style you would have to in C.

No, you did make a mistake, in that you wanted to make something that was out of your league. And yes, you're making that mistake again, due to your own ignorance of how complex a task you're actually taking on.
No, here you are underestimating the abilities of other programmers, specfically me, to be able to produce results, and making the QSP language was not out of my league as I've said before, it was simply too many new things all at once, which resulted in the probability that if I tried to make it right now before I have more experience, it wouldn't turn out amazing, am I still going to make it later on, because unlike you, I don't give up simply because someone says what I'm trying to do is difficult, because if you want to make something, then you got to fucking earn it, and work for it, but yet again, the task isn't even that difficult or huge for this language.

I believe that the whooshing sound you heard was still you missing the point. All programming languages have a standard, even if it's just built into the compiler/player. You're creating your own programming language. Thus it would actually be a standard, even if it's not registered with the ISO.
And here you are yet again failing to understand that the word standard has multiple meanings, so it seems that even the logic of basic humour escapes you, but just to make it clear, the meanings that I am referring to are "sound and usable, but not of top quality", and to me twine would class as being standard, since yes it is usable, and people have been able to create good things in it, however it can be heavily improved, and the other meaning being "regularly and widely used, available, or supplied", since I know it probably won't be a standard in that way, but I don't care, I understand that writers will probably prefer the already defined twine over my system, however I know that programmers will love mine because of the complexity that it allows and the simplicity that is needed to use that complexity, however I am also planning to add features specifically for writers to make it easier to write good stories so who knows, maybe later it will actually become a standard.

And now finally, if you don't have any input on additional features or things in the original twine or sugarcube that have annoyed you, please don't respond, because your response will have no useful feedback in, all it will be is you hating on someone who is creating something that you clearly are not capable to. So kindly, shut the fuck up. :)
 

thedude2866

Member
Apr 24, 2017
112
119
As someone who has been elbow deep in both SugarCube and Tweego, forking both to create custom build tools and a custom engine for my game, I can safely say this sounds unrealistic. Having a custom player is also a terrible idea imo, I don't know why anyone would want that.

While the lack of type safety is a problem in SugarCube, that's pretty common in scripting/interpreted languages. Instead of throwing the baby out with the bath water, some sort of linter or validator would probably solve this problem in a way more sensible way then a full blown compiler.

Suggesting that really any of these problems are with Twine is also a bit of a stretch. Twine doesn't have classes, but you can easily implement classes (prototypes, more accurately) in JavaScript, and implementing them into SugarCube is pretty basic and well documented. And any compiler is just going to take user code and turn it into JS anyway, so again, seems like a wash to me.

Are you making a compiler? Or is this all supposed to be like Twine and occur at runtime? In the former case, I don't see the point because a pretty decent amount of tooling already exists, including a really great VSCode plugin and a file validator. Some sort of more detailed tools with real type checking could probably be made.

There's room for more engines, I just think being able to bypass Twine and go right to JS is what makes Twine as good as it is. It's got a powerful and useful selection of features on its own, but you can also just go straight to JS anytime. Other than type safety, which to me is firmly in the "nice to have but not essential" category, I can't imagine improving it much. And most improvements will probably make it harder to interact directly with JS from the engine. It if course depends on how you plan to do it.

How familiar/experienced are you with Twine and SugarCube? I don't want this to come off as rude, but some of your comments make it seem like you're maybe less familiar than you should be if you're going to throw down the gauntlet and challenge it to a showdown. I can go more into detail on this but it's not really important. I just think you'd maybe be better served trying to make something that isn't trying to compete with Twine. Twine is very mature, and no matter how flawed, it's maturity and extensibility are at least respectable in their own right. It is very good at what it's for, which is simple text web games. Sounds like you're aiming to make something for more complex, media driven games.
Thanks for the helpful feedback, and its not just about those things I have mentioned before, I also completely hate the syntax of it, having to use <<>> and $ everywhere was a massive pain, I am quite familiar with sugarcube, less with the other formats, I've been playing sugarcube games for a few years now and I always checked out the source in the html file and how everything looked in the browser console too, I have attempted to create some games, but using the syntax just became unbearable to me, I am also thinking of adding support for native functions, so functions which could be called from my custom language, but they would be defined in javascript, I am not fully sure about the custom player, main reason for that was because its speed would be extreme as it would be running in a hybrid of C# and LLVM. And yes I know prototypes can be created however from what I've seen on the sugar cube documentation there wasn't any simple way of ensuring that they are type safe, and without that someone could just create a new object, and fill its properties with whatever they wanted, and then passed it to something which wouldn't be any wiser if it was properly initialized or not, which can cause some horrible problems in some cases.

And yes it will be just converting the entire file to javascript as well as embedding the custom engine that I write for it, and unfortunately, because javascript has a weak type system, it will be extremely difficult if not fully impossible to write something to check its types, (there is typescript, however that is not pure javascript) because if you have a function, you have no idea what types are passed to it, or returned from it, there isn't even a guarantee that something will be returned, so what you would have to do is find everywhere that function is called, and check what variables are passed to it, and then retrace back even further to see where those variables came from, and so on until you reach the root, that would be a tremendous amount of processing power that is required. And not to mention that it would also need to retrace which way passages are entered, which is up to the player, so it would have to check all of them, that would result it massive amounts of possibilities where the variable's type could change, and unless each one could be checked, there would be no way to guarantee type safety.

And honestly, I know that writing compilers seems like it would be a massive process, but its really not, this is not the first compiler that I have written, I recently made a language in less than a week and made it usable. I have started making this compiler/converter (whichever you want to call it) and language 2 days ago, a few hours before I made this thread, and I have currently spent 11 hours and 1 minute programming it, and I am about 10% done already, writing the compiler and the language won't really be a problem, the main problem will be creating all the native functions that already exist in twine and that I also want to have, a different thing which I also disliked about Sugarcube was the formatting, and how easy it was to create <br> tags and add new lines when you didn't really want to, so I also thought of having a "typewriter" (name is W.I.P - I suck at naming things) which would be a special format of code and it would focus solely on making it extremely easy to display text however you want to format it. And reading through the SugarCube documentation I saw that the history feature is implemented terribly, apparently it saves all the story variables each time you move to a different passage which is extremely terrible and could heavily be improved, I was actually surprised that, that is how it was done, and it also seemed that going back didn't actually properly restore the passage as things like the visit count didn't decrease.

Sorry if that reply was all over the place, not really good at structuring replies, also, I am mainly making this for myself to use, and for fun :), also, love your game!
 

thedude2866

Member
Apr 24, 2017
112
119
SugarCube's history system only stores a delta, not everything, it's not that crazy. It can also be limited or turned off too, thankfully. The history system is bizarre in general imo. Not sure how visits are resolved. I agree about the formatting and syntax. Not a huge fan. I also have no doubt you can write a compiler, and I look forward to seeing what you come up with. It does seem like a lot of work to me but I've never done anything like that.

Just to be clear, what I find unrealistic is beating Twine, not making a compiler. Not that Twine is incredibly complicated or untouchable, just the popularity and maturity.

Like I said, I do think Twine is pretty good at what it does, but there's definitely a lot of room for improvement. I guess my feeling is just that Twine is worth improving, and that replacing it is probably not gonna hurt its market share so work in that direction might be better spent on tooling or formats for Twine. Of course, there's a ton of technical debt there, so I totally respect the desire to start clean and make something even better, and I don't doubt its possible either.



Hey thanks, :). And no problem about being all over the place, there's a lot that goes in to something like this.
With the history, my idea was to store the deltas, and this is what I checked ( ) and it states
Each moment contains data regarding the active passage and the state of all story variables
and the "state of all" made me think it stores all the variables, which did seem a bit insane but I have definitely noticed the games that I have been playing slowing down over time.

And there was also this ( ) that states
Navigating back to a previous passage, for whatever reason, can be problematic
and
Even if it did know that, there's no way for it to know which operations may or may not have side-effects—e.g., changing variables
And typically my usual approach is that when something is cluttered and has a lot of technical debt, I prefer to just start from scratch and improve and all the previous ideas.

And my idea with the typewriter idea was to have something that would look like this
Code:
```
<i>This is some italic text</i> and this is some <b>bold</b> text.<br>
And this is some <color rgb="255,0,0">red</color> text.
```
And the idea was inspired by WPF's xaml (which yes does look similar to html since they are both markup languages), and discord using the ``` for code formatting, but I am not fully sure about the specifics of how I want it to look, but you would still be able to call functions and use variables, however the formatting would have to be explicitly specified so that it is exactly what the developer has intended.

Also, while it would still be a language with a strong type system, there would be barely any places that you need to actually specify the type as a lot of it would be inferred. (this is different from what javascript does.)
 

thedude2866

Member
Apr 24, 2017
112
119
Those specific instances of navigating back are referring to constructions where the author expects code to not be reprocessed, such as if you give the user ten points, then they open a menu screen, and then return, the points are added again. If you use history navigation, this solves the issue, but if you can't, like if the user can do something in the menu that needs to not be undone, then the points are added again. It's a logic problem, not really a flaw in the engine's design. Granted, there are ways the engine could have been written around such issues, like by having a dedicated menu system other than modals, but even if that were so, the opposite case, where authors want code to be reprocessed on returning to a passage from a menu, would still need to be possible, so I think you'd be trading one problem for another, though admittedly I think most games have the issue of not wanting code reprocessed.
I haven't actually seen the menu system in twine, maybe I have in game but I haven't really noticed that it was a special menu system, although, by menu does it mean the same things that are used to show the save slots?

And to figure out if it was storing deltas I'll probably have to mess around more in the console.

The main problem that could occur with allowing for pure html is that now I would have to also parse html, which might not be that big of a problem depending on how far it strays from regular markup languages, and I might also have to parse css and javascript as well depending on if I allow <style> and <script> tags to be used, and also some of the html features are largerly depend on the browser too, or if it is html5 or not. I will definitely be adding native functions, and I was thinking of allowing the developer to define custom markups and then specify their css or something similar, so I am on hedge when it comes to allowing pure html. However I did just get an idea, since I'll be allowing native functions, and possibly the ability to create custom markdowns, then that would allow for creating html markdowns, since the way the typewriter syntax will work is that it will create a builder, which will just build the html character by character, and when it encounteres a markdown it will look up what that markdown is supposed to add to the html, so I could add a default case that if it doesn't encounter a known markdown it will just add it directly, however that feels quite unelegant, however, I might take another thing from discord and make it so that you can specify the language you are directly embedding, so doing ```html would put the typewriter in html mode, where it will just add directly what you tell it to, and another reason why I wanted to stay away from pure html is that the markdown syntax for the type writer will still be type safe, so as with the red text example, if the given values are not numbers then it will count as an error, and allowing this with pure html would be difficult since I have to manually specify what the function headers will be so that they can be type safe.
 

thedude2866

Member
Apr 24, 2017
112
119
Also I have just performed a test, and the SugarCube.State.history does indeed seem to store all the variables rather than just the deltas. So yes, SugarCube is that insane. (It's only a preview, not showing all the variables, but you can still see that the same variables have the same values in each step in the history.)
You don't have permission to view the spoiler content. Log in or register now.