[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Smooth Scaling for Terrain Generation



kschnee@xxxxxxxxxx wrote:
 Is
there a way to get a smoothly scaled-up image? That is, if "s" is sand and
"w" water:

www
wss
sss

I don't want the above data to turn into 10x10 blocks of sand and water,
but some kind of smooth diagonal.

You want the scale2x algorithm and its friends: http://scale2x.sourceforge.net/ If you can save your map in a palettized image format, you can use pygame's built-in scale2x function to do the hard work.

Alex.