Re: 2d map system: Request comments!
- Posted by Einar Mogen <nord.staernes at ROLLAG.MAIL.TELIA.COM> Aug 06, 1997
- 780 views
Well, since you talk about 2D maps, I thought I could send a little improved version of the map-generator I sent before. Comments, ideas, improvements anyone? Nobody said anything about my last attempt, so I guess you didn't like it. Einar Mogen -----------------------------LAND GENERATOR------------------------------- include image.e sequence landmass sequence colors integer col,row,area object junk global function world_gen() area=10 junk=graphics_mode(19) landmass=repeat(repeat(0,320),200) for tl=1 to 30 do row=rand(200) col=rand(320) for t=1 to 2500/area do for mm=1 to area do landmass[row][col]=landmass[row][col]+1 if landmass[row][col]>8 then landmass[row][col]=3 end if row=row+rand(3)-2 col=col+rand(3)-2 if row=0 then row=200 elsif row=201 then row=1 end if if col=0 then col=320 elsif col=321 then col=1 end if end for end for end for for tl=1 to 200 do for t=1 to 320 do if landmass[tl][t] then landmass[tl][t]=colors[landmass[tl][t]] else landmass[tl][t]=BLUE end if end for end for return landmass end function if graphics_mode(19) then end if display_image({0,0},world_gen())