Topic

So, I wrote a little app...

I've been poking around with the API and wrote myself an app. It's small and imperfectly formed, and doesn't really do a great deal (it was really just an excuse to play around with things), but I thought I'd tell you about it anyway.

So, you've probably got a bunch of bags in your inventory, and bigger bags, and toolboxes, and if you're anything like me, you put things in those bags and boxes and then immediately forget where you put them. So, I wrote something to rummage through them all for you and show where things are hiding.

Screenshot: farm6.static.flickr.com/525...

It was just put together over a couple of spare evenings, and so is a little clunky and not exactly highly polished (hey, I'm a programmer, not a designer), but it works.

I'd quite like to share this with folks so you can have a play, but given the alpha status of the game and the not-really-public-yet status of the API, I thought I'd better check with staff whether or not that would be OK.

Some technical notes:

OAuth isn't available to us yet so you need to pass the app a valid oauth_token to enable it to work. The easiest way to get one is from the API explorer. Obviously, you'll need to be a registered player with access to the alpha for any of this to work.

It's a client-side app, written in Javascript. The oauth_token isn't passed on to any servers (other than back the Glitch servers).

So, staff, waddyathink?

Posted 23 months ago by dopiaza Subscriber! | Permalink

Replies

  • its probably ok if you publish it privately
    Posted 23 months ago by Alex Subscriber! | Permalink
  • that is great, I want one now!!!
    Posted 23 months ago by Cassandria Subscriber! | Permalink
  • Yay! Great work dopiaza, gimme gimme gimme!
    Posted 23 months ago by Hburger Subscriber! | Permalink
  • Yup. This looks like a useful app. I seem to spend too much trying to remember which bag I put which object in. :)
    Posted 23 months ago by bluto Subscriber! | Permalink
  • clever clogs :)
    Posted 23 months ago by Misha Subscriber! | Permalink
  • Looks like it would be very handy!
    Posted 23 months ago by PittyPat is sad Subscriber! | Permalink
  • oooh
    Posted 23 months ago by shhexy corin Subscriber! | Permalink
  • Well, no word from Staff (tsk, anyone would think they wanted weekends off or something), so I'll take that as representing no major objections. I have however password protected everything, so it will be hard for other folk to stumble into this.

    So, instructions: You can go directly to the app at:

    www.dopiaza.org/glitch/

    To keep this away from prying eyes, I've added another layer of protection. You will be prompted for a login here. The username is 'glitch' and the password is 'nibbleapiggy'.

    Currently, Glitch haven't opened up the part of the API that allows third-party apps to authenticate, so we need to cheat a little here. You will need to manually provide the app with a token that authenticates you with the Glitch servers. Luckily, this is pretty easy to get. Go here:

    api.alpha.glitch.com/explore/

    Select /simple/auth.check in the drop-down, and make sure the "Include authentication token" box is checked. Click 'Test'.

    You will see some output that says:

    /simple/auth.check?oauth_token=xxxxxxxxxxxxxxxxxxxxxxxxx

    where xxxxxxxxxxxxxxxxxxxxxx is a long string of letters and numbers. Copy this string of characters (everything after the '='). This is your token. Keep it secret. Do not share it with anybody.

    Now, back to my Glitch app. Paste the token into the text box labelled 'Token' and press 'Go'. You should see your character appear. Don't worry, my app doesn't store your token or send it on to anybody (other than back to Glitch as part of its API calls).

    And that's it. I hope you enjoy it.

    Note: I've currently only checked this out in Firefox and Safari. I can't vouch for other browsers right now, but feel free to try. IE6 will probably suck though.

    Staff: I hope you're cool with me putting this up. If you don't want it to be out there though, just let me know and I'll take it down.

    [Edit: update instructions to reflect that Wordpress registration is no longer necessary]
    Posted 23 months ago by dopiaza Subscriber! | Permalink
  • Yay! This is great dopiaza!
    Posted 23 months ago by Hburger Subscriber! | Permalink
  • Oh, OK. I misunderstood how Wordpress private pages work. I've made it public now (still password protected though). I'll use alternative means to hide it from the menus...

    Please try again. Wordpress registration now no longer required.
    Posted 23 months ago by dopiaza Subscriber! | Permalink
  • This is working fine for me, even with the game down. It would be nice to use it to rearrange my items in some way but that's a further stage and would require write access to the database. Perhaps when the API goes public.

    In the meantime. Cool :)
    Posted 23 months ago by bluto Subscriber! | Permalink
  • Actually, if I partly enter an item name and then choose a particular item from the drop-down, the box to the right of me shows all the items that matched the part-name. I would expect to see the drop-down item only. Also the description of a item that pops up, the tool-tip, seems to hang around for a bit more than I'd like.

    I like the bottom display. Much faster than glitch at showing what I've got!
    Posted 23 months ago by bluto Subscriber! | Permalink
  • " the box to the right of me shows all the items that matched the part-name"

    That was happening when you used the mouse rather than the keyboard to select. Should now be fixed.

    "the description of a item that pops up"

    Yes, there was some general weirdness there. I've done a little tidying up and hopefully that's better now.

    "Much faster than glitch at showing what I've got"

    I suspect Glitch checks back with the servers when you open a bag to ensure you're shown an up-to-date set of items. I just cache the contents - you'd need to refresh the page to reflect any changes made if you tried this while the game was running.
    Posted 23 months ago by dopiaza Subscriber! | Permalink
  • I still have to select with the mouse AND press enter. I'm on Chrome/Windows 7 btw.

    And to annoy you a little bit further the tool-tip is disappearing way too fast now. :)
    Posted 23 months ago by bluto Subscriber! | Permalink
  • "Chrome/Windows 7"

    Hmm, just tried it in that environment and can't reproduce...

    " disappearing way too fast now."

    It should disappear on mouse move. You probably just need a drop of hooch to steady your hand :-)
    Posted 23 months ago by dopiaza Subscriber! | Permalink
  • lol. Seriously though it is very useful :)
    Posted 23 months ago by bluto Subscriber! | Permalink
  • the search interface works very well, but i think the browse interface would be a bit better if the interface could be the full width of the bowser viewport, to make scroll clicking unnecessary.

    i'd also kill to have an interface where all of the bags were displayed in open position on one page.
    Posted 23 months ago by striatic Subscriber! | Permalink
  • Nice! So very useful.
    Posted 23 months ago by ping Subscriber! | Permalink
  • This is awesome. And seeing as Stoot didn't comment, I guess it's ok
    Posted 23 months ago by Edward Subscriber! | Permalink
  • It's OK!

    (I have a design for a find-as-you-type inventory management UI sitting around which I hope will one day get in to the client, but I don't think it'll be any time soon.)
    Posted 23 months ago by stoot barfield Subscriber! | Permalink
  • Thanks Stoot!

    I've just rolled out an update - the main change is some de-clunkifying of the interface.

    @striatic asked for something "to make scroll clicking unnecessary", so I've squooshed things down a little, and everything should now fit with no scrolling needed. I've also (hopefully) sorted out the erratic behaviour of the return key in the search box.

    New screenshot: farm6.static.flickr.com/513...

    @stri also said "i'd also kill to have an interface where all of the bags were displayed in open position on one page." Well, that should be simple enough. I'll try to get something together before the next big test.
    Posted 23 months ago by dopiaza Subscriber! | Permalink
  • finally downloaded this. Tres sweet, @dopiaza. Thank you!
    Posted 23 months ago by Mac Rapalicious Subscriber! | Permalink
  • looks really slick with the changes.

    for ease of use, i think a link to the page where you get the token and instructions on how to get a token should go underneath the field where you enter the token.

    basically the instructions from you comment here, underneath the field there.
    Posted 23 months ago by striatic Subscriber! | Permalink
  • Good idea. I've added the instructions to the page at www.dopiaza.org/glitch/wher...

    I've also now removed the password protection on the page. I figured that since the restriction on screenshots has now been lifted, the Wiki has been published, and the API documentation is publicly visible even when signed out, then having this app page visible isn't really such a big deal. In any case, you can't actually do anything with it unless you're signed into Glitch...

    As always, if staff think otherwise, then let me know and I'll lock it down again.
    Posted 23 months ago by dopiaza Subscriber! | Permalink