Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


How to set the game to "interpolate pixels" in GML

View previous topic View next topic Go down

How to set the game to "interpolate pixels" in GML

Post by GoldenBeastStudios on Thu Jul 16, 2009 12:17 am

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! Smile
avatar
GoldenBeastStudios
GameML Adventurer
GameML Adventurer

Posts : 117
Points : 30744
GameML Reputation : 2
Join date : 2009-07-09
Age : 34
Location : Austin, Texas

View user profile http://www.goldenbeaststudios.com

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by gogame1315 on Thu Jul 16, 2009 1:08 pm

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. Smile
avatar
gogame1315
GameML Adventurer
GameML Adventurer

Posts : 103
Points : 32715
GameML Reputation : 10
Join date : 2009-07-10
Age : 21

View user profile http://www.yoyogames.com/members/gamesgo1315

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by 3d on Thu Jul 16, 2009 1:44 pm

Yes.

_________________
Creator of GameML, Thanks for Visiting!
avatar
3d
Admin
Admin

Posts : 1227
Points : 42686
GameML Reputation : 66
Join date : 2009-05-31
Age : 35
Location : U.S.A

View user profile http://gameml.iowoi.org

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by asmodeus on Thu Jul 16, 2009 2:09 pm

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. Smile
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.
avatar
asmodeus
GameML Noob
GameML Noob

Posts : 12
Points : 30550
GameML Reputation : 5
Join date : 2009-07-15
Age : 24
Location : Germany

View user profile http://asmodeusgames.comze.com/index.php?p=1

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by 3d on Thu Jul 16, 2009 2:12 pm

why would you need it in GML, just do it which the action in Game Settings.

_________________
Creator of GameML, Thanks for Visiting!
avatar
3d
Admin
Admin

Posts : 1227
Points : 42686
GameML Reputation : 66
Join date : 2009-05-31
Age : 35
Location : U.S.A

View user profile http://gameml.iowoi.org

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by asmodeus on Thu Jul 16, 2009 2:16 pm

3d wrote:why would you need it in GML, just do it which the action in Game Settings.
Maybe he wants to let the user change it while playing.
avatar
asmodeus
GameML Noob
GameML Noob

Posts : 12
Points : 30550
GameML Reputation : 5
Join date : 2009-07-15
Age : 24
Location : Germany

View user profile http://asmodeusgames.comze.com/index.php?p=1

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by 3d on Thu Jul 16, 2009 2:17 pm

would it make a difference?

_________________
Creator of GameML, Thanks for Visiting!
avatar
3d
Admin
Admin

Posts : 1227
Points : 42686
GameML Reputation : 66
Join date : 2009-05-31
Age : 35
Location : U.S.A

View user profile http://gameml.iowoi.org

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by asmodeus on Thu Jul 16, 2009 2:20 pm

3d wrote:would it make a difference?
The interpolation? It does with textures (primitives), but I'm not sure about it in general.
avatar
asmodeus
GameML Noob
GameML Noob

Posts : 12
Points : 30550
GameML Reputation : 5
Join date : 2009-07-15
Age : 24
Location : Germany

View user profile http://asmodeusgames.comze.com/index.php?p=1

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by GoldenBeastStudios on Thu Jul 16, 2009 2:23 pm

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 Razz

Thanks for the replies everyone!
avatar
GoldenBeastStudios
GameML Adventurer
GameML Adventurer

Posts : 117
Points : 30744
GameML Reputation : 2
Join date : 2009-07-09
Age : 34
Location : Austin, Texas

View user profile http://www.goldenbeaststudios.com

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by GoldenBeastStudios on Thu Jul 16, 2009 2:27 pm

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 Razz)
avatar
GoldenBeastStudios
GameML Adventurer
GameML Adventurer

Posts : 117
Points : 30744
GameML Reputation : 2
Join date : 2009-07-09
Age : 34
Location : Austin, Texas

View user profile http://www.goldenbeaststudios.com

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by gogame1315 on Thu Jul 16, 2009 2:42 pm

asmodeus wrote:
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. Smile
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.
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:
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”.
avatar
gogame1315
GameML Adventurer
GameML Adventurer

Posts : 103
Points : 32715
GameML Reputation : 10
Join date : 2009-07-10
Age : 21

View user profile http://www.yoyogames.com/members/gamesgo1315

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by gogame1315 on Thu Jul 16, 2009 2:45 pm

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 Razz)
Hmm. Maybe I’m thinking about a different thing. Do what I said above and see if that’s what you want.
avatar
gogame1315
GameML Adventurer
GameML Adventurer

Posts : 103
Points : 32715
GameML Reputation : 10
Join date : 2009-07-10
Age : 21

View user profile http://www.yoyogames.com/members/gamesgo1315

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by GoldenBeastStudios on Thu Jul 16, 2009 3:31 pm

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 Razz 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 Razz As a side note, combining both smooth edges with interpolation makes the sprite even more blended/blurry.

Thanks for all your help guys!
avatar
GoldenBeastStudios
GameML Adventurer
GameML Adventurer

Posts : 117
Points : 30744
GameML Reputation : 2
Join date : 2009-07-09
Age : 34
Location : Austin, Texas

View user profile http://www.goldenbeaststudios.com

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by gogame1315 on Thu Jul 16, 2009 3:50 pm

Good Very Happy
avatar
gogame1315
GameML Adventurer
GameML Adventurer

Posts : 103
Points : 32715
GameML Reputation : 10
Join date : 2009-07-10
Age : 21

View user profile http://www.yoyogames.com/members/gamesgo1315

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by 3d on Thu Jul 16, 2009 7:49 pm

Interesting, never needed this feature though.

_________________
Creator of GameML, Thanks for Visiting!
avatar
3d
Admin
Admin

Posts : 1227
Points : 42686
GameML Reputation : 66
Join date : 2009-05-31
Age : 35
Location : U.S.A

View user profile http://gameml.iowoi.org

Back to top Go down

Re: How to set the game to "interpolate pixels" in GML

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum