[Help] Renpy game to HTML5?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Dingieberry
Newbie
Posts: 6
Joined: Thu Oct 22, 2020 12:05 pm
Contact:

[Help] Renpy game to HTML5?

#1 Post by Dingieberry »

Hello there, total renpy noob here. How can I convert/export my renpy game to html5? I've tried to 'Build and Open in Browser' but keep getting this error 'Exception: Movie(channel='movie') doesn't work on mobile when config.hw_video is true. (Use a different channel argument)'?

How can I resolve this? I really want to have the video/movie playback in the web game. If I set 'define config.hw_video = False', I can run the game but the video just doesn't appear, which isn't what I want, I want the videos to play in the web game. Here's the screenshot of the error:

Image

Any help would be appreciated!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: [Help] Renpy game to HTML5?

#2 Post by Imperf3kt »

On mobile devices, movies are limited to fullscreen, so you can't use the Movie() method, instead you'll need to use the renpy pythonic method.
https://www.renpy.org/doc/html/movie.ht ... e_cutscene
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Dingieberry
Newbie
Posts: 6
Joined: Thu Oct 22, 2020 12:05 pm
Contact:

Re: [Help] Renpy game to HTML5?

#3 Post by Dingieberry »

Imperf3kt wrote: Thu Oct 22, 2020 2:39 pm On mobile devices, movies are limited to fullscreen, so you can't use the Movie() method, instead you'll need to use the renpy pythonic method.
https://www.renpy.org/doc/html/movie.ht ... e_cutscene
Thanks for your reply! If I only want to run my game in HTML5 on computer and not on mobile devices, do I still have to use the pythonic method?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: [Help] Renpy game to HTML5?

#4 Post by Imperf3kt »

I only assumed you were trying to access it via a mobile device due to the error message you received, but that does not seem to be the case.
There should be no need to use the pythonic method in this case, but as I have never used the beta web export, I am unable to say why you are receiving this error.

Sorry I cannot be of more assistance.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: [Help] Renpy game to HTML5?

#5 Post by PyTom »

At least right now, the HTML5 build doesn't support video.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Dingieberry
Newbie
Posts: 6
Joined: Thu Oct 22, 2020 12:05 pm
Contact:

Re: [Help] Renpy game to HTML5?

#6 Post by Dingieberry »

Imperf3kt wrote: Fri Oct 23, 2020 12:10 am I only assumed you were trying to access it via a mobile device due to the error message you received, but that does not seem to be the case.
There should be no need to use the pythonic method in this case, but as I have never used the beta web export, I am unable to say why you are receiving this error.

Sorry I cannot be of more assistance.
No worries at all, thanks so much for your help nonetheless!

Dingieberry
Newbie
Posts: 6
Joined: Thu Oct 22, 2020 12:05 pm
Contact:

Re: [Help] Renpy game to HTML5?

#7 Post by Dingieberry »

PyTom wrote: Fri Oct 23, 2020 1:50 am At least right now, the HTML5 build doesn't support video.
Ah I see, no worries, thanks for the reply!

Dingieberry
Newbie
Posts: 6
Joined: Thu Oct 22, 2020 12:05 pm
Contact:

Re: [Help] Renpy game to HTML5?

#8 Post by Dingieberry »

Hello again! I've tried to 'Build and Open in Browser' and was given this link http://127.0.0.1:8042/index.html but I'm only able to open it in my computer, my friends aren't able to access the game via the link when I sent it to them. What am I doing wrong? Is there any way other people can play it using the link when I build and open in browser?

I have also tried using the 'Build Web Application' but when I extracted the game and tried to run it, I keep getting this error in the screenshot:
Image

User avatar
Oazu
Newbie
Posts: 11
Joined: Tue Aug 25, 2020 1:47 pm
itch: oazu
Location: USA
Contact:

Re: [Help] Renpy game to HTML5?

#9 Post by Oazu »

127.0.0.1 is the default local host ip. Meaning it is only for your pc. There are instructions on how to upload your game onto itch.io,newgrounds, etc, here ( https://renpy.beuc.net/ ).
Hosting on game web hosts: zip all the files from the build directory (so index.html, game.zip, index.wasm.gz, etc. are at the top-level of your zip archive).
More precisely: you don't add files to game.zip. You make a new .zip file (e.g. myvisualnovel-web.zip) that contains all the build directory files (e.g. all the files within myvisualnovel-1.0.0-dists/myvisualnovel-1.0.0-web/), including game.zip (in the end, there is a zip in a zip, e.g. game.zip in myvisualnovel-web.zip).
For newgrounds, edit your game again and tick HTML5 Archive (zip) > Edit Properties > Touchscreen friendly otherwise it will be marked as incompatible with mobile.
For itch.io, tick This file will be played in the browser when uploading.

Post Reply

Who is online

Users browsing this forum: apocolocyntose, Google [Bot]