I have been working on a game right now called 'Word Memory Game' (Work in progress) and I have realised that it quickly becomes laggy after a few successive words.
Start/restart the game with Space and click on the left if it's the first time the game has shown the word, otherwise click on the right. Repeat until you lose.
I believe a large portion of the lag comes from how I verify if the word has appeared before. I keep a list of all words that appear in the game in order. Then, when I need to check if it's the first time the current word has appeared, I compare the Index of the word in the list and the total length of the list. If they are the same the word has only appeared once. Does anyone know a more efficient way to do this?
Sure, do the check before you add the word to the list, and then you can use the CONTAINS block. It'll still slow down a little as the list grows, but not very much, unless you get a player who can remember thousands of words!
Yep. I personally like using primitives better (unless it is absolutely necessary ∨ I don't understand all of the inputs and the libraries help me utilize them better) because you have all of the library functions and more at your fingertips. That doesn't mean anyone else has to, I just think checking a box is easier than loading every library your project uses.