Help with scrolling array of rectangles

Hi,

I have a 2 dimensional array of rectangles lets say 50x50 that I want to move all at once. What I have done is put each rectangle into a display group and then move the display group. the problem is the performance hit is to great I go from 60 fps to 10 every time I move the display group. is there a better way to do this?

Can you post your code? I can’t think how the performance would be so bad - I’ve done much heavier stuff and it’s been fine.

Hey, I took a look through my code and found out my problem runs much better now. The new issue is when I add physics to each rectangle the game is slow. I don’t know any other way to do what I need without adding physics. I am making a gem digging game so basically each rectangle is a dirt block. As the player you destroy these and get gold or whatever. Is there a better way of doing this?

heres a hint as to how to do it without physics

its same concept except your grid will be set up for example 0 = path, 1 = dirt, 2 = gem …

http://forums.coronalabs.com/topic/37232-need-help/

Can you post your code? I can’t think how the performance would be so bad - I’ve done much heavier stuff and it’s been fine.

Hey, I took a look through my code and found out my problem runs much better now. The new issue is when I add physics to each rectangle the game is slow. I don’t know any other way to do what I need without adding physics. I am making a gem digging game so basically each rectangle is a dirt block. As the player you destroy these and get gold or whatever. Is there a better way of doing this?

heres a hint as to how to do it without physics

its same concept except your grid will be set up for example 0 = path, 1 = dirt, 2 = gem …

http://forums.coronalabs.com/topic/37232-need-help/