RPG-Paper-Maker / RPG-Paper-Maker

RPG Paper Maker is a game making engine, free for non commercial use, allowing you to create a 3D universe with many 2D sprites and even 3D objects using a simple interface for all available platforms: Windows, Linux, and MacOS.
http://rpg-paper-maker.com
Other
612 stars 67 forks source link

cannot start a new game on a web export for the example #98

Closed rufasterisco closed 1 year ago

rufasterisco commented 1 year ago

Hello Thanks for sharing your great project! I have built the example project you ship, as well as completely empty one, and in both cases, after serving it locally, i can load the game. I can navigate all menus in the initial splash screen, but when I start a "New game", the interface is stuck at "Loading".

This happens in Chrome (Version 113.0.5672.126 (Official Build) (arm64), on a MacBook Air M2 running Ventura 13.4 (22F66)), as well as Firefox and Safari. Opening dev tools the console logs keeps looping on the same error:

Platform.js:142 Error: Can not resolve #include <morphcolor_vertex>
    at includeReplacer (three.js:17887:9)
    at String.replace (<anonymous>)
    at resolveIncludes (three.js:17877:16)
    at new WebGLProgram (three.js:18349:17)
    at Object.acquireProgram (three.js:18906:14)
    at getProgram (three.js:26078:27)
    at setProgram (three.js:26263:14)
    at WebGLRenderer.renderBufferDirect (three.js:25383:19)
    at renderObject (three.js:26013:11)
    at renderObjects (three.js:25972:5)

Building it for MacOS works fine. Thanks again for your excellent work

Wano-k commented 1 year ago

Hello! Thank you for your kind message. That issue looks weird. Make sure that you copied correctly all the files, take a particular care on the Content/Datas/Scripts/Libs/three.js and all the Content/Datas/Shaders folder. Create a fresh export if necessary. And clear your browser cache.

If it still doesn't work, I'll try again a recent web export. I recently changed the shaders for shadows so maybe something is broken for web now for some reasons.

rufasterisco commented 1 year ago

Thanks for answering me :) I am not manually copying files, I let the exporter do it, so maybe my mistake is there. There is no Content/Datas/Shaders folder, but I do find one in Content/Datas/Scripts/Shaders, here's its content

➜  RPG Paper Maker Games l ExampleBROWSER-v1.0/Content/Datas/Scripts/Shaders 
total 32
drwxr-xr-x  6 francesco  staff   192B May 30 23:19 .
drwxr-xr-x  6 francesco  staff   192B May 30 23:19 ..
-rwxr-xr-x  1 francesco  staff   689B May 28 13:30 face.frag
-rwxr-xr-x  1 francesco  staff   695B May 28 13:30 face.vert
-rwxr-xr-x  1 francesco  staff   3.5K May 28 13:30 fix.frag
-rwxr-xr-x  1 francesco  staff   1.1K May 28 13:30 fix.vert

I tried to copy it in Content/Datas/Shaders, but I encounter the same error.

In my http logs i can see the Shader files being loaded from its original location:

[2023-05-30T21:31:37.912Z]  "GET /Content/Datas/Scripts/Shaders/fix.vert" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.921Z]  "GET /Content/Datas/specialElements.json" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.921Z]  "GET /Content/Datas/Scripts/Shaders/fix.frag" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.923Z]  "GET /Content/Datas/tilesets.json" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.923Z]  "GET /Content/Datas/Scripts/Shaders/face.vert" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.924Z]  "GET /Content/Images/Textures2D/Characters/lucas-full.png" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:31:37.925Z]  "GET /Content/Datas/Scripts/Shaders/face.frag" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"

They do not error, there is only a 404 here:

[2023-05-30T21:29:25.574Z]  "HEAD /.protect" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
[2023-05-30T21:29:25.574Z]  "HEAD /.protect" Error (404): "Not found"

The exporter put three.js where you said it should be, its revision is 131,

/**
 * @license
 * Copyright 2010-2021 Three.js Authors
 * SPDX-License-Identifier: MIT
 */
const REVISION = '131';
...

Thanks again, looking forward to hear from you :)

Wano-k commented 1 year ago

Ok everything looks fine to me, I will try to export on my side and let you know very soon.

Wano-k commented 1 year ago

So I checked and yes I had the same issue. As excepted, it's due to shadows update that changed shaders. The web version threejs wasn't updated since a long time and didn't support some of the shaders part. Here is the threejs file to use: here. It will be changed for the next version!

Thanks for reporting!

rufasterisco commented 1 year ago

thanks! going to try it now :)