[Suggestion] Webp Support

Would you like webp support?


  • Total voters
    10

Dope

Veteran
Veteran
Joined
May 29, 2017
Messages
127
Reaction score
16
First Language
English
Primarily Uses
RMMV
Webp Support
  • The ability to use webp images with windows/ mac os games. Web browser support can be added in the future if possible.

Mockups:
There isn't any work that needs to be done in the editor. It just needs to be able to recognize webp images the same way it does png.

Why is this feature good?
This feature is great because of the following:
  • Webp images use far less space than png images, with minor to no noticeable loss in image quality.

Possible issues with this feature?
Issues that might arise from this feature:
  • Uh, none?
  • Wait, waiiiiit, people that make games for web browsers might be jelly. Discus that with your browser manufacturer tho.
 
Last edited:

rpg_el

Veteran
Veteran
Joined
Sep 3, 2020
Messages
83
Reaction score
35
First Language
English
Primarily Uses
RMMZ
MZ has a web export though, and it seems like Safari is only adding WebP support just now. While I think Apple updates users on most not ancient devices fairly quickly, it should probably be a consideration of how many will be left behind by this. So this could be a problem in that regard.
 

Dope

Veteran
Veteran
Joined
May 29, 2017
Messages
127
Reaction score
16
First Language
English
Primarily Uses
RMMV
MZ has a web export though, and it seems like Safari is only adding WebP support just now. While I think Apple updates users on most not ancient devices fairly quickly, it should probably be a consideration of how many will be left behind by this. So this could be a problem in that regard.
"Web export" isn't exactly going to do what I need. I'm not trying to export the game to play on the web, I simply want the engine to be able to read/recognize webp images. Apple devices can already display webp images, the MV version of my game worked just fine on macs and displayed webp images in game with no problems. Through a plugin, but it worked. I'm also not sure how anybody would be "left behind" because I'm not purposing they remove png support, just add webp support. Nothing is being taken away, a new feature would just be added. I'm not seeing the potential problem.
 

rpg_el

Veteran
Veteran
Joined
Sep 3, 2020
Messages
83
Reaction score
35
First Language
English
Primarily Uses
RMMZ
"Web export" isn't exactly going to do what I need
I brought it up because other people are going to use it. And Apple devices can not display WebP when it's via Safari in a website, at least until recently, which affects web export only. The way you tested worked because nw.js is based on Chromium which supports WebP even in its MacOS version, which wouldn't apply for a web exported website game.

I'm not seeing the potential problem.
The problem is that RPG Maker wouldn't usually allow importing resources that just don't work via some common export approaches. So yes, adding this would possibly take that protection away.

As I already said above this might change soon with new Safari updates anyway, I was just pointing out it should be investigated to see what the actual numbers are of who would be possibly affected, and consider whether that is small enough to do it anyway.
 
Last edited:

Alexandr_7

Veteran
Veteran
Joined
Apr 22, 2016
Messages
96
Reaction score
27
First Language
Russian
Primarily Uses
1. Are you sure browsers support WebP. I doubt it. Considering that projects on mz are web games, it will be problematic to implement support for a format that will not work on all platforms.
2. In general, KADOKAWA somehow got rid of m4a so as not to use 2 music formats, and you suggest adding WebP to the png format, which will obviously have problems and obviously will not eliminate the need to use png
 

ロリ先輩

ロリだけど先輩だよ
Veteran
Joined
Mar 13, 2012
Messages
379
Reaction score
96
Primarily Uses
webp is supported in iOS 14, and will come to Mac OS later with the Big Sur release.

This means that it is not backwards compatible with older version of iOS, since either in the iOS web view or the iOS browser on iOS 13 and older, it will not be supported.
 

Dope

Veteran
Veteran
Joined
May 29, 2017
Messages
127
Reaction score
16
First Language
English
Primarily Uses
RMMV
I appreciate the comments on browser support. Honestly, when I posted this I wasn't thinking about web export so it's an unexpected discussion that I suppose needs to happen. That said, the issues pertaining to web browser deployment and the issues, or lack thereof, pertaining to windows/mac os deployment are two separate things and shouldn't be mixed. At least in my opinion.

Macs can play games and display webp images. I know this for a fact as I've been doing it with MV for years. I'm not sure what version the OS is but I haven't updated it in a while. I don't really know about Safari displaying webp images though as I've never tried.

But seriously. You've kinda derailed my original thought. That's ok though. Discussions happen. I'm all for that. In any event, to keep things on track I'll make a slight modification to my original post.

I would like webp support for MZ to be used in conjunction with windows/mac os deployment. That is to say, web browser deployment is not supported with webp but could be in the future if web development allows for it. Problem solved.
 

rpg_el

Veteran
Veteran
Joined
Sep 3, 2020
Messages
83
Reaction score
35
First Language
English
Primarily Uses
RMMZ
MZ resolved the problem that audio needed to be in different formats depending on export approach. (MV needed m4a for iOS, ogg for Android, ...) Your suggestion would however reintroduce something similar, which I personally would think is a step back - unless MZ would automatically convert to a supported format if I pick another export option. But that seems a lot of hassle when the current image formats work mostly fine.
 

Dope

Veteran
Veteran
Joined
May 29, 2017
Messages
127
Reaction score
16
First Language
English
Primarily Uses
RMMV
MZ resolved the problem that audio needed to be in different formats depending on export approach. (MV needed m4a for iOS, ogg for Android, ...) Your suggestion would however reintroduce something similar, which I personally would think is a step back - unless MZ would automatically convert to a supported format if I pick another export option. But that seems a lot of hassle when the current image formats work mostly fine.
I disagree. I don't really see it as introducing a problem. I mean I get what you're saying, but I still disagree.

It's like this, a dev could set an event to auto run somewhere in their game and said event could crash/freeze the game because it should've been parallel not auto run. But just because the improper use of an auto run event can freeze a game doesn't mean I think the ability to make auto run events should be removed.

It's the same with webp, or file formats in general, to me. The game developer should understand the platform that they are developing on. Should Kadokawa implement this feature and people start deploying games for browser, then it's the devs responsibility to make sure that the browser can display their game properly.

As the software developer, Kadokawa should be in the business of give the game developer all the tools they can in order for developers to develop games. But at the same time, it's not Kadokawa's responsibility to babysit users in using said tools. FAQs are fine. Forums are lovely. But don't limit my choices because somebody else might mess something up. It makes no sense to limit/deny a feature when the "problem" only affects 1/5 people. Windows Deployment is fine. Mac Deployment is fine. Browser Deployment on windows is fine. Browser Deployment for mac is iffy, if you use Safari. If not, it's probably fine.

Webp works for every conceivable form of deployment except on Safari. Currently. That's not a webp "problem". That's a Safari problem, which might not even be an issue in the future, and shouldn't be an excuse to block a feature for everybody but Safari developers. No, seriously, you're basically saying a person shouldn't be allowed to do something because given the choice another person may try to do the same thing and F it up. What?
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,097
Reaction score
15,404
First Language
Filipino
Primarily Uses
RMMZ
This might be hard to support because not every browser or device supports this either:

Opera and Chrome are browser that can both view WebP images and officially accepts the image/webp content type. In summary, Opera and Chrome are supporting webp, and Mozilla is taking a closer look.
- Oct 14, 2020
As of September 2020 the latest news I can found about WebP
1603463241712.png
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
194
Reaction score
281
First Language
English
Primarily Uses
RMMZ
Just wanted to add but if you want to see what all supports what, "caniuse.com" is a great resource for anything related to what you can use in what browser/version. Since RPG Maker is web based, it is also useful for RPG Maker development. Now obviously you don't need 100% support for something before switching. No one cares that RPG Maker games can't run on IE 6, for example. But Apple's Safari is a pretty major browser still widely used so it should be considered when looking at what is all supported.

webp:

all things supported in each browser:

You can also see the successor to webp "AVIF" which has even better file sizes, about half the size of webp on average, but much worse support across browsers. Unfortunately support varies greatly across browsers, and always has, and likely always will. That's just the nature of web dev. Since RM can be embedded directly in websites in an officially supported manner, it is also the nature of RM dev. If rpg maker should support webp, should it also support AVIF or some other image formats that someone might want to use?

As for the OP, I do not think webp should be supported baseline as you'll get a lot of people wondering why their web deployment doesn't work on their iphone's browser. If you want to optimize image size for your game and you know it won't be played in safari browser, you can use a plugin to switch to webp. There are many optimizations you could make in many areas depending on where you deploy. The default RM imo should be a "best-fit" for all possible deployments and right now that is png for images. If you want to optimize for a certain environment, you can do that with RM just as you would do it in Unity or other game/app dev engines.

If you want to use webp, you should be able to paste this in your plugins (or find the same function in rmmz_managers.js and change the extension from ".png" to ".webp"):
Code:
ImageManager.loadBitmap = function(folder, filename) {
    if (filename) {
        const url = folder + Utils.encodeURI(filename) + ".webp";
        return this.loadBitmapFromUrl(url);
    } else {
        return this._emptyBitmap;
    }
};
I just tested it real quick with the title screen but it seemed to work for that so should work elsewhere as well.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,097
Reaction score
15,404
First Language
Filipino
Primarily Uses
RMMZ
Just wanted to add but if you want to see what all supports what, "caniuse.com" is a great resource for anything related to what you can use in what browser/version. Since RPG Maker is web based, it is also useful for RPG Maker development. Now obviously you don't need 100% support for something before switching. No one cares that RPG Maker games can't run on IE 6, for example. But Apple's Safari is a pretty major browser still widely used so it should be considered when looking at what is all supported.
I was looking for that site but had no luck so I had to rely on latest articles LOL.; And yes, I am aware, that's why I always check for web browser support first if it's worth supporting already. We don't want premature implementation of features.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Officially not a mod anymore. Thanks for the many years!
Thinking if i should post on the classifieds section...
Made another plugin showcase video! :kaojoy:
(Plugins and details inside the description of the YouTube video.) :LZScheeze:
Ami
Castle is my Biggest Fear :kaodes:. I just Managed make Part by Part (like the Entrance only),not the Entire Castle like in the RM Sample...

Forum statistics

Threads
104,375
Messages
1,005,921
Members
135,900
Latest member
Cannal
Top