Right now I have one object for the small card, changing it's sprite according to the sprite value listed in a ds_list deck. I then have a script in the step event that changes the big card's sprite depending on the sprite of the smaller one.
if position_meeting(mouse_x,mouse_y,self)
{
if sprite_index = spr_card1
obj_cardview.sprite_index = spv_card1Then the last 2 lines repeat for every card, changing each sprite from the small version (with the spr beginning) to the big version (with the spv beginning) It works flawless, but I worry once hundreds if not possibly thousands of cards are added that this code in the step event for the hand slots, and the cards on the field for both players will cause major lag due to all the checks that will have to be done each step.
My plan was to change the cards names where the small card is something like
"spr_card"
and the big card is something like
"bspr_card"
and then somehow program a script that would detect the current sprite_index, and change the big card to be that value with an added b in front so that it changes into the big card instead of the smaller one. Kind of like a "b+sprite_index" (I know that wouldn't work, it was just an example for those who may still not understand.)
Is something like this possible in Game Maker? Does anyone have any suggestions? Am I getting worried for nothing about my original code?
I'd love to hear some input.











