• 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.

Pixels get blurry when in game

S

Spelfantast

Guest
Hi.

I have constructed a tile-set based on 16x16 tiles.
I exported it as an png and imported it as a background. In the background I put it as an tileset, and start placing the tiles in the room editor.

However, even though they are png, they become blurred when in game. Maybe it has to do with my resolution for playing. If it is, is there any other way to make the pixels look ok without just making them bigger when I paint them? In my painting program, it does not become blurred as I zoom in.

Question 2. Do I understand the usage of tiles correctly as that I have to place individual wall objects one at a time, and then place tiles on top of the objects to make my custom made tiles appear in game?

Question 3. I can zoom in in the room I'm making, but is it also possible to zoom in too the tile-set I choose tiles from?

PS: This is a general idea what I want the map to look like. I want to be zoomed in for about the same size as the first "room" in the top left, with the hole in the ground, a skeleton and eggs on the top left.

prison map 3.png
 
I

icuurd12b42

Guest
uncheck the interpolate option in the games settings graphic options
if this is gm1, look at how you should define your tile if you do zooming or your game is scaled up
Seamless tile scaling in GameMaker
alternatively you can surface_resize the application_surface to be the size of view_wview and view_hview so the drawing is done on a 1:1 scale and the surface is scaled up to the display instead of each tile be scaled independently.

what happens with interpolation is when the tile is scaled the edge pixels are blended with their neighbor on the tileset... if the neighbor is another tile that has the same edge you dont notice. If not then you get weird stuff. if the neighbors of edge pixels are transparent then the pixels will fade in alpha AND will also merge in color with the transparent pixels.. so if they are black, alpha 0 then your edge will be transparentish and blackish

without interpolation, you still risk having edges from the neighboring pixels seen as distinct gaps or artefacts between tiles in the room if you dont define you tiles properly and/or you did not set the application_surface size to 1:1 ratio
 
K

KH-SOS

Guest
texture_set_interpolation(false)
Keeps your pixels their pixeliest. However I find that it can somehow get turned true if windows lose focus even if you never set it true anywhere in your code. So I recommend having that code run on a reoccurring basis - great in a pause/unpause event you run if your game loses or gains focus.
 
Top