Skip to main content
Clearer title, some grammar fixes and some useful tags.
Source Link
Anko
  • 13.5k
  • 10
  • 56
  • 82

pixel How do I convert an image tointo a tile map?

I am working on a game in pygamePygame/pythonPython, and I am wondering who has the know how to show meI'd like to turn an image into a map.

The idea is simple. The: Pixels in the image isare colored by tile type. When the program loads the image, I want the color (examplee.g. #ff13ae) #ff13ae to be matched to a certain grass tile, and the color (examplee.g. #ff13bd) #ff13bd to a different tile. Now, 

I know that I may very well have to convert from hexcodes to rgbRGB, but that is trivial. I just want to know the way I wouldto go about thisloading an image file, mainly because all my other games don't do anything of this sort.

pixel image to tile map

I am working on a game in pygame/python, and I am wondering who has the know how to show me to turn an image into a map.

The idea is simple. The image is colored by tile type. When the program loads the image, I want the color (example) #ff13ae to be matched to a certain grass tile, and the color (example) #ff13bd to a different tile. Now, I know that I may very well have to convert from hexcodes to rgb, but that is trivial. I just want to know the way I would go about this, mainly because all my other games don't do anything of this sort.

How do I convert an image into a tile map?

I am working on a game in Pygame/Python, and I'd like to turn an image into a map.

The idea is simple: Pixels in the image are colored by tile type. When the program loads the image, I want the color (e.g. #ff13ae) to be matched to a certain grass tile, and the color (e.g. #ff13bd) to a different tile. 

I know that I may have to convert from hexcodes to RGB, but that is trivial. I just want to know the way I to go about loading an image file, mainly because all my other games don't do anything of this sort.

Source Link
robinspi
  • 23
  • 1
  • 4

pixel image to tile map

I am working on a game in pygame/python, and I am wondering who has the know how to show me to turn an image into a map.

The idea is simple. The image is colored by tile type. When the program loads the image, I want the color (example) #ff13ae to be matched to a certain grass tile, and the color (example) #ff13bd to a different tile. Now, I know that I may very well have to convert from hexcodes to rgb, but that is trivial. I just want to know the way I would go about this, mainly because all my other games don't do anything of this sort.