Code:
Problem description:
Hi i have one question. Is posible to zoom "map" in game, without object in screen?(I mean about HUD)
Like this video.
https://youtu.be/YWvW9srnIXQ?t=5s (in 0:05s)
ID:2029113
Feb 2 2016, 12:16 pm
|
|
Feb 2 2016, 1:02 pm
|
|
Of course. Plane masters affect the view on the same plane, so just apply a transform matrix to scale everything uniformly.
|
With the new plane master feature, just scale up the transform of the plane master that is on a plane above your scene and below the HUD.
You can also smoothly rotate the view this way. |
I was wrong actually, the plane master only affects its own plane.
I guess it goes something like this: mob |
Man, that's one step-heavy way of doing that.
obj/map_zoom Lots less var lookups, creations and accesses in that, meaning less overhead. |
Any thoughts on how you handle this for multiple users where you want each player to have their own zoom state without having to manage duplicate objects/images for every user?
*edit* Removed a couple ideas that didn't make sense. |
In response to Nadrew
|
|
Right. Plane masters only have an effect on clients that can see them (although the plane masters themselves aren't drawn). This is why they're added to client.screen, so they're always visible.
For example, place a plane master just outside of view, move towards it and its effects will show, move away from it and its effects disappear. |
They work as a single image output to the client as well. The only caveat here is that things that aren't on the same plane as the transformed master won't be zoomed, so things can get a bit weird.
|
My map zooming lib (didnt post it on byond) can do the job pretty well.
datum/var |
In response to Hebrons
|
|
Hebrons wrote:
My map zooming lib (didnt post it) can do the job pretty well. Doesn't that approach zoom everything including HUD elements? |
true that, the reason i actually made the lib was because i think it was Brandon M. wondering how zooming could be accomplished on byond and i sorta made a snippet for that and made it a lib but yes it does, but my resolution was to just make a screen_obj_off/on() proc and call it in zoom but yes that's the only down side to my lib.
|
In response to Hebrons
|
|
Hebrons wrote:
true that, the reason i actually made the lib was because i think it was Brandon M. wondering how zooming could be accomplished on byond and i sorta made a snippet for that and made it a lib but yes it does, but my resolution was to just make a screen_obj_off/on() proc and call it in zoom but yes that's the only down side to my lib. Comment in your example suggests the "library" was made for you. :) Still useful and not a downside if that's the type of zooming you need. |
In response to Nadrew
|
|
Nadrew wrote:
The way it's setup now would allow for varied zoom levels between users. I think I get it. By not specifying a plane, are we assuming everything else is on the same plane which is why it would work? Does that also mean that any effect applied to any one object on the same plane will be applied to everything on that plane? I need to spend some time on it. |
In response to PopLava
|
|
The effect isn't applied to everything on the plane, individually. When visible (although the plane master itself isn't actually drawn), a plane master's transform, color, and blend_mode will affect the plane as if it were one big icon.
By default, atom.plane = 0. Assuming the stuff you want to zoom is on plane 0, scaling up the plane master of plane 0 will effectively zoom-in that plane. |
In response to Kaiochao
|
|
Kaiochao wrote:
The effect isn't applied to everything on the plane, individually. When visible (although the plane master itself isn't actually drawn), a plane master's transform, color, and blend_mode will affect the plane as if it were one big icon. *ding* - Thank you. |