Howdy, Stranger!

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

beta 1.4 feedback

BortelsBortels Mod
edited April 2012 in Beta Posts: 1,557

The dropbox support with spritepack integration is genius. The integration couldn't be easier - I love it. This is going to open up a ton of possibilities.

I like the photo import too - but the size limitation is a bummer. I expect it's a sprite texture size limit - could we maybe in a future version either pick a region of an imported picture, or resize? It means, unless I'm mistaken, that I can't, say, take a picture and then import it (because it's too big). Hmm - maybe iphoto can crop, I'll look. (I like the concept of grabbing a photo, importing it, then using it as a game asset)

But - unless I am missing something, there's still no good way to share a project with a custom spritepack, unless maybe people make a zip file with the graphics and drop it into their dropbox. Which is I guess better than not being able to do it at all, eh?

I'll be experimenting with the image save/load today (caching images I grab on-the-fly from github as part of the project I'm working on).

The project's going slower than I had hoped because I got on the Diablo III beta, and there's monsters to be killed. :-)

«1

Comments

  • BortelsBortels Mod
    Posts: 1,557

    I see I spoke too soon - they resize. That's awesome!

  • BortelsBortels Mod
    Posts: 1,557

    Is there a cannonical way to tell if a given sprite exists?

    I'd like to grab graphic assets via http.get once (on first run, presumably), and save them to project storage. To do so, I need to be able to tell if a given sprite is already downloaded (ie. it's in the Project storage). I guess I could just keep a flag, but it strikes me as ugly.

  • BortelsBortels Mod
    Posts: 1,557

    Odd.

    i = image(100, 100)
    print(type(i))
    

    returns "userdata" - as expected.

    i = readImage("Project:Icon")
    print(type(i))
    

    returns "string". Seemingly always, even if the icon doesn't exist. (Project:Icon works, btw - yay!)

    But if I try to sprite() an image from readImage("Project:doesnotexist"), I get an error, which is kinda what I expect. I'm just surprised the readImage works, and doesn't return nil for a non-existent image. Am I missing something?

  • SimeonSimeon Admin Mod
    edited April 2012 Posts: 5,387

    Thanks for all the feedback, @Bortels!

    That is odd, about getting non-nil returns from readImage(). I'll look into it. I haven't given those functions my attention yet so they may still need some work.

    I believe there is a spriteList() function that I forgot to document. You can run it like this:

    sprites = spriteList( "Documents" )
    

    This will return a table/array of the sprites in the "Documents" pack.

    Edit: I think those functions, readImage, saveImage and spriteList are not retina-ready and so could have weird behaviour when @2x versions of sprites are hanging around.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    The sprite size limitation is mostly so people don't shoot themselves in the foot with regards to memory. I may double the size limit (to 2048 pixels) on iPad 3, as that has double the ram. But it will still be easy to abuse by importing and drawing your whole photo album.

  • BortelsBortels Mod
    Posts: 1,557

    spriteList works great - but not for "Project". You get "invalid sprite pack name", which makes sense, I guess.

    For now, for "Project", I'll just save a tag in project data that lets me know they're already fetched.

  • BortelsBortels Mod
    Posts: 1,557

    Hmm. saveImage("Project:Icon", image) works, because I can see the icon in the gallery.

    But something is going on for names other than "Icon" - If I load a known good image (because I can draw it with sprite()), then do saveImage("Project:" .. imagename), then try to readImage("Project:" .. imagename) - I get nothing.

    I'll see if I can make a subset of my project demonstrating this - if I can't, I'll just bundle the whole thing up, it's not really that big yet.

  • BortelsBortels Mod
    edited April 2012 Posts: 1,557

    Ok, confirmed:

    saveImage("Project:Icon") works in that it sets an icon you can see in the gallery - but loadImage("Project:Icon") comes up blank, no error.

    saveImage("Documents:Hello") then readImage("Documents:Hello") works. Interestingly, I do not see it in Apps/Codea on my Mac in dropbox, but I suspect maybe when I run the dropbox app I will? (Answer? NO! I don't see it in dropbox on my iPad, nor on the mac. Perhaps dropbox is import-only? Codea did make an Apps/Codea directory...)

    saveImage("Project:Hello") then readImage("Project:Hello") does not error, but loads no image.

  • Posts: 159

    I suspect you didn't see your Hello image in your Dropbox because you did "Documents:Hello", not "Dropbox:Hello" - I expect the former uses iTunes file sharing only?

  • BortelsBortels Mod
    Posts: 1,557

    I didn't realize that "Dropbox" and "Documents" weren't the same thing - what I get for skimming.

    Same results though - it works, in that I can save and read images, but they don't show up in my dropbox, even if I run the dropbox app (it shows nothing in Apps/Codea).

    Maybe I should just use "Documents" anyway - I'm only looking to cache. If I used a unique prefix ("Documents:appname-imagename"), it should be safe enough, and it should show up in the spritepicker as well, no?

  • BortelsBortels Mod
    Posts: 1,557

    More Odd. "Documents" works (Yay, I cache!), but the sprites don't show up in the "Documents" spritepack.

    Ah well - I can cache, that was my goal, time to move on.

    Worth noting - there's a "sync" button in the dropbox spritepack I missed. I pushed it, it makes a "Synching..." thing pop up that never seems to go away. So - there's that.

  • SimeonSimeon Admin Mod
    edited April 2012 Posts: 5,387

    Sounds like a bug with the sprite pack not re-loading until you restart Codea. I'll fix it in the next build.

    The Syncing never goes away? Even if you close and open the sprite picker? I'll have to look into that.

    (Once you link your Dropbox account the Apps/Codea folder will be created. If you try placing some files in there on your PC and syncing the Dropbox pack in Codea they should show up.)

  • Posts: 159

    FWIW, my Dropbox syncing seems to be working fine.

  • BortelsBortels Mod
    Posts: 1,557

    @frosty, when you saveImage() to Dropbox - does it show up in the Dropbox app and/or online? Maybe I'm simply expecting it to do something it doesn't? Is the Dropbox sync 2-way, or import only?

  • BortelsBortels Mod
    edited April 2012 Posts: 1,557

    @simeon - so you're saying the saveImage to Project: probably is working, but the project data isn't reloading until I run codea again? I can test that...

    No luck. SaveImage a known good image, exit codea, kill codea, run again with no saveImage, still nothing. I'm not getting Project:Icon either, even though it shows in the gallery.

  • BortelsBortels Mod
    Posts: 1,557

    So - should images I save in "Documents:" show up in the sprite picker? They do if I import them from iPhoto, but the don't from saveImage, even though the do work with readImage.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    @Bortels the Project saving is still a bit iffy. I'll be taking a look at it for build 3 most likely.

    Dropbox sync is two-way but you have to hit the "Sync" button to tell the data to go back to Dropbox. I could run Sync automatically when you go back to the editor. That might work. What do you think?

    Build 2 is up and should fix a lot of issues. Also adds a pretty neat new feature for getting images in (via the pasteboard).

  • SimeonSimeon Admin Mod
    Posts: 5,387

    That should be fixed now, you should be able to saveImage() and it will show up immediately in Documents when you go back to the editor. Let me know if you are still having issues with this in Build 2.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    Will address project saving issues in build 4. Build 3 is going out now to provision an extra device — it's not a feature update.

  • BortelsBortels Mod
    Posts: 1,557

    Images now showing up in Dropbox and documents, lovely. I also like the cut and paste!

    Project readImage now broken entirely, but I guess it was broken before, heh. I'll hold off on that until you say try again.

    Some way to tell if an image exists would be handy now that users can delete them - if readImage returned nil for a nonexistent image that would suffice. (I was keeping a flag in project storage, but that obviously won't update when someone munges the spritepack by hand)

    Ps this is all awesome. You should take volume of feedback as an indication of excitement, not that things are wrong. Between the spritepack improvements and http.get for images, we can now totally avoid the heinousness of having to encode/decode graphics and do a giant cut-paste - a tremendous stride forward!

    Btw, behind the scenes I've made use of http.get, including post mode and headers and so on - the lack of feedback there means its just working, which is neat. Some way to ignore a self-signed server cert would still be a good thing - I can't hit my own home server ssl because it uses a self-signed cert, and some other stuff I'd like to hit (f5 load balancers, it's a work thing) do the same.

  • BortelsBortels Mod
    Posts: 1,557

    So, the editor is crashing codea if you lean on the backspace. Duplicated the behavior in my project and a copy of Spritely. Sometimes it takes 1 line, sometimes a whole page. Tried it on the same code repeatedly, happens at different times. iPad 3. Tried hard-kill of codea, didn't help.

  • Posts: 2,161

    I get "An error ocurred authorizing your App. Please try again." when trying to link to dropbox. Any ideas?

  • BortelsBortels Mod
    Posts: 1,557

    Do you have the dropbox app installed? (I don't know if it's required - I had it installed, and it was painless)

  • SimeonSimeon Admin Mod
    Posts: 5,387

    @Andrew_Stacey I've looked into it and it seems only a limited number of users are allowed while the app is in "Development" mode. This is a Dropbox API restriction.

    A bit frustrating as it makes it difficult to test.

  • Posts: 2,161

    Shame about the Dropbox. Ah well, I'll have to remember to be quicker on the install next time.

    I just had a go with the new image stuff and successfully imported an image from my camera roll. That's fantastic. Of course, I want more! My test application was a simple 14-15 puzzle. It'd be nice to make it so that the user could select the picture from their camera roll. I was hoping that maybe spriteList("Documents") would give a list of stuff in the camera roll and I could simply iterate through this list, or maybe get the current selected image, but that doesn't seem possible yet.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    @Andrew_Stacey unfortunately iOS does not allow one to programatically iterate through the camera roll. You must use their standard interface (you'll notice that the sprite picker changes a bit when you enter the camera roll selection). This is for privacy reasons. The best we'll be able to do is to add a call like:

    showImagePicker( didPickImageFunction, didCancelFunction )
    

    Which could bring up a standard modal interface for the user to choose an image.

  • Posts: 2,161

    I would quite like that for a couple of projects. It would be quite fun to let the kids take a picture with the iPad and then do something silly with it, or make their own 14-15 game out of it.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    It's a very good suggestion. I don't think it will make 1.4 (unless I finish the other features early), but it could definitely be included down the track in the 1.4.x release set.

  • BortelsBortels Mod
    Posts: 1,557

    Alternatively - simply being able to grab the camera image on-the-fly would be awesome.

  • BortelsBortels Mod
    edited May 2012 Posts: 1,557

    Ok -I LIKE the just-drag-on-keyboard cursor movement. LOTS!!!

    It just feels so right.

    Had to send feedback. It's wonderful. Stunning how so small a thing can have such a big impact.

    I want it for this forum! :-)

  • BortelsBortels Mod
    Posts: 1,557

    I'd actually like to see the contents of the "math" key (with [] and > and so on) on their own row - I'm happy to give up the real-estate... Maybe tapping that key could toggle that row on and off?

  • Posts: 384

    I also like the new experiment with the cursor control. I think it is a step forward, but I wondered whether I was doing it right when I sometimes ran out of screen. For example the cursor was on the left edge of the screen and I wanted to go to the end of my line at the right edge. With the button being in the middle, I only got half way. What about using the acceleration of the swipe to increase the distance moved? Maybe I haven't got the hang of it but that was my first impression.

    What about making the cut copy paste menu pop up closer to the select button if you release it? Otherwise you have to put your finger over the words anyway.

    On another issue, I loved the image saving and loading, but I didn't get what the edit button allows me to do, it brought up white spots with a no entry sign, but I was expecting a traditional delete option.

    Once http stopped working until I quit Codea and relaunched.

    1.4 will be a great release, I think.

  • Posts: 2,161

    I'm getting to grips with the new stuff as well and liking what I can do. Nothing specific to say as yet.

    Oh, except @#($&Y^%!# to all the Americans and their spellings. I just spent ages debugging something only to find out that I'd written mymesh.colours = arrayOfColours.

  • BortelsBortels Mod
    Posts: 1,557

    our spelling?

    So far as I can tell, it's only the Brits who seem to have a surplus of "u"s and like to sprinkle them throughout the words... "colour", "armour", "queen"...

    In 'Merka, it's "color"

    In Brazil, from whence Lua comes, they speak Spanish, and it's "color"

    In Australia, where TLL lives, its "color, mate"

    I see a trend. Just sayin.

    Having said that, out of curiosity - does an iPad set with British english spell-correct "color" to "colour"? Maybe you just need to change its nationality. (mine is set to "English" and it autocorrects "colour" to color...)

  • Posts: 2,161

    Actually, Simeon said once before that he thought "colour" was correct but that Apple rejected it first time around (I made that last bit up).

    There's a spell checker on this thing? So I don't have to save everything to Dropbox, fire up the Linux machine, and run aspell on everything? Wow.

  • BortelsBortels Mod
    Posts: 1,557

    Yes. The spellchecker is what is responsible for hilarious incorrect word choices.

  • SimeonSimeon Admin Mod
    edited May 2012 Posts: 5,387

    @Andrew_Stacey I use colour here as well. (And favourite, neighbour, organise, etc.) But for coding it's best to stick to US spelling or things rapidly deteriorate.

    @Bortels actually we use British spelling here in Australia. I just stick to US spelling for the above reason. I don't mind either.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    By the way could anyone let me know if they get any accidental cursor movements while typing in the new beta (1.4 b6). This would be quite important, as I have submitted 1.4 to Apple but would consider rejecting it if the keyboard gestures cause these sorts of errors.

  • BortelsBortels Mod
    Posts: 1,557

    Ah, I was guessing on the Aussie spelling. Boo. Do drive on the wrong side too? :-)

    And I'm actually curious - does your iPad use American or British spelling? I was going to try it out for kicks, but "English" on my iPad at least is American English... It's odd they would have "Suomi" (whatever that is) but not "British English"

  • SimeonSimeon Admin Mod
    Posts: 5,387

    My keyboard is set to British English on iPad. (That was the default for me.) We drive on the left.

    Anyway let me know if there are any issues with the gestures. I hope there aren't as that means it will have to be resubmitted.

  • BortelsBortels Mod
    Posts: 1,557

    Weird. I don't even have that as an option. Is there another option for American English? Just curious.

  • Posts: 384

    Sorry @Bortels, we Aussies use the Queen's English... :) I'm afraid to say the iPad calls American English 'English'... I have now switched it to British English... ;) but my keyboard stays US!

  • BortelsBortels Mod
    edited May 2012 Posts: 1,557

    But I don't even have a "British English" option! No fair!

    Long ago, we had an Aussie exchange student stay with us for a few weeks. Most amusing. It sure didn't sound like the Queen's English... (I suspect he was hamming up the accent, just a bit - it's popular here. Instant cool, at least in college with a bunch of northern-european blonde chicks...)

  • Posts: 2,161

    Sadly, due to the influence of Neighbours and other such classics, British English is beginning to sound increasingly Australian.

    I'll keep an eye out for gesture bugs. I'm not sure I've figured out what all the gestures are - I'll read back through the announcements to see if I can figure it out.

  • SimeonSimeon Admin Mod
    edited May 2012 Posts: 5,387

    @Andrew_Stacey

    The gestures are: drag on the keyboard with one finger to move the caret. Drag while holding shift to select.

  • Posts: 159

    @Bortels My iPad keyboard is set to English (UK) :)

  • Posts: 384

    WordtoavoidVanillahyperlinkbug @Simeon, I've gotten the hang of the new cursor control with gestures, and have figured out how to get across the screen - a second swipe of course, like a mouse when you run out of table. This is ok. I like how you can initiate the gesture from the keyboard without triggering a character to be written. I didn't realise this at first and was starting on shift unnecessarily. Select mode is great with holding down the shift button.

    I did find the gestures to be a little strict in detecting what direction I wanted to go in... At the end of a line, for example, I had to trace straight down to get the cursor to move, when intuition told me to angle the gesture towards the target.

  • SimeonSimeon Admin Mod
    edited May 2012 Posts: 5,387

    Thank you for your feedback, @Fred. It's important to get this right or I might inadvertently frustrate people.

    @frosty has reported issues with the gestures triggering while typing. Have you experienced this? I have seen it happen twice. It appears to happen when a second finger hits the keyboard simultaneously while typing in certain circumstances. I've added a Keyboard Gestures toggle switch to the settings panel in case people don't like them.

  • SimeonSimeon Admin Mod
    Posts: 5,387

    I've disabled the on-keyboard gestures for 1.4, you can enable them in the settings sidebar. I've also made them even more conservative about triggering. In some future release I'll enable them as the default option.

    (Also in recent betas tabs with errors in them will highlight in red when you press the play button. It still needs improvement, but it's better than before.)

  • Posts: 447

    @Simeon the red tabs are really useful, saved me a bunch of time already

Sign In or Register to comment.