Anyone with experience with javascript engines

For discussion and support of other visual novel engines.
Message
Author
Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Anyone with experience with javascript engines

#1 Post by Mimiruns »

I am a complete beginner, and I have been trying to find a way to make my visual novels available to play in browsers for convenience. but the biggest hurdle that I can't seem to jump is how to get started.

I set up a web server using a chrome add-on and it seemed to open up, but nothing will play in it. It just shows the coding. Is something wrong? I keep saving the files as an XML, but when I try to run it on the server I get an "error on line 2 at column 1: Document is empty" Error

Also, how exactly do I embed the finished game onto other websites?

I am trying out many engines to see which fits for me, currently I am trying webstory.

Are there any engines that you guys recommend?

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Anyone with experience with javascript engines

#2 Post by Divona »

Just XML would not do really, since it's just a database file.

By javascript, it's usually mean HTML5 + javascript. There are multiple engine around, TyranoBuilder does HTML5, if I remember correctly.

I did use Construct 2 to build a visual novel, which run on HTML5 + javascript, but I did run into performance issue when playing on ultra high DPI screen, so I ported a whole thing to Ren'Py.

That remind me, that Unity also export to HTML5, or even embed on the webpage. You can get start on making visual novel using Fungus.

Oh, there also CloudNovel, but that one you have to build the project on the cloud through the web browser.
Completed:
Image

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#3 Post by Mimiruns »

Ah. So what file should i save the VNs in to get them to play?

User avatar
semide
Regular
Posts: 57
Joined: Wed Nov 25, 2015 8:03 pm
Organization: Di-ferrero
Deviantart: seimide-chan
Skype: semide
Contact:

Re: Anyone with experience with javascript engines

#4 Post by semide »

Are you sure your hosting it correctly ?

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#5 Post by Mimiruns »

I'm fairly sure? I'm using Mongoose to do it with.

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#6 Post by Mimiruns »

Alright, I think I should show the kind of error I'm getting first.

Code: Select all

This page contains the following errors:

error on line 2 at column 1: Document is empty
Below is a rendering of the page up to the first error.
And this is the code in question

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
. ws :
    . settings :
        . stage width 800px, height 600px, +create, +center
    --
    . assets :
        <!-- Images, sounds, characters and textboxes used -->
       <imagepack name="background">
    <image src="assets/images/Diamondstanding1.jpg" name="Diamondstanding1" />
    <image src="assets/images/Diamondstanding2.jpg" name="Diamondstanding2" />
    <image src="assets/images/Blank.jpg" name="Blank" />
    <image src="assets/images/Blank2.jpg" name="Blank2" />
    <image src="assets/images/FB.jpg" name="FB" />
    <image src="assets/images/Final.jpg" name="Final" />
    <image src="assets/images/FP.jpg" name="FP" />
    <image src="assets/images/FW.jpg" name="FW" />
    <image src="assets/images/M1.jpg" name="M1" />
    <image src="assets/images/MV.jpg" name="MV" />
    <image src="assets/images/Petram.jpg" name="Petram" />
    <image src="assets/images/Petram2.jpg" name="Petram2" />
    <image src="assets/images/Planet.jpg" name="Planet" />
    <image src="assets/images/Spike.jpg" name="Spike" />
    <image src="assets/images/Spike2.jpg" name="Spike2" />
    <image src="assets/images/Titlecard.jpg" name="Titlecard" />
    <image src="assets/images/Together.jpg" name="Together" />
    <image src="assets/images/V1.jpg" name="V1" />
    <image src="assets/images/Whisp.jpg" name="Whisp" />
    <image src="assets/images/Wisp2.jpg" name="Wisp2" />
</imagepack>

. character name d, textbox tb_main :
    . displayname :
        Diamond
    --
--

<character name="d" textbox="tb_main">
    <displayname>Diamond</displayname>
</character>

<character name="n" textbox="tb_main"></character>


<textbox name="tb_main" width="890px" height="100px" x="5px" y="355px" namebox="yes" speed="50">
    <nameTemplate>{Diamond}</nameTemplate>
</textbox>

    --
    . scenes :
        <!-- Scenes which contain the story itself -->
     <scenes>

        <scene id="start">

    . <set asset="background" image="Titlecard" />
            <show asset="background" />

--

User avatar
semide
Regular
Posts: 57
Joined: Wed Nov 25, 2015 8:03 pm
Organization: Di-ferrero
Deviantart: seimide-chan
Skype: semide
Contact:

Re: Anyone with experience with javascript engines

#7 Post by semide »

Mimiruns wrote:Alright, I think I should show the kind of error I'm getting first.

Code: Select all

This page contains the following errors:

error on line 2 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
And this is the code in question

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
. ws :
    . settings :
        . stage width 800px, height 600px, +create, +center
    --
    . assets :
        <!-- Images, sounds, characters and textboxes used -->
       <imagepack name="background">
    <image src="assets/images/Diamondstanding1.jpg" name="Diamondstanding1" />
    <image src="assets/images/Diamondstanding2.jpg" name="Diamondstanding2" />
    <image src="assets/images/Blank.jpg" name="Blank" />
    <image src="assets/images/Blank2.jpg" name="Blank2" />
    <image src="assets/images/FB.jpg" name="FB" />
    <image src="assets/images/Final.jpg" name="Final" />
    <image src="assets/images/FP.jpg" name="FP" />
    <image src="assets/images/FW.jpg" name="FW" />
    <image src="assets/images/M1.jpg" name="M1" />
    <image src="assets/images/MV.jpg" name="MV" />
    <image src="assets/images/Petram.jpg" name="Petram" />
    <image src="assets/images/Petram2.jpg" name="Petram2" />
    <image src="assets/images/Planet.jpg" name="Planet" />
    <image src="assets/images/Spike.jpg" name="Spike" />
    <image src="assets/images/Spike2.jpg" name="Spike2" />
    <image src="assets/images/Titlecard.jpg" name="Titlecard" />
    <image src="assets/images/Together.jpg" name="Together" />
    <image src="assets/images/V1.jpg" name="V1" />
    <image src="assets/images/Whisp.jpg" name="Whisp" />
    <image src="assets/images/Wisp2.jpg" name="Wisp2" />
</imagepack>

. character name d, textbox tb_main :
    . displayname :
        Diamond
    --
--

<character name="d" textbox="tb_main">
    <displayname>Diamond</displayname>
</character>

<character name="n" textbox="tb_main"></character>


<textbox name="tb_main" width="890px" height="100px" x="5px" y="355px" namebox="yes" speed="50">
    <nameTemplate>{Diamond}</nameTemplate>
</textbox>

    --
    . scenes :
        <!-- Scenes which contain the story itself -->
     <scenes>

        <scene id="start">

    . <set asset="background" image="Titlecard" />
            <show asset="background" />

--
I don't know much about coding but why are you repeating the first line twice isn't it better just to include it all in one line and I don't think you can use two types of encoding just try utf-8 alone since it handels almost everything(I admit I don't know much of what your trying to accomplish tho) .
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

found this hope its somewhat helpful
https://wordtothewise.com/2010/03/which ... -8-or-iso/

//edit//I'm not quite sure I understand your question? I just downloaded webstory It has a perfect html page and it runs on a local server How about uploading your file to take a look at it.

Just XML would not do really, since it's just a database file.-- she's right btw

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#8 Post by Mimiruns »

Yeah I realised that and edited the original post accordingly. You must have seen it before I edited it.

However this simply replaced one error with another. Now it's saying that the doc itself is empty.

User avatar
semide
Regular
Posts: 57
Joined: Wed Nov 25, 2015 8:03 pm
Organization: Di-ferrero
Deviantart: seimide-chan
Skype: semide
Contact:

Re: Anyone with experience with javascript engines

#9 Post by semide »

Mimiruns wrote:Yeah I realised that and edited the original post accordingly. You must have seen it before I edited it.

However this simply replaced one error with another. Now it's saying that the doc itself is empty.
Question is why are you using Xml If you don't mind me asking.

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#10 Post by Mimiruns »

However this simply replaced one error with another. Now it's saying that the doc itself is empty.[/quote]
Question is why are you using Xml If you don't mind me asking.[/quote]

The engine I'm using Webstory requires this. http://webstoryengine.org/docs/beginners-guide/ I copied the tutorial exactly and ended up with this error. :

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Anyone with experience with javascript engines

#11 Post by Divona »

I see what you did there. It look like XML is part of WebStory script, which is based on XML. I never use it so don't know much about the system. From the look of the file downloaded from it website, the XML example file (which is extension as .xmugly for some reason) does using the different syntax than what you're using here.

Perhaps, what you're doing is part of the warning that posted up on the Docs page:

Code: Select all

PLEASE NOTE: The new version 2016.7 of the engine introduced a new syntax for writing stories. This guide is outdated and currently being re-written. The old syntax should still work as explained here, though.
The new script that come with the download of the engine doesn't seem to be using any XML tag now, and separate files in to:

asset.xmlugly
game.xmlugly
scenes.xmlugly
settings.xmlugly

You might want to look at how it's been done there with the example file rather than follow the Docs on the WebStory site.

EDIT: I started edit the "asset.xmlugly" for you, but run out of time and need to dash, but it should show the different from your script:

Code: Select all

. textbox name tb_main, x 0, y 365px, width 900px, height 120px, speed 50

. character name n, textbox tb_main

. character name d, textbox tb_main :
    . displayname :
        Diamond
    --
--

. imagepack name backgrounds, x 0, y 0, z 5, width 1366px :
	. image src assets/images/Blank.jpg, name Blank
--

. imagepack name diamond, x 50%, y 0, z 10, xAnchor 50% :
    . image src assets/images/Diamondstanding1.jpg, name Diamondstanding1
	. image src assets/images/Diamondstanding2.jpg, name Diamondstanding2
--

. curtain name white, color white, z 0
Just follow what included in the engine, instead of following the out-dated documentation. Good luck! :D
Last edited by Divona on Thu Sep 08, 2016 6:45 pm, edited 1 time in total.
Completed:
Image

User avatar
firecat
Miko-Class Veteran
Posts: 540
Joined: Sat Oct 25, 2014 6:20 pm
Completed: The Unknowns Saga series
Projects: The Unknown Saga series
Tumblr: bigattck
Deviantart: bigattck
Skype: bigattck firecat
Soundcloud: bigattck-firecat
Contact:

Re: Anyone with experience with javascript engines

#12 Post by firecat »

Mimiruns wrote:However this simply replaced one error with another. Now it's saying that the doc itself is empty.
Question is why are you using Xml If you don't mind me asking.[/quote]

The engine I'm using Webstory requires this. http://webstoryengine.org/docs/beginners-guide/ I copied the tutorial exactly and ended up with this error. :[/quote]

That tutorial is outdated, i was wondering why you were using nonsense code. The creator of the engine has updated with new ways, the one you are learning does not work.
Image


Image


special thanks to nantoka.main.jp and iichan_lolbot

User avatar
semide
Regular
Posts: 57
Joined: Wed Nov 25, 2015 8:03 pm
Organization: Di-ferrero
Deviantart: seimide-chan
Skype: semide
Contact:

Re: Anyone with experience with javascript engines

#13 Post by semide »

You didn't end assets </assets> Just noticed that a source code is also provided to guide yourself http://webstoryengine.org/examples/defa ... nes.xmugly wish you luck ;-;
Last edited by semide on Thu Sep 08, 2016 6:36 pm, edited 1 time in total.

User avatar
semide
Regular
Posts: 57
Joined: Wed Nov 25, 2015 8:03 pm
Organization: Di-ferrero
Deviantart: seimide-chan
Skype: semide
Contact:

Re: Anyone with experience with javascript engines

#14 Post by semide »

semide wrote:You didn't end assets </assets>
You can always use another engine like the old version of belle its easy to use... and there are others out their that are free and easy to use (especially here in lemma)

Mimiruns
Regular
Posts: 48
Joined: Sun Jan 17, 2016 3:32 am
Contact:

Re: Anyone with experience with javascript engines

#15 Post by Mimiruns »

So I tried doing it the new way, since you were right, the old way was outdated. But now all it does is just show code.

no nothing, just all the code that's in the file. I saved it as an HTML, was this wrong? If so, what file should I save it as to make it work?

Sorry about all of this, I am extremely new to all of this.

Post Reply

Who is online

Users browsing this forum: No registered users