• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM [SOLVED] Texture From Sprite Sheet?

T

TheJJGamer

Guest
I've realized the question I had was a misunderstanding, so I've erased it.

Sorry for wasting some peoples time.
 
Last edited by a moderator:

obscene

Member
You can import the whole thing as one sprite with each tile a subimage.


Each block would be assigned the same sprite index, but their creation code could set their appropriate subimage (top left is 0, then going left to right, 1, 2, 3, etc. ) and be sure to set image_speed to 0.

Not sure if that's any easier or not but it'd do it.
 
T

TheJJGamer

Guest
You can import the whole thing as one sprite with each tile a subimage.


Each block would be assigned the same sprite index, but their creation code could set their appropriate subimage (top left is 0, then going left to right, 1, 2, 3, etc. ) and be sure to set image_speed to 0.

Not sure if that's any easier or not but it'd do it.
That's what I'm currently doing, but with the game I'm currently creating it's causing a lot of issues. Like if I change an sprite's index, it screws up a chain of events. This is why I could use a sprite sheet, so I could just map the images to a position on the sprite sheet so if I ever change a sprite's position on the sheet it wouldn't affect any other sprites.

I don't know if you understand as I'm not very good at explaining things, so in a nutshell; it's causing issues. :p
 
Last edited by a moderator:
S

Silver_Mantis

Guest
That's what I'm currently doing, but with the game I'm currently creating it's causing a lot of issues. Like if I change an sprite's index, it screws up a chain of events.
What exactly are the issues you are having?
I honestly think it might be easier for you to take the traditional route of making sprites for each object in your game. It's fairly simple and will keep you organized as well! :)
A place for everything, with everything in it's place, is how I see it. ;)
 
T

TheJJGamer

Guest
What exactly are the issues you are having?
I honestly think it might be easier for you to take the traditional route of making sprites for each object in your game. It's fairly simple and will keep you organized as well! :)
A place for everything, with everything in it's place, is how I see it. ;)
Yeah, I assume I'm going to have to make seperate sprites for each object. That quote is exactly what I'm trying to do. :p
My isues are mostly consisting of index's of sprites being called as if they were the id's of the objects. It was a stupid thing for me to do, I know, but I stated calling the image_index's as if they were item id's which started causing many issues when I changed some index's around. It's kinda complicated to explain what I did, sorry.
 
S

Silver_Mantis

Guest
Yeah, I assume I'm going to have to make seperate sprites for each object. That quote is exactly what I'm trying to do. :p
My isues are mostly consisting of index's of sprites being called as if they were the id's of the objects. It was a stupid thing for me to do, I know, but I stated calling the image_index's as if they were item id's which started causing many issues when I changed some index's around. It's kinda complicated to explain what I did, sorry.
Well it's definitely not a stupid idea my friend. Depending on how many images you actually need, you could name each one "spr_1" "spr_2" "spr_3" and so on, and then use sprite_index (instead of image index) to change the objects sprite.
So if water is "spr_1" and you need a water texture for your object, in your Create Event set the sprite_index to that sprite. ( sprite_index = spr_1; )
 
T

TheJJGamer

Guest
Well it's definitely not a stupid idea my friend. Depending on how many images you actually need, you could name each one "spr_1" "spr_2" "spr_3" and so on, and then use sprite_index (instead of image index) to change the objects sprite.
So if water is "spr_1" and you need a water texture for your object, in your Create Event set the sprite_index to that sprite. ( sprite_index = spr_1; )
Yeah, I think I'm going to have to do this. Thanks for your help! :)
 
Top