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

FlxGame#new()'s confusing zoom parameter #1977

Closed
Tracked by #2538
JoeCreates opened this issue Oct 4, 2016 · 7 comments · Fixed by #2591
Closed
Tracked by #2538

FlxGame#new()'s confusing zoom parameter #1977

JoeCreates opened this issue Oct 4, 2016 · 7 comments · Fixed by #2591
Milestone

Comments

@JoeCreates
Copy link
Member

JoeCreates commented Oct 4, 2016

Following my change in #1889 to make scrollbounds account for zoom, a couple of people have had issues due to the zoom parameter of FlxGame#new() not being set to 1 (#1976).

It seems that in both cases there was confusion about the meaning of said parameter, where it was interpreted to have an actual impact on the scale of the game, whereas it's actual meaning now seems to be "what value of zoom should count as not zoomed". My change did not take this into account and so does not work for other values in here. I believe it could be fixed simply by dividing the value of zoom that is used in updateScrollBounds by the game's defaultZoom, although this wouldn't help with the continued misinterpreting of the scroll parameter, which seems to have lost it's utility since the introduction of scale modes.

In the coming weeks when I have time I'll modify updateScrollBounds to account for other FlxGame zoom values. Is there any reason for this parameter to be kept long term, or should it ultimately be removed with the next batch of breaking changes?

@Gama11
Copy link
Member

Gama11 commented Oct 9, 2016

Looks like there's actually not a single demo that has Zoom != 1. So, yeah, I doubt it's really necessary anymore with scale modes...

@Gama11 Gama11 added this to the 5.0.0 milestone Oct 9, 2016
@Gama11
Copy link
Member

Gama11 commented Oct 9, 2016

Does the fix in 96dccf0 look sensible?

@JoeCreates
Copy link
Member Author

Yeah, that looks correct. :)

@buckle2000
Copy link
Contributor

I changed Zoom to 3 and nothing happened. Is that a bug?
Flixel 4.2.0

@Mouradif
Copy link

Mouradif commented Jan 30, 2017

Same here, the Zoom parameter in FlxGame's constructor doesn't seem to have any effect.
Also Flixel 4.2.0

Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this issue Apr 18, 2018
@Geokureli Geokureli mentioned this issue Apr 20, 2022
10 tasks
@Geokureli
Copy link
Member

Clearing out 5.0.0 tasks, was this completed?

@Geokureli
Copy link
Member

I tried various demos with a zoom other than 1 and it didn't seem to have any effect on the "pixel size" like the documentation claims. I say we remove this property, and better teach scalemodes

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

Successfully merging a pull request may close this issue.

5 participants