Jump to content

How to use player custom-drawn sprite as in-game sprite


The_dude8080
 Share

Recommended Posts

Greetings. I am seeking for a way that allows players to draw their own characters and later to be able to play with them in-game. To make the concept very simple lets make the drawn player just a 2d shape or a group of lines and circles or even a mix of both. I think this can be decomposed in these steps:

  1. An empty canvas is made for the user to create what he wants: 
    1.  By painting or something of that genre;
    2.  By using a specific polygon creation interface that allows dragging and molding shapes;
    • Note: I was able to create a way to paint on canvas but I didn't find a way to let user drag and create shapes or something of that kind. I would more likely opt for the second option so some suggestions on how do this would be really appreciated.
  2. Somehow, I only get the user drawn / shaped creation from all the canvas. There should be a way to "surround" what the user has created and then save it:
    1.  By (in the drawing case probably) checking only for the color comparison between the white and the player color;
    2.  By, somehow, defining different points that all together would countain the user creation (either drawn or shaped);
    • Note: In this case I am kind of lost. I have almost no clue of how this could be made. However, I have heard of box2d but I think it was more focused in C or something of that kind? Would it work and how could I do it?
  3. I would finally have the user creation stored and ready to load it in game as an image of a sprite.

I hope I could explain it all correctly. Can someone give me some orientation on this?

 

Link to comment
Share on other sites

Hello.

Have you considered using something like http://literallycanvas.com/ or some other javascript paint-thingamathing in your project? It seems to have pretty nice features and apparently has a way to save / export the images created. Might be worth looking into, i don't know how hard it would be to get it working with phaser. I'd guess it can't be that difficult? Maybe it is, but just an idea. :)

Link to comment
Share on other sites

1 hour ago, lihis said:

Hello.

Have you considered using something like http://literallycanvas.com/ or some other javascript paint-thingamathing in your project? It seems to have pretty nice features and apparently has a way to save / export the images created. Might be worth looking into, i don't know how hard it would be to get it working with phaser. I'd guess it can't be that difficult? Maybe it is, but just an idea. :)

Not a bad idea at all :P Thank you very much

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...