Visual Novel Engine in JavaScript

For discussion and support of other visual novel engines.
Post Reply
Message
Author
jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Visual Novel Engine in JavaScript

#1 Post by jdeisenberg »

I have written a visual novel engine in JavaScript so that I could adapt a VN that I wrote with Ren'py to a web-based format. It was written specifically for this one project, but I tried to make it general enough that it might be useful to others. It's inspired by Ren'py, but not meant as a replacement or a direct copy. I wrote it to make myself happy; YMMV. :)

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: Visual Novel Engine in JavaScript

#2 Post by Camille »

Ooh, this looks like it could be incredibly useful and awesome! Thanks so much for sharing.

yummy
Miko-Class Veteran
Posts: 733
Joined: Fri Jul 07, 2006 9:58 pm
Projects: Suna to Majo
Location: France
Contact:

Re: Visual Novel Engine in JavaScript

#3 Post by yummy »

Interesting. I'm giving it a try ^^

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#4 Post by jdeisenberg »

Thanks! If there are any features that you need, let me know, and I will see if I can implement them.

User avatar
sake-bento
Eileen-Class Veteran
Posts: 1909
Joined: Sat Jan 26, 2008 5:58 pm
Completed: http://sakevisual.com/games.html
Projects: Every Sunrise, Shinsei
Organization: sakevisual
Tumblr: sakevisual
Deviantart: sakevisual
itch: sakevisual
Contact:

Re: Visual Novel Engine in JavaScript

#5 Post by sake-bento »

I gave it a spin, and it's very cool! Definitely something I'd like to see continued. When I hit the "Back to Beginning" button, it starts over without clearing the current state (the background doesn't change, and the music doesn't stop, so the new music plays over it). Other than that, it's been working very smoothly for me.

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#6 Post by jdeisenberg »

When I hit the "Back to Beginning" button, it starts over without clearing the current state (the background doesn't change, and the music doesn't stop, so the new music plays over it).
OK, it should be fixed now. If you're going to actually use the code, you're best off obtaining it from github.

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#7 Post by jdeisenberg »

If you're using the code, don't get too enamored of the ifStatement; I am rewriting it entirely so that I can then implement save/load.

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#8 Post by jdeisenberg »

If statement rewritten. Added text input fields, expanded the audio command.

armornick
Regular
Posts: 51
Joined: Fri Jun 24, 2011 8:11 am
Contact:

Re: Visual Novel Engine in JavaScript

#9 Post by armornick »

This wasn't made with HTML5, was it?
I've seen a graphic novel (comicbook) in webpage form once, made entirely with HTML5, CSS3 and JS.

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#10 Post by jdeisenberg »

Except for audio, there's nothing that needs HTML5 (as far as I know), and the only CSS3 is the rounded rectangle corners on menu items. Do you have a link for the webpage graphic novel?

armornick
Regular
Posts: 51
Joined: Fri Jun 24, 2011 8:11 am
Contact:

Re: Visual Novel Engine in JavaScript

#11 Post by armornick »

Here it is:
http://www.nevermindthebullets.com/?fbid=XLOnNHhPzgK

It was created for Microsoft's Beauty of the Web thing so it's best viewed in Internet Explorer but it should work in every modern browser.

I should really get a look at html5 and make a game engine using it but I just got started with Ren'Py ;)

User avatar
sake-bento
Eileen-Class Veteran
Posts: 1909
Joined: Sat Jan 26, 2008 5:58 pm
Completed: http://sakevisual.com/games.html
Projects: Every Sunrise, Shinsei
Organization: sakevisual
Tumblr: sakevisual
Deviantart: sakevisual
itch: sakevisual
Contact:

Re: Visual Novel Engine in JavaScript

#12 Post by sake-bento »

Just wanted to drop you a note. I've been playing with the JS engine you made, and it's pretty nifty.

I'm still learning, but I made this:
http://www.sakevisual.com/about.html

jdeisenberg
Newbie
Posts: 14
Joined: Tue Mar 16, 2010 7:18 pm
Location: San Jose, CA
Contact:

Re: Visual Novel Engine in JavaScript

#13 Post by jdeisenberg »

Wow, that looks great! Thank you very much; glad the code was useful for you.

I'm looking at your script, and I'm thinking it might be useful to add a feature so that instead of having to do this:

Code: Select all

kurara, {image: "kurara_unsure.gif"},
kurara, "I think I just made myself hungry...",
You could write it like this, saving a little bit of typing.

Code: Select all

kurara, {image: "kurara_unsure.gif",
   say: "I think I just made myself hungry..."},

LightsGreatTree
Newbie
Posts: 13
Joined: Sat Jul 30, 2011 5:35 pm
Projects: Sacred Souls
Contact:

Re: Visual Novel Engine in JavaScript

#14 Post by LightsGreatTree »

This is a awesome idea. Will look it up as soon as I get some free time to do so.
Main Artist: http://urikohimura.deviantart.com
Main Writer (aka LightsGreatTree on here): http://bloodthirstypoppet.deviantart.com

luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: Visual Novel Engine in JavaScript

#15 Post by luminarious »

jdeisenberg wrote:Wow, that looks great! Thank you very much; glad the code was useful for you.

I'm looking at your script, and I'm thinking it might be useful to add a feature so that instead of having to do this:

Code: Select all

kurara, {image: "kurara_unsure.gif"},
kurara, "I think I just made myself hungry...",
You could write it like this, saving a little bit of typing.

Code: Select all

kurara, {image: "kurara_unsure.gif",
   say: "I think I just made myself hungry..."},
Another, even better option would be to implement text file parsin with existing Ren'p syntax. Or at least some kind of analogue. Similarly to choicescript. Or perhaps go way further with the concept and develop a DSL based on coffeescript? Then you'd run the coffeescript parser to make the javascript from your game code.

Post Reply

Who is online

Users browsing this forum: No registered users