How about:
1. Calculating the level terrain at startup.
2. Store it as pixmap.
3. Only manipulate the pixels inside when needed.
4. Draw the pixmap once a loop for display.
1. Calculating the level terrain at startup.
2. Store it as pixmap.
3. Only manipulate the pixels inside when needed.
4. Draw the pixmap once a loop for display.