Visual Novel Engine in JavaScript
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Visual Novel Engine in JavaScript
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.
- 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
Ooh, this looks like it could be incredibly useful and awesome! Thanks so much for sharing.
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
Thanks! If there are any features that you need, let me know, and I will see if I can implement them.
- 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
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.
sakevisual visual novels (and stuff) | sakevisual dev blog
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
OK, it should be fixed now. If you're going to actually use the code, you're best off obtaining it from github.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).
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
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.
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
If statement rewritten. Added text input fields, expanded the audio command.
Re: Visual Novel Engine in JavaScript
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.
I've seen a graphic novel (comicbook) in webpage form once, made entirely with HTML5, CSS3 and JS.
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
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?
Re: Visual Novel Engine in JavaScript
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
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
- 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
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
I'm still learning, but I made this:
http://www.sakevisual.com/about.html
sakevisual visual novels (and stuff) | sakevisual dev blog
-
- Newbie
- Posts: 14
- Joined: Tue Mar 16, 2010 7:18 pm
- Location: San Jose, CA
- Contact:
Re: Visual Novel Engine in JavaScript
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:
You could write it like this, saving a little bit of typing.
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...",
Code: Select all
kurara, {image: "kurara_unsure.gif",
say: "I think I just made myself hungry..."},
-
- Newbie
- Posts: 13
- Joined: Sat Jul 30, 2011 5:35 pm
- Projects: Sacred Souls
- Contact:
Re: Visual Novel Engine in JavaScript
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
Main Writer (aka LightsGreatTree on here): http://bloodthirstypoppet.deviantart.com
-
- Veteran
- Posts: 353
- Joined: Thu May 01, 2008 1:12 pm
- Projects: Winter, winter
- Location: Estonia
- Contact:
Re: Visual Novel Engine in JavaScript
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.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:You could write it like this, saving a little bit of typing.Code: Select all
kurara, {image: "kurara_unsure.gif"}, kurara, "I think I just made myself hungry...",
Code: Select all
kurara, {image: "kurara_unsure.gif", say: "I think I just made myself hungry..."},
Who is online
Users browsing this forum: No registered users