how many if() and for() can i put inside my update() before I hit problems??
at the moment i am in the beginning of coding a tile/cell based game. and each time i run through my update i am checking every single tile if it has collided with each character/mouse and if its clicked and if another million things.
for instance
for (int x = 0; x < mapinfo.width; x++)
{
for (int y1 = 0; y1 < mapinfo.height; y1++)
{
Vector2(mapinfo.Rows[x].Columns[y1].Position.X, mapinfo.Rows[x].Columns[y1].Position.Y), null, Color.White, mapinfo.Rotation, new Vector2(0, 0), mapinfo.scale, SpriteEffects.None, 0.9f);
if (miner1.minerRec.Intersects(mapinfo.Rows[x].Columns[y1].Cellrec) && mapinfo.Rows[x].Columns[y1].passable == false)
{
miner1.standing = true;
}
if (lClicked == true && mouse.clickRectangle.Intersects(mapinfo.Rows[x].Columns[y1].Cellrec))
{
mapinfo.Rows[x].Columns[y1].highLighted = true;
}
if (lHeld == true && mouse.clickRectangle.Intersects(mapinfo.Rows[x].Columns[y1].Cellrec))
{
mapinfo.Rows[x].Columns[y1].highLighted = true;
}
these if's and for's are only the beginning and i can see it becoming a problem later on, is that the case?im sure im going about it the wrong way but i dont know better yet?
any advice is welcome






