Log in
Search
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.How to set the game to "interpolate pixels" in GML
4 posters
:: Game Making :: Game Maker Help :: Game Dev. Q&A :: GML help (Coding)
Page 1 of 1
How to set the game to "interpolate pixels" in GML
Is there a way to set the game to "interpolate pixels" (as I would in the global game settings) in GML? The closest thing I could find is texture_set_interpolate, but I can't really tell if that's the right command or how I would go about setting all the game's sprites to that :p
Thanks to all who reply!
Thanks to all who reply!
Re: How to set the game to "interpolate pixels" in GML
I think that the function “texture_set_interpolation(linear)” is right. I tested it and it seems to be the thing your looking for.
try
texture_set_interpolation(true)
or
texture_set_interpolation(false)
tell me if I’m wrong.
try
texture_set_interpolation(true)
or
texture_set_interpolation(false)
tell me if I’m wrong.
Re: How to set the game to "interpolate pixels" in GML
I think that function is only for drawing in 3d and 2d primitives, and not for the screen in general. Primitives can use textures, but the screen is no texture.gogame1315 wrote:I think that the function “texture_set_interpolation(linear)” is right. I tested it and it seems to be the thing your looking for.
try
texture_set_interpolation(true)
or
texture_set_interpolation(false)
tell me if I’m wrong.
Re: How to set the game to "interpolate pixels" in GML
why would you need it in GML, just do it which the action in Game Settings.
Re: How to set the game to "interpolate pixels" in GML
Maybe he wants to let the user change it while playing.3d wrote:why would you need it in GML, just do it which the action in Game Settings.
Re: How to set the game to "interpolate pixels" in GML
The interpolation? It does with textures (primitives), but I'm not sure about it in general.3d wrote:would it make a difference?
Re: How to set the game to "interpolate pixels" in GML
The idea of having it in GML is to put an option in the game to change the interpolation setting, just so that people with faster PCs can get the benefit of it, without hampering older PCs. I also have settings for 16-32 bit color, and syncronization, which work fine, I just seem to be having issues with this last interpolatoin one
Thanks for the replies everyone!
Thanks for the replies everyone!
Re: How to set the game to "interpolate pixels" in GML
Yeah, I'm starting to suspect that the global game setting "interpolate colors between pixels" might only apply to 3d games, there's just no in-depth documentation about interpolation and how it works in a 2d game (if at all )
Re: How to set the game to "interpolate pixels" in GML
I thought that too. But in the GM help it saes “(This can also be changed in the global game settings.)” for the function. See what I saw by:asmodeus wrote:I think that function is only for drawing in 3d and 2d primitives, and not for the screen in general. Primitives can use textures, but the screen is no texture.gogame1315 wrote:I think that the function “texture_set_interpolation(linear)” is right. I tested it and it seems to be the thing your looking for.
try
texture_set_interpolation(true)
or
texture_set_interpolation(false)
tell me if I’m wrong.
Make a sprite about 32x32.
Make an object and loading in the sprite.
On a “create event” set the speed to 0.1
Then add a “press <space>” event and add the code “texture_set_interpolation(false)”
Then add a “press <enter>” event and put the code “texture_set_interpolation(true)”
Make a room with the size 64x64
Put the object on the room.
Play it and set the game to full screen so you can see it.
Test it by pressing “space” and “enter”.
Re: How to set the game to "interpolate pixels" in GML
Hmm. Maybe I’m thinking about a different thing. Do what I said above and see if that’s what you want.GoldenBeastStudios wrote:Yeah, I'm starting to suspect that the global game setting "interpolate colors between pixels" might only apply to 3d games, there's just no in-depth documentation about interpolation and how it works in a 2d game (if at all )
Re: How to set the game to "interpolate pixels" in GML
Thank you gogame1315! Your test was what I was missing. I just couldn't really tell if it was working or not in the game. Since there is no texture_get_interpolation command, I had to eyeball it and I started confusing smooth sprites with interpolated ones I also made another object in your test (with no commands) and when I pressed space it also became interpolated, so the texture_set_interpolation command is indeed global. I think because my PC is farily high-end there was no screen flicker or fps drop when the setting is changed (which threw me off as well). So it's been working all along, I just couldn't notice it As a side note, combining both smooth edges with interpolation makes the sprite even more blended/blurry.
Thanks for all your help guys!
Thanks for all your help guys!
Re: How to set the game to "interpolate pixels" in GML
Interesting, never needed this feature though.
Similar topics
» my "3D Tumble" game
» "Burned by Ice" A game by 3d
» ElmntryMz- a 3d game- Team for GameStop Indie Game Competition
» "Zero Gravity" collisions
» Best FPS game
» "Burned by Ice" A game by 3d
» ElmntryMz- a 3d game- Team for GameStop Indie Game Competition
» "Zero Gravity" collisions
» Best FPS game
:: Game Making :: Game Maker Help :: Game Dev. Q&A :: GML help (Coding)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|