Well it depends a little on if you have a consistant flat platform for your level or if it's somewhat like mario or something with platforms at various heights.
if you just have a flat consistant platform for your level then just use a for loop to draw it out.
int i;
for(i=1; i<50; i++){
sprite(i, i*SpriteWidth, PlatformHeight, ImgageNum);
}
now for a more complex multi-platform type level you will need to set up an array with your level data then use 2 for loops to generate the level. You can have 0=nothing and 1=platform.
LevelData[50][50];
int x, y = 0;
int i = 1;
for(y=0; y<50; y++){
for(x=0; x<50; x++){
if(LevelData[x][y]==1){ sprite(i, x*SpriteWidth, y*SpriteHeight, ImageNum); i++; }
}
}
I dont use the sprite commands so I know that isnt the correct way to use sprites, but it may give you a better idea of how to go about this. It can also be optimized better to only draw what is on the screen instead of the entire level. Hopes this helps you out some.