R
robproctor83
Guest
Hello,
Maybe this isn't possible with GM, but I'm hoping to get some insight into problem I'm having. In particular this is regarding the free asset in the marketplace called FG Lighting, but generally speaking this is an issue I run into with drawing shapes in a pixelated game.
My game uses an upscaled application surface, base resolution is 480x270 and it's upscaled by 4 to 1920x1080 which works great and gives me sub pixel rendering like I want. The problem is with drawing pixel perfect shapes with sub pixel rendering. For example, if I wanted to create a pixel circle I would have to draw it onto a surface that is 480x270 wide and then upcale that surface to the application surface which works, but if I wanted to move that circle by anything other than a whole number it flickers and moves erratically.
So, essentially what I am trying to figure out is how I can draw pixel shapes at the up-scaled resolution and keep sub pixel rendering. It seems I have to sacrifice one or the other (pixelated drawing or sub pixel rendering), but I get the feeling there is a way I am just missing it. By the way, just to clarify, I am specifically trying to retain the pixelated effect of drawing on a small surface, I understand it is possible to draw to an up-scaled surface and then scale it back down to get sub pixel rendering, but doing so will draw a smooth circle which is not what I want.
PS: I'm interested in knowing any solution possible, though I am only likely to implement it if it's not a performance issue. For example, my issue with FG lighting, I am able to resolve it by making the lights surface the size of the room instead of the view and then draw just the particular part of the surface that the view covers. That works exactly like I want, BUT it's not good on performance. There is a noticeable drop in overall performance when doing this which really sucks. I also went through the trouble of up-scaling drawing to the surface and then scaling it back down, which also worked but gave me unwanted sharp edges (which is the issue I am posting about now).
Maybe this isn't possible with GM, but I'm hoping to get some insight into problem I'm having. In particular this is regarding the free asset in the marketplace called FG Lighting, but generally speaking this is an issue I run into with drawing shapes in a pixelated game.
My game uses an upscaled application surface, base resolution is 480x270 and it's upscaled by 4 to 1920x1080 which works great and gives me sub pixel rendering like I want. The problem is with drawing pixel perfect shapes with sub pixel rendering. For example, if I wanted to create a pixel circle I would have to draw it onto a surface that is 480x270 wide and then upcale that surface to the application surface which works, but if I wanted to move that circle by anything other than a whole number it flickers and moves erratically.
So, essentially what I am trying to figure out is how I can draw pixel shapes at the up-scaled resolution and keep sub pixel rendering. It seems I have to sacrifice one or the other (pixelated drawing or sub pixel rendering), but I get the feeling there is a way I am just missing it. By the way, just to clarify, I am specifically trying to retain the pixelated effect of drawing on a small surface, I understand it is possible to draw to an up-scaled surface and then scale it back down to get sub pixel rendering, but doing so will draw a smooth circle which is not what I want.
PS: I'm interested in knowing any solution possible, though I am only likely to implement it if it's not a performance issue. For example, my issue with FG lighting, I am able to resolve it by making the lights surface the size of the room instead of the view and then draw just the particular part of the surface that the view covers. That works exactly like I want, BUT it's not good on performance. There is a noticeable drop in overall performance when doing this which really sucks. I also went through the trouble of up-scaling drawing to the surface and then scaling it back down, which also worked but gave me unwanted sharp edges (which is the issue I am posting about now).
Last edited by a moderator: