Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Thanks for the suggestions.

  • The script editor has "Go to Deck" / "Go to Card" menu items which don't presently have a keyboard shortcut; adding shortcuts would be very simple and at least get you a two-keystroke path to what you want. Any preferences?
  • I'll give a file-filtering hint for read[] some thought, but it might be tricky to make portable; Browsers (notionally) want filters based on MIME types- which often don't exist or aren't well-recognized for binary formats, and at best this information is a vague suggestion that they may ignore entirely. I've observed very inconsistent behavior for both MIME and extension-based filters, especially on mobile browsers.
  • I don't see a way of supplying filenames as a result from read[] without breaking its contract, and in turn many existing decks. It also poses some potential portability issues; on mobile browsers, for example, importing an image may allow a user to take a photo from their phone's camera instead of choosing an image from the local filesystem. I can see how this could be useful, but I'm hesitant to make the breaking change.
  • Returning an empty array on canceling a read[] of a binary file is consistent with returning an empty image on canceling a read[] of an image. This design hasn't been re-examined since the introduction of nil as a new option for in-band signaling, though. I'll give this some thought, too.
(+1)

As far as I can see, ^d is not being used for anything, so if that could be “Go to Deck” (and especially if ^e could be “Go to Card” even in the script editor), that would be very handy.

I figured there’d be a Good Reason (probably browser-based) why read[] works the way it does, I just couldn’t guess what it might be. Apparently file extensions also count as Unique File Type Specifiers, but I do not doubt it’s a mess on mobile browsers. I guess this is just a nice-to-have, since even filename extensions can lie.

As for returning a name, I guess the hacky thing would be to give the Array interface a .name property that’s normally nil but can be assigned any string value, and have the read[] builtin try to set it before returning the result. A binary-data array isn’t necessarily a file, though, and it doesn’t make a whole lot of sense for it to have a .name property otherwise.

(+1)

Added those shortcuts: https://github.com/JohnEarnest/Decker/commit/c9d1b8076db54b857c57860e3440a08221b291c1

(+1)

Thanks!