thanks but i already solved it for my way of use
1 Like
Do this once:
interesting = new IntList(0, 3, 4, 9);
and later,
interesting.hasValue(terrainBase[playerxpos+ix-1][playerypos+iy])
1 Like
Like here I guess
if( interesting.hasValue(terrainBase[playerxpos+ix-1][playerypos+iy]) ) {
}
Itโs indeed wise not to convert int to string
Itโs costly for the processor of the computer
is this giant? because i ran it on a 15 yo laptop and its fine.
1 Like
i mean i probaly will use the string method i used, but if its a great performance boost, ill change it.
When it runs fine so be it. Then you donโt have to change your code.
Just remember that this could be a possible cause when your program might lag in the future.
Especially when you have multiple non optimal spots in your code.
Those might add up.