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

Resolution results in bugs (input/camera) #3606

Closed
Secretmapper opened this issue Apr 21, 2018 · 7 comments
Closed

Resolution results in bugs (input/camera) #3606

Secretmapper opened this issue Apr 21, 2018 · 7 comments

Comments

@Secretmapper
Copy link

Secretmapper commented Apr 21, 2018

I'm using resolution: 2 to essentially scale the game up twice. This works for the most part, until input and cameras are used. Namely for example, camera background color works on the 'smaller' resolution (hence it's smaller), and input doesn't work on cameras when zoomed.

I'm going to put sample code soon, just rushing right now for Ludum Dare ;) I'm not necessarily sure if it's a bug (perhaps this is expected behavior?) but it's quite unintuitive.

This is on 3.6 as well

@samid737
Copy link
Contributor

samid737 commented Apr 23, 2018

@Secretmapper , does this demonstrate the camera background color issue you describe?:

http://jsfiddle.net/eggyj6kq/1/

The second problem is not reproducable solely with resolution changes. Input works the same:

Resolution 2.

Resolution 1.

The case of camera zoom combined with resolution change is considered following example, where the camera is zoomed out to 0.5 and resolution is 1.5. Clicking on the top most results in some input offset, which might be related to the second problem description.

The case of camera zoom without resolution change works as expected.

all in v3.6.0

@Secretmapper
Copy link
Author

Secretmapper commented Apr 25, 2018

Hey, sorry for taking so long to reply,

@samid737 That's awesome, your examples pinpointed exactly the problems I faced. In particular

  • the first fiddle demonstrates how the camera background colour doesn't show up in the new entire screen,
  • the fourth example shows the input problem (I guess input not working was too strong of a word - as you mentioned it simply results in input offset.)

I wasn't sure if this was expected behaviour or a legitimate bug, but it was a bit confusing when it came up. In the end, I had to scale my textures and set resolution to 1 again to make the behaviour more consistent, but I like the idea of having resolution 2 for autosizing (and I'm guessing this was also made for retina?).

@photonstorm
Copy link
Collaborator

This issue is currently blocked pending development of the Scale Manager, which will begin during the month of May 2018. It will be updated once it has been tested against the new Scale Manager.

@RichardGale
Copy link

Seeing the same thing as example 4 above, http://jsfiddle.net/9roqyue9/13/.

Two cameras, one for game play objects and one for the UI, scaled differently the drag collision areas are offset.

@photonstorm
Copy link
Collaborator

Camera color issue fixed in master.

Input resolution issues being worked on at the moment.

Anything not to do with resolution > 1 in this issue will not be covered by this work and needs to be opened in their own separate issues.

@photonstorm
Copy link
Collaborator

Ok, input is fixed now too. Also fixed issue with Camera Flash and Fade effects. Setting resolution > 1 will now stop these from all breaking.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants