The program is supposed to read the pixel color values from an image, and use that data as a map for where to place objects in a game world.
Getting the color values was easy enough:
import numpy from PIL import Image img = Image.open("colors.png") data = numpy.array(img)
The color value should be used to choose a type of object, and the data[ ] index values translated as coordinates to choose where on a surface the object is placed. It's not clear to me how to go about implementing this, I'm still trying to learn python.
I need help with understanding how to structure a system which goes through all the values of the data[ ] array, and creates a map based off of those values. For example, data[0,0] is a red pixel, therefore make an instance of object_type_1 and place it in the top left corner of the screen surface, data[0,1] is a blue pixel, make an instance of object_type_2 and place it 20 pixels to the right of the first object.