A number of ideas and suggestions

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 :slight_smile:

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?

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.

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

@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.

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

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.

@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.

D’oh! Thanks!

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

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

@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.

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

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.

@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

+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?

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
:-?

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.

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.

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 :slight_smile: