Edited by PHL, 24 June 2011 - 12:16 PM.
Pixel Perfect Resizing
Posted 26 June 2011 - 03:18 AM
Is it DirectX that causes blurring ?
Yes, it's a by-product of 2D hardware acceleration, done WAY back i the early Direct-X days, I believe it's bi-linear interpolation.
Posted 03 July 2011 - 04:29 PM
yoyo: this should be a free update. Don't wait for next release.
Posted 04 July 2011 - 08:03 AM
EDIT: Ok, I did find one thing I can't figure out, although I'm sure it's simple. When zoomed, mouse_x and mouse_y get fouled up - they report where the mouse would be on the unscaled screen, rather than the scaled-up version. Creating an object that follows the mouse will work when the mouse is at the 0,0 screen coord(regardles of where the view is), but it gets exponentially farther away from the mouse the farther from 0,0 it gets. I was able to easily replicate this in your example file. How should this be addressed?
EDIT 2: I figured out something.
Edited by Captain_Capitalism, 04 July 2011 - 10:43 AM.
Posted 16 February 2012 - 07:44 PM
You see in my game I need to get the colour of the background in certain position. But there may be things in front of it, so in an alarm event I periodically draw the background over everything and use draw_get_colour or whatever it's called. Using GM's native drawing system this doesn't show up at all but using this it manifests itself as an annoying flash.
Is there any way to stop drawing things I don't want to see or should this not happen?
I can draw things in the step event and they show up, unscaled and transparent, on screen.
So I can draw outside the draw event and see things I shouldn't.
Edited by fawful, 25 February 2012 - 09:43 PM.
Posted 24 April 2013 - 06:14 PM
Great script! Extremely useful! I got it up and running for rooms that don't use views in mere minutes! For rooms with views however, I'm not quite sure how to go about it.
"You have to make your own system for view handling."
I attempted something easy, like just having my camera object (the object the view should follow) have this in the step event:
there's no vertical movement (save for a few camera shakes) but when using this, it goes for a tiny little bit, and then the game freezes. Since I'm not getting a crash log or anything, I'm not sure where to go next in developing a system for view handling.
I know this topic is old, but maybe somebody has an idea what type of system would work?
I might of posted this too soon! It seems to have something to do with the fact that I'm deactivating things based on the view! Trying to sort it out now
Just had to activate global.screencontroller! Awesome! :D
Edited by Lazy Brain Games, 24 April 2013 - 07:02 PM.
Posted 26 April 2013 - 02:36 AM
I think my graphics cards hate scaling surfaces, because when I wrote up a custom room transition, I was getting stray rows or columns of pixels. I was like, "Why ain't this lining up right?" I'd check my numbers and everything lined up right except for one stray row or column of pixels. It only rally mattered I think when using draw_rectangle() though. I'd draw a 16x16xscale_factor rectangle, for example, and it wouldn't cover up the 16x16xscale_factor image on the surface no matter what coordinates I used for the rectangle. But if I used a view scale factor of 3:1, the rectangle would raw just fine. Oh well, i might try this code out and see what it does for my games.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users