Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTheVirtualDragon

Posted 20 August 2012 - 01:43 PM

Also, I had this other idea:

1. Use Gimp / Inkscape as a level editor and save the level as a png file
2. Use The Python Imaging Library to load the image and iterate through it
3. Compare each 50x50 portion of the file to the tiles in a tile set.
4. If a the images are the same (if the 50x50 area of the level is, for example, a grass tile) then write to a .json file (or something similar) which will be used to store data about the level.

This method isn't that useful for graphics, but if you are using something like Box2D, then you can easily save where the bodies are and where the collisions will happen, just by looking at a tile map.

So would this be a good way to do things?

#1TheVirtualDragon

Posted 20 August 2012 - 01:41 PM

Also, I had this other idea:

1. Use Gimp / Inkscape as a level editor and save the level as a png file
2. Use The Python Imaging Library to load the image and iterate through it
3. Compare each 50x50 portion of the file to the tiles in a tile set.
4. If a the images are the same, write to a .json file which will be used to store data about the level.

This method isn't that useful for graphics, but if you are using something like Box2D, then you can easily save where the bodies are and where the collisions will happen, just by looking at a tile map.

So would this be a good way to do things?

PARTNERS