• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Background Add killing last pixels of the image

I

Irving Decarlo

Guest
Hello fellow members of the community;

Today, when developing my game, I came across this issue. When I create a new background using the function "background_add", it loads the image perfectly... in exception of its two last pixels. I hadn't noticed this before, because none of my backgrounds would tile, only scale to the window size. But then, when I made a new background to tile and move, its last pixels were blank. Here is the image: http://imgur.com/cVhOYjK.

After that I percepted that problem, I noticed that my scaled backgrounds had the very same problem, although way harder to notice due to the fact that these lost pixels were on the right margin of the screen.

At first, I thought that it happened because of my image editing tool, GIMP, so I imported the image directly to one of my background sources in Game Maker and shifted the image. There were no lost pixels there. So, this possibility was gone.

Then I thought that it would maybe happen because of the "background_add" function, which was my biggest fear. To test it, I used the imported image and applied it to the background of that room. Again, no lost pixels.

Now, I could easily contour this issue by assigning that background as a direct resource, instead of being an included file that is loaded in mid game. But that would cost way too much memory for using that background every now and then, specially because the windows platform does not support the "draw_texture_flush" function.

So, has anyone faced this very same issue in any project? If yes, did you manage to solve it? All help will be appreciated.

// NOTE: Happens to "background_replace" too.

Thank you!
 
Top