Drawing App

nickquest

  • Posts: 60
Does anyone here think it's possible to create a flash drawing app with stencyl? What I actually want to do is a bit more complex than that, but I'd first need to know if creating a simple browser based drawing app is a doable task. It seems to me like it should be.

I found this example. http://www.stencyl.com/game/play/3121 has anyone used this code or similar for a more complete drawing app?

« Last Edit: August 28, 2014, 09:35:17 pm by nickquest »

irock

  • *
  • Posts: 2891
Yeah. Just use the image API.

nickquest

  • Posts: 60
I'm looking at it now, thanks.

What I would like to make is a drawing web app to allow users to draw individual inbetween frames of an animation. I want to be able to draw key frames ahead of time and have the app show two of them on screen at once at 50% opacity so the user can draw a new image over top, using them as guides. Then when they are done, press a button and save the image to become a new key frame to be served at 50% opacity to them or another user.

Does this seem possible? Here is a list of some things I would like it to do.
1. load images from a server (might get around this by just putting the images directly into the app and updating it as needed)
2. Save new generated images. (they could also just be saved within the app if that is easier) but I need to be able to get them out.
3. Unique user session to keep multiple people from working from the same images.

I realize request 3 might be difficult. Any thoughts?

« Last Edit: August 29, 2014, 11:12:24 am by nickquest »

irock

  • *
  • Posts: 2891
I'm not sure about the saving and loading images aspect. Maybe a smart person will know.

nickquest

  • Posts: 60
According to the image API loading seems doable, but not sure about saving new images. I've started playing with basic drawing blocks, but I don't understand how to make the lines persistent.  I can generate a mark when pressing the mouse, but it disappears when I move or let up.

Jon

  • *
  • Posts: 17524
I don't think you can use "current screen as image" as a drawable canvas. It's best if you make a blank image the size of the screen, attach it to the top of the screen and continually draw to that.

nickquest

  • Posts: 60
I don't think you can use "current screen as image" as a drawable canvas. It's best if you make a blank image the size of the screen, attach it to the top of the screen and continually draw to that.
I tried what you suggested and I also tried to draw to an image in an actor. Neither worked any better. I also tried the suggestions at this thread to no avail. http://community.stencyl.com/index.php/topic,1137.0.html I copied the code exactly with lists and number variables, but it didn't draw anything. I've included a link to my current swf http://nickquest.com/draw%20test.swf and the screenshot of the code. I took away the (If) and (Batch Draw) and neither seemed to make a difference for better or worse. The code is almost nothing now but one line stays put at least until I draw another instead of disappearing as soon as I let off the mouse. Though it is still just a straight line between the click and release of the mouse. Does anyone have any thoughts on this? It seems like it is almost doing it, and with so few blocks. There must be a simple solution to stop the line from disappearing.

rob1221

  • *
  • Posts: 9473
Those blocks are not part of the image API, only the ones under Sound & Images.  There is no line drawing for the image API, so you need to use pixels or shapes.

nickquest

  • Posts: 60
Hmm, that does make things a bit clearer. Does this example then not use the image api? It does seem like a line tool, only it doesn't disappear. http://www.stencyl.com/game/play/3121

rob1221

  • *
  • Posts: 9473
That example was made long before the image API, and I don't know exactly what code was used.

nickquest

  • Posts: 60
Okay, thanks. I will keep tinkering. :)