Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How should I implement sketch.js in sugarcube 1?

edited July 2015 in Help! with 1.x
I am horrible at programming, but I thought I'd ask whether anyone else has experience doing something like this in a twine game. I searched for this to no real success. It's pretty simple really. I want a basic drawing system in my twine game with the output stored in some way inside the twine save file.

If you think I would be better off switching to another story format, or to twine 2, just keep in mind that I do need to have a save system.

Thanks.

Comments

  • You want to store drawings inside saves? What does Sketch.js generate (which would be going into the saves)? Because that's going to affect your storage requirements (and Web Storage is tight). Also, which Sketch.js are we talking about (a cursory Google turned up at least two unrelated, but vaguely similar, projects)?
  • I think that's p5, right? It looks interesting... has a physics engine and everything. If that's the one you mean, I'd be down to collaborate... said the blind guy leading the blind. I also know not much about it... but I have seen the tutorials they have up.

    PS, If that IS the one... you add it to your Story JavaScript page
  • I don't believe it's related to P5 (p5?) (otherwise I'd have just pointed Taylor at the P5 thread we just had).
  • I guess I assumed Taylor either didn't search... or didn't know what to search for because I don't think PhoenixPerry referenced the Sketch.js

    Could be wrong.

    Believe me... I know you know.
  • hi, sorry. I did mean the drawing thing, yeah. just a super simple drawing app. it would just be a 2 bit bmp or png in pure black & white. And I had no idea about p5 or whatever, but that looks interesting. I just searched for things badly I guess. Sorry. I did try.
  • You didn't specify which Sketch.js you're using. I assume this one?

    It may be possible, depending on Sketch.js and how you're using it, to save a description of the steps required to create these images (if you're letting it do most of the work) which might save space. Otherwise, you're probably going to have to save the final raster images (bitmap or png as you noted) and saving raster images is likely not going to end well, unless you're only going to be saving very few of them and they're small.

    The basic issue is that saves are stored within Web Storage, and you cannot rely on there being more than about 5 MiB of that available (of which only half, 2.5 MiB, is generally usable), with less being a very real possibility. Since everything that goes into a save has to fit within that limit, hopefully you can see the issue with stuffing raster images into it.

    Twine 1 vs. 2 is irrelevant to this problem and, AFAIK, this will be an issue for all story formats, so switching won't help you either.
Sign In or Register to comment.