Hi, my game was working perfectly on PC using very few resources but after starting an Android project and copying over everything to that, the game lags horribly.
I have a list of vector2s and every second or so it generates 100 vector2s and puts them into the list, every every time it hits 1200 vector2s, I get rid of 200 of them because I don’t need them anymore. And I have 2 instances of this class so 2 lists like that in total.
I’m thinking this is the problem but I’m not sure how to optimize this and I also wanted to know if there’s a tool that could allow me to determine what’s causing the lag? I tried android device monitor but wasn’t able to do much with it.
Other than the list thing, I do some bad things like using toString() on an int every update so I can DrawString() it and calling a small interpolation function inside a draw call. Not sure if those would really cause the game to drop to like 20 fps.