Bee
Member
Hi all,
I have a matching game (kinda like match 3) and it works well. However, over time the game slows down. I've done some debugging and refactored a tonne of code, but it still happens. Later on, but it happens.
The matching creates and destroys a lot of lists, for every entry on the board. I was wondering if maybe creating global lists at the beginning of the game then filling and clearing them repeatedly during gameplay would be less resource heavy?
Also, some questions:
If I declare a var match_list = scr_create_match_list in a script, that match_list needs to be destroyed at the end of the script, right?
And if I do return match_list then ds_list_destroy(match_list), does the destroy run even after returning the value?
Thanks all!
I have a matching game (kinda like match 3) and it works well. However, over time the game slows down. I've done some debugging and refactored a tonne of code, but it still happens. Later on, but it happens.
The matching creates and destroys a lot of lists, for every entry on the board. I was wondering if maybe creating global lists at the beginning of the game then filling and clearing them repeatedly during gameplay would be less resource heavy?
Also, some questions:
If I declare a var match_list = scr_create_match_list in a script, that match_list needs to be destroyed at the end of the script, right?
And if I do return match_list then ds_list_destroy(match_list), does the destroy run even after returning the value?
Thanks all!