Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credits are upside down #9

Open
pwab opened this issue Mar 6, 2018 · 7 comments
Open

Credits are upside down #9

pwab opened this issue Mar 6, 2018 · 7 comments
Assignees
Labels
bug Something isn't working engineering An engineering solution to implement a design

Comments

@pwab
Copy link

pwab commented Mar 6, 2018

The credits are shown upside down in the HTML5 build on itch. Haven't tested with other builds.
OS: Windows 7 x64
Browser: Firefox Developers Edition 59.0b14 (64-Bit)

upside_down

@henriiquecampos henriiquecampos added bug Something isn't working design A design proposal to solve a problem labels Mar 6, 2018
@henriiquecampos henriiquecampos self-assigned this Mar 6, 2018
@henriiquecampos
Copy link
Owner

Hmm this maybe a bug somekind related to the viewport rendering it...hmm can you please describe which browser and version this happened?

@williamd1k0
Copy link

I can confirm.
FF 58 32bit on Windows 10.

I'm using Godot 3.0 btw

Stdout/Stderr

**ERROR**: pre-main prep time: 2744 ms
let it go dude!
**ERROR**: Calling stub instead of sigaction()
**ERROR**: warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling
Init OS
Init Audio
Init VS
Init Physicsserver
OpenGL ES 3.0 Renderer: Mozilla
GLES3: max ubo light: 409
GLES3: max ubo reflections: 455, ubo size: 144
ARVR: Registered interface: Native mobile
**ERROR**: enlarged memory arrays from 16777216 to 33554432, took 38 ms (has ArrayBuffer.transfer? false)
**ERROR**: Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**:    At: scene/2d/sprite.cpp:224:set_frame() - Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**: Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**:    At: scene/2d/sprite.cpp:224:set_frame() - Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**: Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**:    At: scene/2d/sprite.cpp:224:set_frame() - Index p_frame=3 out of size (vframes * hframes=1)
**ERROR**: Node not found: CreditsViewport
**ERROR**:    At: scene/main/node.cpp:1524:get_node() - Condition ' !node ' is true. returned: 0L
**ERROR**: ViewportTexture: Path to node is invalid
**ERROR**:    At: scene/main/viewport.cpp:65:setup_local_to_scene() - Condition ' !vpn ' is true.

@henriiquecampos
Copy link
Owner

henriiquecampos commented Mar 6, 2018

One strange thing I noticed in the screenshot is that other elements of the screen if also flipped, not only the ones related to Sprite.texture which is a ViewportTexture. Seems like the major Viewport, ie the root node, is flipped.

If it was related to the Credits Sprite the Pigdev icon and the other labels, the one mentioning the tools for instance, wouldn't be flipped.

In the error log @williamd1k0 posted there's a clear error to the CreditsViewport, the one that renders to the texture of the Sprite, but nothing mentioning the root viewport.

@williamd1k0 can you disable the CreditSprite on https://github.com/pigdevstudio/bard-lesson/blob/master/screens/credit_screen/credit_screen.tscn and report what happens? I couldn't reproduce it on my PC although the same errors appear, but if this fixes the render flipping, then there must be some kind of conflict between the Viewports.

@henriiquecampos henriiquecampos added engineering An engineering solution to implement a design and removed design A design proposal to solve a problem labels Mar 6, 2018
@pwab
Copy link
Author

pwab commented Mar 6, 2018

I tried to find the problem but wasn't able to fix it. Runned the game:

  • Inside the editor. No flipped credits. Same error messages.
  • As Windows exe. No flipped credits. Same error messages.
  • As HTML5 export. Flipped credits. A bit more error messages.

The reported ViewportTexture error seems to come from the previous CreditScreen error. This one seems to have its foundation in the basic_screen.gd script with its function named change_scene(to = next_scene). I found that the Credits button of the main_screen.tscn is controlled with a signal connection to this function with a binding of the path to the credit_screen.tscn (which seems to be right as far as I can see).

I'm not sure why this the path is not transferred correctly but I guess this is the problematic point. If the game is running inside the editor or as exe it simply doesn't care about that error but the HTML5 build seems to choke on this. Not sure why. Could be an issue in the build template.

@henriiquecampos
Copy link
Owner

henriiquecampos commented Mar 6, 2018

basic_screen.gd is the base for every scene in the game, if it was related to it every screen would get this error/bug.

I think it is related to Credits, inside the screens/credit_screen/credit_screen.tscn. It is a Sprite using a ViewportTexture.

When seting the viewport_path property of this ViewportTexture through the editor, apart from these errors everything runs fine. But when setting this property manually through code, nothing is shown, not even these errors and the only thing I get is:

0:00:01:0841 - Condition ' !vp ' is true. returned: Size2()
----------
Type:Error
Description: 
Time: 0:00:01:0841
C Error: Condition ' !vp ' is true. returned: Size2()
C Source: scene\main\viewport.cpp:106
C Function: ViewportTexture::get_size

@henriiquecampos
Copy link
Owner

Ok, searching in Godot Engine I found this godotengine/godot#16067 must certanly these issues are related

@pwab
Copy link
Author

pwab commented Mar 6, 2018

basic_screen.gd is the base for every scene in the game, if it was related to it every screen would get this error/bug.

It seems you have gotten me wrong here. Just wasn't sure if the signal connection binding was configured the right way.

But the issue you linked clearly shows the same behaviour for other projects - so nevermind. I'm still not sure why the HTML5 build handles this in another way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engineering An engineering solution to implement a design
Projects
None yet
Development

No branches or pull requests

3 participants