I need an editor to plot a polygon over the texture for of a ship in my game.

It would look like this..
Where the red is the collision outline and the image is the texture.
enter image description here

I want to store the polygon like texture coordinates eg top left is (0, 0) and bottom right is (1, 1).

Are there any tools (free) that does something similar to this, I'll be working with xna and C#.

  • \$\begingroup\$ I'm not sure what you are asking, but, can't you draw a polygon on top of an entity image with MS Paint? \$\endgroup\$ – pek Sep 13 '11 at 4:37
  • 2
    \$\begingroup\$ @pek, He's looking to have the red lines stored as meta-data so that he can use them to detect collisions more accurately. He doesn't actually want a red line. \$\endgroup\$ – John McDonald Sep 13 '11 at 21:15

On OS X, you can use PhysicsEditor. It is a tool for Box2D or Chimpmunk but there is a txt export for your need. The main difficulty is to find a mac.

Note: there is a windows version too. But i didn't use it. Try it and add a comment if it is useful.

| improve this answer | |
  • \$\begingroup\$ Yeah, it needs to run on windows \$\endgroup\$ – Daniel Little Sep 13 '11 at 22:37
  • \$\begingroup\$ Physics editor is available for windows now. physicseditor.de \$\endgroup\$ – user10107 Sep 24 '11 at 23:21

InkScape is a good choice for vectorial images.

  • Size your document to 1m x 1m...
  • Add the bitmap...
  • Draw the polyline...
  • Save as .svg or .xaml document... whose are text based...
  • Develop a light parser to load the data
| improve this answer | |
  • \$\begingroup\$ +1 Google Docs also provides a simple vector-based drawing tool that can also be exported to SVG, and I think this an easy solution. \$\endgroup\$ – John McDonald Sep 13 '11 at 21:12

While a tool like PhysicsEditor (see Ellis answer) is certainly better, the poor mans choice would be to use an HTML-image-map editor. The coordinates for image-maps are in pixels, but you could simply divide these by image-height or image-width respectively to get coordinates in the 0..1 range.

Here's an online-tool to draw such image-maps, and here's another one.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.