I have a 2d randomly genrated map for a platformer made of block(squares 40 by 40) stored in an array of 30, i have a push function to move the blocks around push changes the xpos aswell as the position on the array i'm only ever drawing the 5-25 position on the array.
When i move i'll only be moving the character within the first half of the screen. so there is collision between the middle part and the 0xpos of the screen now the problem i'm having is moving the blocks .
I cant think of a way to move them so it looks natural. Any ideas on how to do it? so far i have it so that every time the character collides with one side of the screen equivilant to 40 pixels worth of velocity it pushes a block and randomly genorates another.