ID:1388769
 
Resolved
Maps now upscale using nearest-neighbor interpolation. (Transformed sprites are still handled separately.)
Applies to:Dream Seeker
Status: Resolved (508.1290)

This issue has been resolved.
As Writing A New One pointed out this this bug report, BYOND's map scaling looks hideously blurry. This is because BYOND does not support nearest neighbor interpolation. Since Lummox seemed to suggest that this was a viable feature request, I thought I'd go along and suggest it.

This would be incredibly useful. Currently, if I make games that use a small icon size such as 8x8, I need to resize them beforehand and increase the game's icon size from the start. If I didn't do that and simply increased the resolution (even if it were perfectly scaled) the game would end up blurry. Support for nearest neighbor interpolation would solve this problem and give me my oversized pixels.
Also, adding this to matrix transform behavior would be brilliant. Currently, when attempting to form a trapezoidal shape using two right triangles containing each, half of a square texture, I wind up with some really bad blending due to the mask diluting my edge.

I wonder...
triangles + transform = 3D model?
This would be extremely helpful with my current project. I'm really tempted to just resize the current artwork and go with one resolution as a temporary fix, albeit a poor one.
I'm definitely all for this, since the games I develop make heavy use of small graphics dynamically being upsized.
Over-sized pixels is all I do.
Please make them pretty! :)
Applying this to transforms and to the map would be two different things.

As far as the map goes, I can see two ways to go with this: The simple way is that whatever way it's set (most likely a skin setting), it would just turn off anti-aliasing at the map stretch level. However it seems like in this mode, authors would want to control the stretch so scaling didn't appear uneven, so perhaps in this mode auto-scaling should always round (yet if so, down, up, or nearest?) to an even multiple of map size.
This feature would be pretty pointless on any resolution that isn't an even multiple of the original. Why not just make it turn off anti-aliasing when the map is perfectly stretched to a multiple of the original map size (whether scaled up or down)? I see no reason why this couldn't be default behavior, since non-filtered over-sized pixels look a lot better than filtered ones. This way, you could stretch the map to any size, but the filter would go away when it's stretched properly.
In response to Fugsnarf
That would look terrible while manually making size changes. The map would suddenly change in quality.
I generally don't see any issues with map blurring when setting the map control's scale to twice the size. There have been some instances where it did happen, but for whatever reason, making a new project and putting the assets in it solved the problem. Even toggling hardware graphics mode before doing that would do nothing, it seemed.

I think a simple AA toggle would be pretty good (as a skin option even).

Possibly...
winset(client,"win_main.map","anti-aliasing=false") // or "true"
Hrm, lovely. It seems our DirectX setup doesn't actually let us control this. I'd need to do a workaround.
In response to Lummox JR
Lummox JR wrote:
That would look terrible while manually making size changes. The map would suddenly change in quality.

I don't really see how that would look terrible since the quality would be suddenly improving when the map is perfectly scaled. I've seen this done before, and I think it's appropriate. Either way, I like the option being available at all. Hopefully you can find some kind of workaround.

On a tangent, I've wondered for some time whether it would be useful to have a skin param for maps that changes the presentation mode from letterboxed to clipped when the aspect ratio doesn't match.
I think it would be a nice option. I do like the idea of it auto-scaling when the map size is at an even multiple of the original. Really, I just like options. And not just for me, but I like to give my players as much flexibility as possible. To be able to switch between filtering, auto-scaling, letterboxing, and clipping would all be really cool options to give the player. Just the ability to remove anti-aliasing, however, would transform my projects for the better.
In response to Lummox JR
Lummox JR wrote:
Hrm, lovely. It seems our DirectX setup doesn't actually let us control this. I'd need to do a workaround.

Hums and whistles quietly to himself.
There's another option, hopefully soon-ish. :)
In response to Flame Sage
Flame Sage wrote:
Lummox JR wrote:
Hrm, lovely. It seems our DirectX setup doesn't actually let us control this. I'd need to do a workaround.

Hums and whistles quietly to himself.
There's another option, hopefully soon-ish. :)

I'm not sure what you're referring to, but if it's some new feature in DirectX, I don't see that as an option. It has to be something older that will have good compatibility for lots of people, myself included since I'd have to test it.
It wouldn't be built into DirectX per-se, no. It would have to be done in the form of a fragment shader passed into the graphics context to the GPU.
Oh neat, forgot to keep tabs on this topic. Looks like a lot of research has went into seeing whether or not this is feasible for the near future.

Is this a planned feature now or is it still being considered?
In another topic everyone was talking about switching to OpenGL, so if that's going to happen, then it needs to happen first. I think OpenGL may raise the hope and open some doors that may one day allow BYOND to be ported to other platforms, considering that DirectX is proprietary.

I just don't know whether this would be easier or harder to implement in OpenGL, but something tells me it's much more flexible.
bump
Page: 1 2 3 4 5