Howdy, Stranger!

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

A number of ideas and suggestions

edited March 2012 in Suggestions Posts: 41

Here are a few features I'd love to see in a future version. Apologies if this is not the right place to put these.

Editor:

  1. Jump to error: If I press the "run" button and my app doesn't run because of an error, it would be quite helpful if the code view would jump to the location of the error (including switching tabs if necessary).

  2. Multiple levels of undo: Because I often make multiple levels of errors.

  3. Paste at cursor location: When I position my cursor on a blank line or at the end of a line, the "select / paste" pop-up doesn't appear. Which means that to paste there, I have to double-tap, and my aim is not very good. It would be great to have a "paste" button on the keyboard, or some other workaround.

  4. Filter double-taps that bring up keyboard: Often I'm viewing my code w/o the onscreen keyboard. I see something I want to edit, and I double-tap to position the cursor. Instead, the first tap brings up the keyboard, and the second tap (if my location happened to be in the lower half of the screen) taps on a key on the keyboard, and inserts it into my code. Ugh. I make this error at least once an hour, and it seems I'm unable to retrain myself. Any chance this could be fixed, such as by ignoring keyboard taps that occurred before the keyboard was on the screen?

  5. Make double-dashes selectable by double-tap: If I double-tap a word, it becomes selected, and then I can easily drag to extend the selection. But if I start by double-tapping on a double-dash (such as at the beginning of a comment), it does not select. Thus, to delete a comment line, I have to double-tap a word, then drag the right side to the end AND drag the left side to the beginning, to include the double-dashes.

  6. Search: A basic search, or better yet a search-and-replace, would be very helpful.

  7. Number-scroller opt out: The color picker is awesome. However, the "select a number and drag to change the value" thing never works for me. If I try to use it, I drag to the number I want and then it changes just as I lift my finger. Worse, I'll try to double-tap to select a number, and I'll accidentally change it...and have no memory of what it used to be set to. If I could turn it off, so that numbers would be easily selectable for normal editing, I would.

Main screen:

  1. Project organization: I know you're working on new options for managing multiple projects. In the meantime, it would be great if scrolling between projects had less "friction". Currently, if I want to get to a project late in the list, each swipe takes me only two or three projects down the line. If I could give a nice energetic swipe and see them flipping rapidly past, I would be so happy.

Help:

  1. Window width of in-app help: In the help screens accessed with the "eye" button, some text isn't readable as it extends off the right edge of the window. Example: in the pairs(table) definition, the line starting "This will iterate over..."

  2. More text in help: Longer explanations and more examples would be great in general. Some topics are good as is (the "Conditionals Overview" is wonderful) but others offer a little less information than what I seem to need.

  3. Example projects: More comments in the example projects would increase their value tremendously. Some are nicely commented (Hello Mesh), but some could use a lot more (Dungeon Roller) and some have well-commented areas (Anagram - the Touch tab) but others that are more lacking (Anagram - the Anagram tab). Even just a note as to what each variable is used for might help newbies like me to understand and learn from the code more readily.

Major feature:

  1. Audio: I'd love to be able to use bits of imported audio in my Codea apps. Even better, I'd like to be able to record audio from within the Codea app, and have the audio stored somewhere as a resource so I could use it in my apps. Even even better, I'd like to be able to record audio from within my apps, e.g. triggered and recorded by the user (example: "Record your name now [beeeep]" and then let me play their name back to them later).

Thanks for reading. Please don't take any of this as criticism. I think Codea is amazing, both as a concept and in its execution, and the rate of improvements and additions is astounding.

Comments

  • beebee
    Posts: 381

    +1 for frictionless project scrolling on the main page. I had been wanted to complaint about this but I kept forgetting it. Thank you.

    Codea's way of scrolling on the project list is indeed doesn't seem to be the "correct" iOS way which is smooth and has inertia (frictionless). Codea's way might be good in the beginning when the number of project is not much. But as soon as it got more projects, scrolling them becomes a pain as it requires more efforts. :( Hope this will be fixed in the near future.

  • Posts: 2,820

    These are great basic suggestions. These are great things TLL should add as a side feature in each update. I've wa Ted these for a while. Adio would be great, but custom spritelack a first. Quick beta talk: TLL has a feature for importing images from a URL in the next version. It almost made it into 1.3.5. It allows spritepack images downloads from the web. Their plan is to also eventually allow other files too, like audio files and text files. Recording would be nice too.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    Editor:

    1. This is planned, sorry it's taking so long!
    2. Also planned, probably for later than 1. though
    3. is an absolutely fantastic suggestion — paste at cursor. I find it frustrating to use iOS paste as well.
    4. Noted, will look into this one
    5. Perhaps a comment/uncomment line is in order. A select line/line range feature is planned.
    6. Also planned. This will be integrated with the function browser.
    7. At the moment you have to touch-hold to activate a number scroller. This used to be an issue in older versions, are you using the latest?

    Main Screen:

    1. I have been trying to get this working but it's a little harder than it seems. Will revisit shortly. Agree that this would be ideal.

    Help:

    1. If you could make a note of where these appear in the issue tracker (as you encounter them) it would be much appreciated.
    2. Apologies for this — Our help document is very hard to edit. Which then makes it quite hard for us to write useful documentation. I hope to rewrite the help system as a native UI tool rather than a web-based one.
    3. Good point. WIll have to take a stab at this soon.

    Great feature request on Audio. You can actually play arbitrary PCM data — see the soundbuffer object. It's pretty sketchy to actually get the data in at the moment, though.

    If you could file your requests as individual issues/bugs on the tracker (https://bitbucket.org/TwoLivesLeft/codea/issues) that would be great.

  • Posts: 2,820

    Just a little trick that I'm not sure will help or not, if you bring up the magnifier and hover it where you want to type, keep holding and type and the text will be inserted. It helps if you want to insert numbers in variouse places. It would also be nice if you could look up a selected function in help.

  • Posts: 2,820

    @Simeon - It's not hard to find the help file of a selected word. Just get the word and go to this URL: Codea.app/Reference/#detail/index/NameofFunctionLookup.
    And of it's not found, just redirect them to a page that says that the function isn't found. But it's not really that simple for a really good lookup.

  • Posts: 1,255
    1. is one that I hit all the time. I can't tell you how often I end up have to clean a () out of my code because tapping at the start of a line happens to align with the () button.
  • Posts: 146

    @simeon:

    Main screen: ideal would be some sort of folder structure. This would be of some help with the current, not-so-ideal situaltion.

  • Posts: 2,820

    @gunnar_z - TLL is planning on having you tag all the projects and you can view the projects by their tabs.

  • Posts: 2,161

    some have well-commented areas (Anagram - the Touch tab) but others that are more lacking (Anagram - the Anagram tab)

    I'm a bit haphazard with commenting. I know I ought to but it often gets done at a different time to writing the actual code and tends to go in waves. The older bits of code are therefore better commented than the newer bits. The Touch library is relatively old, the actual anagram part less so.

    I hereby promise to do better!

  • Posts: 2,820

    Yay! 1.3.5 out! Now can we have some of these features n 1.4 or whatever please @Simeon?

  • I would like to ask@Simeon if there are any plans to include some functions to access location information? Ideally, I'd like to access the lat/long, ground track, ground speed and altitude from the GPS. Thanks!

    Carlos

  • Posts: 2,820

    @CharlEcho - It's in their long future plans. But I'm curiouse your plans with it... We don't have map access... Yet... It might be usefull when we get sockets...

  • edited March 2012 Posts: 5

    @Zoyt - I'm a pilot and I would like to write an app to give me what I call a poor man's ILS which is to say an artificial way to give me and my airplane lateral and vertical guidance to a waypoint. Basically I would have a compass rose that would rotate based on the ground track and needles to show lateral and vertical deviations from a desired path. I hope long term isn't too far out into the future...

    Cheers,

    Carlos

  • Posts: 51

    Hi Simeon,

    First of all, Codea is a very, very nice program!

    But, I have only two wishes:
    1)
    Is it possible to make a pop-up window with a message "are you sure?" when deleting a project or a class?

    2)
    Is it possible to change the startup screen in such a way that project names are presented like Windows Explorer, adjustable inside the settings screen? - > existing layout -> explorer layout.
    In explorer layout you can see more projects at once and scrolling/ selection is than maybe easier. If it becomes an option, I want to pay for it.

    Greetings, Dirk.nl

  • SimeonSimeon Admin Mod
    Posts: 5,054
    1. Very possible. I was supposed to add this earlier but forgot to get around to it. If you (or anyone else) could add these to the issue tracker it would be much appreciated.
    2. We will put something in to make projects more manageable. Exactly what that is isn't certain just yet.

    Thank you for your feedback @hartland

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @CharliEcho GPS is possible to add. We will keep it in mind in the next updates.

  • @Simeon - Thanks!!

  • edited March 2012 Posts: 51

    Simeon, I was just thinking about the "run" button on the extended keyboard. If you hide the keyboard there another "run" button. Is it possible to use the "run" button on the extended keyboard for a "tab" to the left. (= deleting spaces with the same amount as you will insert with the "tab" key) If you select a block of code you can use this button to move the complete selected block one "tab" position to the left.
    So, the most left "tab" key for moving text to the right and the most right "tab" to the left.
    Maybe handy?

    Running your program means hide the keyboard first.

    Greetings, Dirk.nl

  • Posts: 41

    Thanks for your responses, Simeon.

    "At the moment you have to touch-hold to activate a number scroller. This used to be an issue in older versions, are you using the latest?"

    I studied my behavior and I see why I'm having this problem. I often touch-and-hold, either to bring up the "select/paste" menu at the insertion point, or to bring up the positioning-magnifier-bubble-thing. So if I want to change a number from, say, "125" to "135", I'll touch and hold so I can position my cursor just after the "2".

    I should probably try to teach myself, in the case of numbers at least, to start my touch-and-hold away from the number and then slide it over. I'd still prefer a way to turn it off, though.

    I'll enter the other issues in the tracker, as well as any help text margin issues I find. Thanks again for the great support!

  • Posts: 159

    I wonder if an alternative to @hartland's unindent suggestion might be a tap-and-hold on the normal indent button. You could then select 'unindent' from a popover (or something similar). Strikes me that unindenting is a far less-used action than running a project, is all :)

  • Posts: 176

    If you go to the end of the tab space (on the right end) and hit backspace (or delete, whatever that key is) it undents one tab amount. Or are you wanting to act on a block of test?

  • edited March 2012 Posts: 51

    Hi jlslate, sorry, I made a mistake in my text, I want to move a complete block of text one tab position to to left.

  • Posts: 1,368

    Hi All,

    This facility may be present in Codea at the moment, but it didn't seem to work for me. I sometimes like to block out large blocks of code and am using '--' on each line. In Love2D you can block out a section using '--[[ .....--]]' which saves a lot of time and frustration.
    Is this present? If not could we add it?

    Thanks,
    Bri_G

  • Posts: 146

    @Bri_G these are standard lua multiline comments. Actually the syntax is

    --[=*[
    ...
    ]=*]
    

    where =* is any amount of equal signs, but they need to match in the opening and closing tag. This is so that you can nest long comments.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Bri_G these are present, but they won't highlight as comments in Codea at the moment.

  • Posts: 48

    Btw, is it possible to have a 'copy entire project to clipboard' function without running afoul of Apple? Moving projects with a lot of classes to pastebin can become tedious without this functionality.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @SciQuest actually that feature is in there (since 1.3 or 1.3.1). Touch-and-hold the project you want to copy, then choose "Copy".

    It will put the whole thing into your clipboard in the same order as the tabs are displayed in your editor, with comment markers between them.

  • Posts: 48

    D'oh! Thanks!

  • Posts: 1,368

    Hi Simeon,

    Thanks for the feedback. I'll look up the syntax in Lua to check, looks like there's several options here.
    Point of clarification from your feedback. Do you mean the options are there but don't work, or that they are there and they work but don't change the text colour to reflect their use -so it looks like they don't work.
    Thanks again.
    Bri_G

  • Posts: 2,820

    By the way @Simeon - I have problems trying some characters. See here:
    http://twolivesleft.com/Codea/Talk/discussion/585/arrow-keys-and-emoji

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Bri_G you can use them, they actually comment out the text but it doesn't highlight, so it doesn't look like it's commented out.

  • Posts: 2

    +1 frictionless scrolling, currently funky behavior compared to iOS apps.

  • Posts: 1,368

    Hi All,

    Just add my two penneth (or a dimes worth) - a bit trivial but:

    We have a number of icons, in an icon bar, when running in (FULLSCREEN) mode. So - could I ask for a similar icon arrangement (4 directions and fire button) to simulate a joypad. A simple system to return input from the touch screen to return left/right/up/down or fire.

    This would simplify building of prototypes and could be changed to a personal system once the principle has been generated.

    I'll put a few diagrams together if you tell me how to incorporate graphics in these threads.

    Thanks,

    Bri_G

    p.s. I know this like a plea from a lazy programmer, weeeelll - yeah you got me there.
    A simple class() may do but with the graphics incorporated into the codea default package.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Bri_G There's a fantastic library developed by @Nat that provides a number of common game controllers, you might want to have a look: https://github.com/npryce/codea-controllers

  • BortelsBortels Mod
    Posts: 1,557

    +1 for @Nat's controller library - it's awesome.

    There's a part of me thinks it should be included by default, it's so good - is it used in any of the example projects?

  • Posts: 1,368

    Thanks Simeon/Bortels,

    I'll have to play with these later - thanks for pointing them out. I'll be in touch after I've used them in anger.
    I agree with Bortels - I think there should be a built in system for this, an alternative to the system touch, especially for retro apps. I think suitable graphics should be built in by default, with an option to replace with an external sprite library. That way the system acts as a default for anyone prototyping and once the code is resolved, easily replaced by a preferred system. Obviously within certain limits.

    Thanks again,

    Bri_G
    :-?

  • Posts: 50

    Hi Simeon,

    Thanks for your wonderful app. You mentioned earlier:

    Great feature request on Audio. You can actually play arbitrary PCM data — see the soundbuffer object. It's pretty sketchy to actually get the data in at the moment, though.

    Could you provide a sketchy example how to get the PCM data in?

    Thanks,

    Doffer.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    This is an example @Dylan created after he implemented soundbuffer:

    -- Use this function to perform your initial setup
    function setup()
        iparameter("freq",1,4000,800)
        parameter("length",0.1,1,0.5)
    end
    
    function makeBuffer()
        local data = ""
        datum = "\0\255"
    
        numSamples = freq*length
    
        for i = 1,numSamples/#datum do
            data = data .. datum
        end
    
        return soundbuffer(data,FORMAT_MONO8,freq)
    end
    
    tap = false
    
    function touched(touch)
        if touch.state == ENDED and touch.tapCount == 1 then
            tap = true
        end
    end
    
    -- This function gets called once every frame
    function draw()
        -- This sets a dark background color 
        background(40, 40, 50)
    
        if tap then
            b = makeBuffer()
            sound(b)
            tap = false
        end
    end
    

    It should probably use a table with table.concat instead of the ".." operator to concat the data. But as you can see you must generate the samples manually at the specified frequency then pass that data string into a soundbuffer object.

  • Posts: 50

    Thank you, Simeon. I was wondering whether it would be possible convert some audio file into raw PCM and copy paste its data into Codea. Then it would be possible to add for example a little bit of speech :)

  • Posts: 384

    Hi @Doffer, @ruilov and @Bortels achieved this by copying over the PCM data using some utility...

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Doffer if all goes well you should be able to fetch the data over http in the next update.

  • Posts: 50

    Yay! I would love that :-)

    Thanks!

  • edited April 2012 Posts: 35

    Thanks for the updated example. (In the online reference, for the 'soundbuffer' example, the 2nd input is 'iparameter' instead of 'parameter', and 'datum' is assigned a space or nil, depending on where I look. It's not really clear at first what 'datum' should represent at first.)

    It eventually dawned on me that 'datum' would have to be some kind of waveform, just wasn't sure of the limits as to what could be entered. (0-255, 127/128 around 0 level?)
    I still get some clicks and pops playing with different shapes of the wave (reviewing Dr Petter's article on 'basic sound theory and synthesis' and trying to center around and end below '0'-level) but encouraging nonetheless.

  • Posts: 15

    i only have read the first post. but +1 for all of the editor suggestions

  • Posts: 384

    @kfin63, yes the datum is one chunk of the wave (cycle?) that can be repeated to produce continuous sound. With values between 0 and 255, 127 is the middle point. ClIcks will occur if you start, stop or change the tone in mid cycle without equalising the amplitude of the wave.

    I'll try to post some code soon, but I am still figuring out how to avoid the occasional click.

  • edited May 2012 Posts: 35

    @Fred, thanks. This is one busy forum! This probably belongs in a 'sound' thread, but the question happened to be raised here.

    After finding out more about PCM encoding, the missing piece (datum assigned 'nil') of the reference example for soundbuffer started to make more sense. Always a good idea, more reading. From which I gather:

    0-255 only with the mono8 format. 16-bit formats will need two bytes to encode the possible range 0-65535; stereo formats specify the left sample/cycle first, followed by the right sample (interleaved).

    Have seen a few mentions and checked out your Abc player, which looks like a great work. I'm not familiar with the ABC format myself yet.

  • Posts: 384

    Hi @kfin63, yes, let's jump into a sound thread! :). I just put up some soundbuffer code on another thread: http://twolivesleft.com/Codea/Talk/discussion/808 but need to play with it more to eliminate clicks.

    Thanks, ABC format has some good resources on the web and seemed a good start for making simple music. I only discovered it when thinking about how we could make music with Codea.

Sign In or Register to comment.