<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Questions - Codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/categories/questions/p2/feed.rss</link>
      <pubDate>Mon, 20 May 13 01:25:30 -0400</pubDate>
         <description>Questions - Codea</description>
   <language>en-CA</language>
   <atom:link href="/Codea/Talk/discussions/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Sprite packs</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2613/sprite-packs</link>
      <pubDate>Tue, 16 Apr 2013 09:40:16 -0400</pubDate>
      <dc:creator>Andrew_Stacey</dc:creator>
      <guid isPermaLink="false">2613@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>How do I create my own sprite pack?</p>

<p>I've created a folder <code>MySprites.spritepack</code> in the Codea documents folder, stuck a load of pngs in there, added an <code>Info.plist</code> that I cribbed from <a href="https://github.com/TwoLivesLeft/Codea-Runtime/blob/master/CodeaTemplate/SpritePacks/Cargo%20Bot.spritepack/Info.plist" target="_blank" rel="nofollow">https://github.com/TwoLivesLeft/Codea-Runtime/blob/master/CodeaTemplate/SpritePacks/Cargo Bot.spritepack/Info.plist</a>, but it doesn't work.</p>

<p>I get a list of the pngs but no images and all are reported as being 0x0.  When I try to use one in my code then Codea crashes.  The pngs work fine if they are dumped in the main Codea documents folder but I'd rather segregate them a little otherwise it gets too crowded in there.</p>

<p>What's the secret?</p>
]]></description>
   </item>
   <item>
      <title>Trouble with tweens and resets</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2504/trouble-with-tweens-and-resets</link>
      <pubDate>Sat, 23 Mar 2013 14:58:29 -0400</pubDate>
      <dc:creator>bunderscore</dc:creator>
      <guid isPermaLink="false">2504@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am trying to get my head around tweens, and I am having some difficulties. There is something I am not understanding, possibly about how the reset functions work.</p>

<p>Goal:
Draw a dot on the screen that shrinks in size. Then, by touching a button, make it happen again -- by which I mean the dot goes back to its initial size and starts shrinking again.</p>

<p>Code:
(This code is retyped, not copied-and-pasted, so if there are minor typos, I apologize. They are probably not the issue.)</p>

<pre><code>function setup()
    length = 100
    dot = {diam = length}
    parameter.action("Reset", ResetTweens)
end

function draw()
    background(57, 57, 57, 255)
    strokeWidth(10)
    stroke(255)
    fill(0, 0, 0, 0)
    rectMode(CENTER)
    rect(WIDTH/2, HEIGHT/2, length, length)

    pushMatrix()
    DrawDot()
    popMatrix()
end

function DrawDot()
    id = tween(1, dot, {diam = 0.6*length})
    noStroke()
    fill(255,0,0)
    ellipse(WIDTH/2, HEIGHT/2, dot.diam)
end

function ResetTweens()
    tween.reset(id)
end
</code></pre>

<p>Two issues with this code.
1. When the dot gets close to its final size, it stutters a bit, bouncing around slightly in size. I tried explicitly setting the easing to linear, but that didn't solve the problem.
2. Pressing the reset parameter button doesn't do anything. I can see that I go into the Reset function (by adding a print statement to ResetTweens() ), but nothing happens to the red dot.</p>

<p>So, clearly, there are some things I don't get. I have tried moving the push and pop of the matrix to within the DrawDot() function. I have moved the declaration of the tween around to various places. I have tried calling tween.reset() from within draw() and setup(). I have also tried using tween.resetAll(). But I can't get the dot to behave the way I want. I feel like I'm basically trying stuff at random, and would love some guidance / explanation.</p>

<p>Thanks!
-B</p>
]]></description>
   </item>
   <item>
      <title>Grab RSS, Twitter, etc?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2614/grab-rss-twitter-etc</link>
      <pubDate>Tue, 16 Apr 2013 13:21:15 -0400</pubDate>
      <dc:creator>Nichod</dc:creator>
      <guid isPermaLink="false">2614@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Has anyone attempted to pull an RSS feed/Twitter feed into Codea? Is it even possible?</p>
]]></description>
   </item>
   <item>
      <title>Sprite, clip and setContext</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2558/sprite-clip-and-setcontext</link>
      <pubDate>Thu, 04 Apr 2013 09:29:59 -0400</pubDate>
      <dc:creator>aciolino</dc:creator>
      <guid isPermaLink="false">2558@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Recently. A working on a Cider2 based control for doing a container. The idea was to render the controls to an image and display inside of a control window to facilitate scrolling.</p>

<p>I found two things:
1 - setContext(img) seems to require clip() to be turned off. I had a clipping window set, and was not getting any images. It seems to be. Because:
2 - sprite respects clip(data...) while setContext(img) is on.</p>

<p>This seems to be wrong...I guess someone could want to clip)) when drawing to an image, but would one?</p>
]]></description>
   </item>
   <item>
      <title>Background music</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2596/background-music</link>
      <pubDate>Sat, 13 Apr 2013 11:53:33 -0400</pubDate>
      <dc:creator>inancyuce</dc:creator>
      <guid isPermaLink="false">2596@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am confused about how to implement music in my code. Is it possible to create your own soundtrack and put it in the game in Codea or do I have to transfer my code into Xcode first?</p>
]]></description>
   </item>
   <item>
      <title>Outputting sound at a specific hertz range</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2592/outputting-sound-at-a-specific-hertz-range</link>
      <pubDate>Fri, 12 Apr 2013 18:51:00 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2592@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I have a friend who has tinnitus, and he is trying to find a way to generate white noise across a specific hertz range, eg 2000-20000, while skipping a certain range in between (the idea is that you listen to white noise at everything except the range your tinnitus affects).</p>

<p>This is outside my expertise, and I know Codea isn't strong in sound, but I thought I'd ask anyway if this sounds feasible.</p>
]]></description>
   </item>
   <item>
      <title>OpenGl versus Codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2581/opengl-versus-codea</link>
      <pubDate>Wed, 10 Apr 2013 22:58:25 -0400</pubDate>
      <dc:creator>wrmichael</dc:creator>
      <guid isPermaLink="false">2581@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>It has been a while since I've been on.  Love all the updates, sample apps.</p>

<p>I have finally setup an apple developer account published a few simple apps and thought it was time to tackle something 3d and fun.</p>

<p>I started looking at OpenGL samples and it doesn't look hard, but I remembered the many nights I played with codea and thought I'd relook at it.</p>

<p>So my question is in general what are benefits of each and the draw backs.   I remember codea itself being limited it things like access to mp3 files, voice and custom images.  I think with the runtime tool kit I can get around those?</p>
]]></description>
   </item>
   <item>
      <title>Need help swapping sprites</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2593/need-help-swapping-sprites</link>
      <pubDate>Fri, 12 Apr 2013 20:19:39 -0400</pubDate>
      <dc:creator>LacrosseJunkie27</dc:creator>
      <guid isPermaLink="false">2593@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Alright guys so Im attempting to write a program in which the user controls a knight in order to fight a dragon (lame I know) but anyways I have the basic concept of using an image as a button down, the only thing I need to know is if there is any way to switch the sprite when the user presses the button. That way I can make it seem as if the knight is slashing at the dragon. Any ideas? Oh and I dont know much about Codea since I just started working with it today.</p>
]]></description>
   </item>
   <item>
      <title>Anyone have a glossy button shader?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2567/anyone-have-a-glossy-button-shader</link>
      <pubDate>Sat, 06 Apr 2013 15:02:04 -0400</pubDate>
      <dc:creator>aciolino</dc:creator>
      <guid isPermaLink="false">2567@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Seems like a simple thing to either make or find, but I can't seem to quite get the time to hack it out...does anyone have one already? I'd embed it into Cider2.</p>
]]></description>
   </item>
   <item>
      <title>Vector sprites</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2544/vector-sprites</link>
      <pubDate>Mon, 01 Apr 2013 22:08:03 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2544@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I see Codea can import vector PDFs. What sort of tools are available to create them? I've looked around and can't find anything other than really expensive software.</p>
]]></description>
   </item>
   <item>
      <title>Multiple Keyboard inputs help</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2571/multiple-keyboard-inputs-help</link>
      <pubDate>Sun, 07 Apr 2013 21:08:52 -0400</pubDate>
      <dc:creator>PLPP</dc:creator>
      <guid isPermaLink="false">2571@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I recently found an old project that i was making a year ago, and since i have not wrote anything in a while, im a bit confused :( .
What i was trying to do is an algebric calculator that uses bhaskara to solve equations.
Here is what i was able to do.</p>

<pre><code>function Results:init(x)
    showKeyboard() 
end

function Results:draw()
    buffer = keyboardBuffer()
    if buffer then
        buffer = tbuffer{a,b,c}
        d = math.pow(b,2)- 4 * a * c
        x1 = (-b + math.sqrt(d))/2*a
        x2 = (-b-math.sqrt(d))/2*a
        fill(255)
        fontSize(40)
        font("AmericanTypewriter-Bold")
        textWrapWidth(WIDTH)   
        text(a.."x^2+"..b.."x+" ..c.. " = 0", WIDTH/2,HEIGHT -100)
        fill(255, 0, 0, 255)
        text("Delta = "..b.."^2 - 4*"..a.."*"..c,WIDTH/2,HEIGHT -150)
        text("Delta = "..b*b.." - "..4*a*c,WIDTH/2,HEIGHT -200)
        text("Delta = "..d,WIDTH/2, HEIGHT-250)
        fill(0, 21, 255, 255)
        text("X1 = ",201,HEIGHT -315)
        text(-b.."+".."√"..d,WIDTH/2,HEIGHT-300)
        text("____________",WIDTH/2,HEIGHT-300)
        text("2 * "..a,WIDTH/2,HEIGHT-340)
        text("X1 = ",201,HEIGHT-405)
        text(-b.."+"..math.sqrt(d),WIDTH/2,HEIGHT-390)
        text("____________",WIDTH/2,HEIGHT-390)
        text(2*a,WIDTH/2,HEIGHT-430)
        text("X1 = "..x1,WIDTH/2,HEIGHT-480)
        fill(255, 158, 0, 255)
        text("X2 = ",201,HEIGHT -545)
        text(-b.."-".."√"..d,WIDTH/2,HEIGHT-530)
        text("____________",WIDTH/2,HEIGHT-530)
        text("2 * "..a,WIDTH/2,HEIGHT-570)    
        text(-b.."-"..math.sqrt(d),WIDTH/2,HEIGHT-620)
        text("____________",WIDTH/2,HEIGHT-620)
        text(2*a,WIDTH/2,HEIGHT-660)
        text("X2 = ",201,HEIGHT -635)
        text("X2 = "..x2,WIDTH/2,HEIGHT-710)
    end
end
</code></pre>

<p>What i inteded here is to input for example 1,-6,5 and it would return a=1,b=-6,c=5.
The program says tbuffer = nil, and i dont know how to get multiple values from the keyboard.
Sorry for the messy code, its my first one</p>
]]></description>
   </item>
   <item>
      <title>Collision code, HELP !!</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/1520/collision-code-help</link>
      <pubDate>Mon, 13 Aug 2012 12:53:09 -0400</pubDate>
      <dc:creator>Rakarinn</dc:creator>
      <guid isPermaLink="false">1520@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I want to know how to collide things( for example: when a character collides with a ball then the character goes the other way ).</p>
]]></description>
   </item>
   <item>
      <title>where is the data saved by “saveLocalData”</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2576/where-is-the-data-saved-by-savelocaldata</link>
      <pubDate>Tue, 09 Apr 2013 06:10:17 -0400</pubDate>
      <dc:creator>abyss2007</dc:creator>
      <guid isPermaLink="false">2576@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>what is the path of the file which saved data  by “saveLocalData” . Thank you very much!!!</p>

<p>ifile acess it</p>

<p>Codea Rookie</p>
]]></description>
   </item>
   <item>
      <title>Need help with an error</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2528/need-help-with-an-error</link>
      <pubDate>Fri, 29 Mar 2013 11:19:12 -0400</pubDate>
      <dc:creator>inancyuce</dc:creator>
      <guid isPermaLink="false">2528@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am getting this error:</p>

<p>error:  [string "--tween.lua..."]:472 :attempt to perform arithmetic on local 'd' (a nil value)</p>

<p>I didn't use d as a variable in my code. Can someone explain what this means?</p>
]]></description>
   </item>
   <item>
      <title>Non game applications</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2574/non-game-applications</link>
      <pubDate>Mon, 08 Apr 2013 01:11:27 -0400</pubDate>
      <dc:creator>mozzie</dc:creator>
      <guid isPermaLink="false">2574@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi. I have noticed that the majority of the sample apps created have been games. Not so surprising when you consider the opportunity if it clicks with people. I've prototyped an app idea for my company in Excel with the purpose of developing an iOS app. It is currently being used to test the concept with success so far. The closest app you could say it is like is quoting / invoicing. Is it possible to use Codea to develop it into a fully functional app or a prototype iOS app. I'm not a programmer and in fact couldn't program anything to save my life so I like the idea of Codea or at least what I've seen so far. Thanks in advance for your help.. Cheers</p>
]]></description>
   </item>
   <item>
      <title>Simple Particle System [ Maybe a Noob Question ]</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2566/simple-particle-system-maybe-a-noob-question</link>
      <pubDate>Sat, 06 Apr 2013 06:17:16 -0400</pubDate>
      <dc:creator>Georgian</dc:creator>
      <guid isPermaLink="false">2566@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Last days I tried to make a simple particle system. An particle system like in below image.
<a rel="nofollow" href="http://tinypic.com?ref=2evwar5" target="_blank"><img src="http://i49.tinypic.com/2evwar5.png" alt="Image and video hosting by TinyPic" style="border: 0px;" /></a> <br />
It's about a radial particle system.
It would be cool if Codea would have a particle system editor, but it's difficult to make this one.
So, I wonder if anyone has already made ​​a particle system exactly as shown above, in image.</p>
]]></description>
   </item>
   <item>
      <title>How can i edit/crop a Photo</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2537/how-can-i-edit-crop-a-photo</link>
      <pubDate>Sun, 31 Mar 2013 13:31:01 -0400</pubDate>
      <dc:creator>phknestel</dc:creator>
      <guid isPermaLink="false">2537@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>So i want to make an app where you can edit or especialy crop a photo which you have just shot with the camera.
I have already the code for the camera but the photo wich i took isn't  saved it is just down the camera screen.
The code is just the simple code from the exemples.</p>

<p>So i want to Save the photo and i want that the screen changes to the photo after shooting it. So i can edit or crop it.
Thanks</p>
]]></description>
   </item>
   <item>
      <title>A basic question</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2549/a-basic-question</link>
      <pubDate>Wed, 03 Apr 2013 02:26:24 -0400</pubDate>
      <dc:creator>luger</dc:creator>
      <guid isPermaLink="false">2549@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>A basic question from an absolutely beginner: 
I have in mind a project:  an images database with
-  a main vertically scrolling window  (where to show an a .jpeg or a .pdf and with the possibility to add text as comment of the object ... sometime more than 40/50 lines) 
- many  orrizontally scrolling "time line bars" (a series - 10 or even more - of rectangular frames in which will appear thumbnails of the  .jpeg or .pdf  from where to choose the item to show in the main window;  the "time lines" have to scroll orrizontally as they'll be tipically fisically more extended than the screen of the iPad) 
All in all something graphically and functionally very similar to the BBCNews app (even if it's function will be quite different).
My question : can something like that be realized using Codea? If not, do you think that it'll be possible tu realize it using Lua? 
Thank you for a kind reply 
Luger</p>

<p>(PS... I'm not a "native English speaker"... please forgive my poor prose and the spelling mistakes ... ;-)  tks )</p>
]]></description>
   </item>
   <item>
      <title>Communication in Codea Runtime with Obj-C Classes?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2545/communication-in-codea-runtime-with-obj-c-classes</link>
      <pubDate>Tue, 02 Apr 2013 10:28:46 -0400</pubDate>
      <dc:creator>dekzwabber</dc:creator>
      <guid isPermaLink="false">2545@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,
I have my Codea project running successfully within XCode thanks to the excellent tutorial on <a href="http://codeatuts.blogspot.nl/" target="_blank" rel="nofollow">http://codeatuts.blogspot.nl/</a></p>

<p>My next question is, how can you call Objective-C code from within your LUA classes? (and the other way round)
Where do you put your functions and how do you call them? (for example, It would be nice to call an Obj-C function that plays audio).</p>
]]></description>
   </item>
   <item>
      <title>Tween : I&#039;m having &#039;self&#039; doubt.....</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2557/tween-%3A-i-m-having-self-doubt</link>
      <pubDate>Thu, 04 Apr 2013 04:51:26 -0400</pubDate>
      <dc:creator>andymac3d</dc:creator>
      <guid isPermaLink="false">2557@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Forgive the pun, but looking for a bit of a 'sanity check' on using Tweens with Classes..</p>

<p>So, as a 'stripped down' example - we can represent  'position' using vec2 within a simple class to hold the x,y coords:</p>

<pre><code>self.pos = vec2(0,0)
</code></pre>

<p>and then tween by referencing directly the x index as a target:</p>

<pre><code>subject = self.pos
target =  {x = WIDTH}
tweenID = tween(5, subject, target)
</code></pre>

<p>All fine and dandy!</p>

<p>However, how would this work with a single variable and what should 'target' in this instance be?</p>

<pre><code>self.rotate = 0
subject = self.rotate
target = ??????
tweenID = tween(5, subject, target)
</code></pre>

<p>I guess the issue is that self.rotate is not 'userdata' (ie vec2 etc) and hence I can't seem to work out the correct syntax or a 'simple' way of representing easily what a 'target' should be.</p>

<p>As a hack, this works fine if a treat pos and rotate as a vec3 (using the z index as the rotate) - but there must be an easier way of tweening a single (non user-data) variable within a class?</p>

<p>:-(</p>
]]></description>
   </item>
   <item>
      <title>How to Extrakt a Photo/Data from codea to photos or something else?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2532/how-to-extrakt-a-photo-data-from-codea-to-photos-or-something-else</link>
      <pubDate>Sat, 30 Mar 2013 16:26:05 -0400</pubDate>
      <dc:creator>phknestel</dc:creator>
      <guid isPermaLink="false">2532@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>So i want to make an app what have to change the Tastature like emoji ( the app what makes that you can send Smileys ) so the Question  is, how can i make that a  Photo or somthing Else is in the Tastature so the Text or the Photo has been Shot or written by my app. So the app just have to copy it into the Tastature.</p>

<p>It World be nice if Someone could help me or send me a link Where the Code Stands.</p>

<p>Sry if the englisch isnt Fine but im from Germany and my ipad is Always changing my english words into sth German.</p>
]]></description>
   </item>
   <item>
      <title>How can I operate SQLite ?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2507/how-can-i-operate-sqlite</link>
      <pubDate>Sun, 24 Mar 2013 01:40:00 -0400</pubDate>
      <dc:creator>Peter</dc:creator>
      <guid isPermaLink="false">2507@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>How can I operate SQLite ?</p>
]]></description>
   </item>
   <item>
      <title>AppStore Publish</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2535/appstore-publish</link>
      <pubDate>Sun, 31 Mar 2013 09:18:41 -0400</pubDate>
      <dc:creator>Gusdudu</dc:creator>
      <guid isPermaLink="false">2535@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,from Spain. When you have an application already terminated in CODEA with your ipad, how to public in AppleStore?</p>
]]></description>
   </item>
   <item>
      <title>How to copy a picture from codea to the app photos</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2536/how-to-copy-a-picture-from-codea-to-the-app-photos</link>
      <pubDate>Sun, 31 Mar 2013 12:45:02 -0400</pubDate>
      <dc:creator>phknestel</dc:creator>
      <guid isPermaLink="false">2536@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>So i want to make an app what can Shot photos and send it with some extras and so on. But the Problem i dont know how  to copy the picuture to iMessage or photos.   So when Sonnenöle have a Tipp or something like that... :-?</p>

<p>Thanks for all answers</p>
]]></description>
   </item>
   <item>
      <title>Beginner Question on Functions</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2527/beginner-question-on-functions</link>
      <pubDate>Fri, 29 Mar 2013 02:34:58 -0400</pubDate>
      <dc:creator>Ric_Esrey</dc:creator>
      <guid isPermaLink="false">2527@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Greetings... I'm trying to get a better grasp of Lua functions and I came across an article by Roberto Ierusalimschy (<a href="http://www.inf.puc-rio.br/~roberto/docs/ry09-03.pdf" target="_blank" rel="nofollow">http://www.inf.puc-rio.br/~roberto/docs/ry09-03.pdf</a>) entitled 'Programming with Multiple Paradigms in Lua.'  In section 3, Mr. Ierusalimschy explains that Lua offers first-class functions with lexical scoping.  I don't need definitions for first-class functions or lexical scoping--I can research the Internet for that.  My problem is that Roberto uses this line as an example:</p>

<pre><code>    (function (a,b) print(a+b) end)(10, 20)
</code></pre>

<p>He said, 'It creates an anonymous function that prints the sum of its two parameters and applies that function to arguments 10 and 20'.  I had never seen a function like this before, so I tried to put it into Codea for closer examination and experimentation.  Unfortunately, Codea returns an error at this line when I hit 'Run.'  What am I missing here?  My presumption was that the a and b variables would get their values from the parameters 10 and 20, add them together and then print them.</p>
]]></description>
   </item>
   <item>
      <title>Keyboard(key) -- What is the &quot;Return&quot; key?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2499/keyboard-key-what-is-the-return-key</link>
      <pubDate>Fri, 22 Mar 2013 12:23:29 -0400</pubDate>
      <dc:creator>matthew</dc:creator>
      <guid isPermaLink="false">2499@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I would like to hideKeyboard() when the user taps the keyboard's "return" key, but I can't find documentation for how it is defined by Codea. When I use print("Key pressed: " .. key) the output is just a blank new line in the console. Any suggestions?</p>
]]></description>
   </item>
   <item>
      <title>Codea on PC? Possible?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2522/codea-on-pc-possible</link>
      <pubDate>Wed, 27 Mar 2013 18:33:50 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2522@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Would there be any chance that the codea IDE could see a windows appearance? I would love to be able to code and test from my pc. Might be a pipe dream but thought I'd ask :)</p>
]]></description>
   </item>
   <item>
      <title>Conditionals</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2512/conditionals</link>
      <pubDate>Tue, 26 Mar 2013 10:50:04 -0400</pubDate>
      <dc:creator>inancyuce</dc:creator>
      <guid isPermaLink="false">2512@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am trying to insert several conditions into an if statement as the following:</p>

<p>if a-n &lt;= x &lt;= a+n and b-m &lt;= y &lt;= b+m then ... end  (x,y,a,b are variable integers and n,m are constant integers)</p>

<p>But I can't. Are there any type of conditional that I can use in this way without creating a loop?</p>
]]></description>
   </item>
   <item>
      <title>Mail output</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2393/mail-output</link>
      <pubDate>Sat, 09 Mar 2013 08:29:37 -0500</pubDate>
      <dc:creator>KoBa</dc:creator>
      <guid isPermaLink="false">2393@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I was hoping someone could help me. I am making a program in which you can enter some data and the program should mail the output of the program. My program gives the correct output. But I was wondering if there is a way to copy this output to an email?
Thanks in advance :).</p>
]]></description>
   </item>
   <item>
      <title>Hit Ellipse</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2508/hit-ellipse</link>
      <pubDate>Sun, 24 Mar 2013 03:23:54 -0400</pubDate>
      <dc:creator>Georgian</dc:creator>
      <guid isPermaLink="false">2508@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello again, <br />
I've a little problem with a code. A year ago I posted this topic: <a rel="nofollow" href="http://twolivesleft.com/Codea/Talk/discussion/599/hit-button-help-me" target="_blank">Hit Button [ Help me! ]</a> <br />
Simeon helped me with a code with a class called Button. This class contains a function contains(point). <br />
I need a function to detect touch on an ellipse (round not square). <br /> 
I was not able to figure out how to do this, so I'm not too good with math. I think this is about math. <br />
Something to calculate the round, maybe pi, cos, sin, etc.</p>
]]></description>
   </item>
   <item>
      <title>Sprites and Tweens</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2505/sprites-and-tweens</link>
      <pubDate>Sat, 23 Mar 2013 16:16:34 -0400</pubDate>
      <dc:creator>inancyuce</dc:creator>
      <guid isPermaLink="false">2505@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi. I am new to programming and learning Codea. Any help will be appreciated. I tried to use a sprite as a subject for tween function and I got an error message saying: "you can only use table or user data for subject". Is there any other way for using tween function for sprites?</p>
]]></description>
   </item>
   <item>
      <title>paste project</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2493/paste-project</link>
      <pubDate>Thu, 21 Mar 2013 22:46:15 -0400</pubDate>
      <dc:creator>eriksw</dc:creator>
      <guid isPermaLink="false">2493@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>On my friends ipad4 he gets the option to paste into a new project by doing a long touch on the new project icon. This does not work on my ipad3.... We both have all the latest updates for codea and ios. Why doesn't it work on my ipad3 ?</p>
]]></description>
   </item>
   <item>
      <title>Jump game question. Need help!! :)</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2489/jump-game-question-need-help-%3A</link>
      <pubDate>Thu, 21 Mar 2013 16:30:52 -0400</pubDate>
      <dc:creator>Zetto</dc:creator>
      <guid isPermaLink="false">2489@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I'm trying to make a game like Papi Jump or Megajump, but I can't find out how the code should be if my person/ avatar (or whatever it's called) goes out of the screen. I want it to either be stopped, or just appear at the opposite side of the screen, how do I do that? :/</p>

<p>Thanks in advance!
Steffen</p>
]]></description>
   </item>
   <item>
      <title>Quick question on meshes</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2488/quick-question-on-meshes</link>
      <pubDate>Thu, 21 Mar 2013 11:45:20 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2488@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am starting to get a handle on meshes, but I have a couple of conceptual questions. It seems as though meshes have two main functions</p>

<ul>
<li>3D graphics, through the use of triangles and everything that goes with that</li>
<li>Faster 2D graphics, by adding rectangles to a mesh and then adding image based textures to them </li>
</ul>

<p>First, is the ability to add rectangles purely aimed at 2D speed (it seems a bit odd to be adding a rectangle to a structure made up of triangles), or does it have some function in 3D as well? Or am I completely misunderstanding something?</p>

<p>My second question is about using a mesh to speed up 2D graphics. I can see how it works with rectangular images or shapes, but what if you're drawing lines, ellipses or other odd shapes as well? How would you get them into a mesh, or even into a texture? To make it clearer, suppose I have this code in draw()</p>

<pre><code>sprite(img,100,100)
ellipse(200,200,50)
line(400,450,500,550)
</code></pre>

<p>..and I want to do this with a mesh instead, having defined this in setup already</p>

<pre><code>g=mesh()
g.texture="ImageName"
</code></pre>

<p>So in draw, I put</p>

<pre><code>local d=g:addRect(100,100,img.width,img.height) --add image to mesh
g:setRectTex(d,0,0,1,1)
      --&lt;&lt; it's here I'm stuck. What do I do with the ellipse and line?
g:draw() --draw
</code></pre>
]]></description>
   </item>
   <item>
      <title>openURL</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2482/openurl</link>
      <pubDate>Wed, 20 Mar 2013 23:02:13 -0400</pubDate>
      <dc:creator>pmdmaster</dc:creator>
      <guid isPermaLink="false">2482@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>How can I use a string variable to open a link with openURL()?
I mean something like this:</p>

<p>link = '<a href="http://twolivesleft.com/Codea'" target="_blank" rel="nofollow">http://twolivesleft.com/Codea'</a></p>

<p>openURL(link)</p>

<p>I want to have an array with links so that when the user touches a certain area of the application they are sent to one of the links in the array. This is what I have, not sure if  it works (I can't test it right now).</p>

<p><a href="http://pastebin.com/xXa4gvgP" target="_blank" rel="nofollow">http://pastebin.com/xXa4gvgP</a></p>

<p>I found how to open an URL if a certain are is touched, but I want to use an array to have better control on the urls and that I don't have to use a lot of if's:</p>

<p><a href="http://pastebin.com/kb3VFUGS" target="_blank" rel="nofollow">http://pastebin.com/kb3VFUGS</a></p>

<p>And I don't know if the validTouch really returns the bool value I want it to.</p>

<p>Thanks! :)</p>
]]></description>
   </item>
   <item>
      <title>Multi-touch function</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2441/multi-touch-function</link>
      <pubDate>Thu, 14 Mar 2013 19:05:29 -0400</pubDate>
      <dc:creator>pmdmaster</dc:creator>
      <guid isPermaLink="false">2441@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, I'm new to codea and I'm trying to make a small game from an idea I had.
I saw the Multi-touch sample but I don't really know how to use it in this case.
Basically I want to have like a line of a fixed length joining two points, if you touch both of the ends you can move and rotate it. I want to know how to get the x and y coordinates of two positions at the same time, so I can use one of those for the position and the other for the rotation angle.
If I'm not clear enough I'm sorry and I'll try to explain myself better.
Thanks a lot for your help!</p>
]]></description>
   </item>
   <item>
      <title>Repeat until - Codea freezes</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2480/repeat-until-codea-freezes</link>
      <pubDate>Wed, 20 Mar 2013 18:11:02 -0400</pubDate>
      <dc:creator>linus303</dc:creator>
      <guid isPermaLink="false">2480@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi there,</p>

<p>I am new to both Lua and Codea and just ran into a problem I cannot get my head around.</p>

<p>I am trying to use a repeat until loop to simply print the numbers 400 to 800. As soon as I execute that piece of code Codea freezes. 
I get similar problems when using while loops.</p>

<p>Can anybody tell me whats going on? Thank you!</p>

<pre><code>-- Use this function to perform your initial setup
function setup()
    -- Variables
    i = 400
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(255, 255, 255, 255)

    -- Do your drawing here
    repeat
         print (i)
         i = i + 1
    until i == 800
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>physics.body.points read-only?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2472/physics-body-points-read-only</link>
      <pubDate>Mon, 18 Mar 2013 14:02:56 -0400</pubDate>
      <dc:creator>cplr</dc:creator>
      <guid isPermaLink="false">2472@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Is this property read-only? It does not say so in the documentation, but in playing around with this it doesn't look like you can update the points for a physics.body during runtime, but only set them when instantiating the object.</p>

<p>Cheers</p>
]]></description>
   </item>
   <item>
      <title>Parameter. can I position the slidebar elsewhere? Vertical ? Is their special &quot;view&quot; I can use?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2462/parameter-can-i-position-the-slidebar-elsewhere-vertical-is-their-special-view-i-can-use</link>
      <pubDate>Sun, 17 Mar 2013 11:45:42 -0400</pubDate>
      <dc:creator>llanyort</dc:creator>
      <guid isPermaLink="false">2462@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Question about Parameter().</p>

<p>Can I position the slidebar elsewhere? 
What about Vertical ? 
Is their special "view" I can use?</p>

<p>I am trying to get two VERTICLE slider bars on left and right side of a landscape screen.
Basically I want the user's thumbs to move a slider bar up and down.</p>

<p>I'm new to Codea so be gentle.</p>

<p>Thanks,
Troy</p>
]]></description>
   </item>
   <item>
      <title>How to setup a Mat4 from codea for a shader?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2449/how-to-setup-a-mat4-from-codea-for-a-shader</link>
      <pubDate>Fri, 15 Mar 2013 21:58:23 -0400</pubDate>
      <dc:creator>Bendiben</dc:creator>
      <guid isPermaLink="false">2449@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I want to declare my own matrix in codea and bind it to a uniform mat4 in a shader, but it seens to be empty in the shader.
My code is basically:</p>

<p>m0={1,0,3,0,
         0,1,0,0,
         3,0,1,0,
         0,0,0,1}
Then I assign it to my shader ( in my vertex shader I have "uniform mat4 mymat4;" already declared)
mymesh.shader.mymat4=m0</p>

<p>But if I make any operation like position = mymat4* position, my result is null so I guess I have a problem with the input.
Anyone has an idea?</p>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>Performance looping over table with Sprites</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2440/performance-looping-over-table-with-sprites</link>
      <pubDate>Thu, 14 Mar 2013 07:37:40 -0400</pubDate>
      <dc:creator>dekzwabber</dc:creator>
      <guid isPermaLink="false">2440@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi all,
I am building a game where I keep a reference to my sprites in a table.
Then I loop over this table to draw all the sprites.
This goes fine, until I reach about 15 sprites, then performance starts to seriously drop.</p>

<p>My question: is there a better way to draw large numbers of sprites? These sprites are transparent PNG's with retina versions. I am testing on iPad 3. My Code:</p>

<pre><code><br />function draw()
   for i=#self.allSprites,1,-1 do 
      self.allSprites[i]:draw()
   end
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Ultima online clone made with codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2162/ultima-online-clone-made-with-codea</link>
      <pubDate>Mon, 04 Feb 2013 19:52:57 -0500</pubDate>
      <dc:creator>Brandn3wbian</dc:creator>
      <guid isPermaLink="false">2162@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello! I'm a novice programmer looking to make a game like ultima online. (Mmorpg,3d Top down view, persistent world, level-less skill progression, dungeons, ext...) Is this possible with Codea? I have enough of a background in programming to do it. I'm just looking for the proper program to write in and I would love to do it all on the ipad. If not, please suggest alternatives. Thank you!</p>
]]></description>
   </item>
   <item>
      <title>Physics question</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2450/physics-question</link>
      <pubDate>Fri, 15 Mar 2013 23:41:42 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2450@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>The physics lab example has an elaborate routine to handle collisions, working out worldAnchors and applying a complicated force, but why? The simple code below seems to handle collisions ok without any special code. I don't understand when you would need the elaborate version.</p>

<pre><code>function setup()
    --create objects

    --first the rectangle
    rect_width=100 --size of rectangle
    rect_height=50
    --now create the physics object that behaves like a real block, it will tell us where to draw our rectangle
    --think of it as a GPS navigator that guides us
    p_rect = physics.body(POLYGON, vec2(-rect_width / 2, -rect_height / 2),vec2(-rect_width / 2, rect_height / 2),vec2(rect_width / 2, rect_height / 2),vec2(rect_width / 2, -rect_height / 2))
    p_rect.x = math.random(60,250) -- choose a random position between 30 and the screen width minus 30
    p_rect.y = math.random(60,250) -- same for the y position
    p_rect.angle=math.random(0,360) -- and rotation
    p_rect.gravityScale = 0 -- no gravity - if there was, the ball would fall to the bottom of screen
    p_rect.restitution = 1 -- this circle is bouncy
    p_rect.friction = 0.1 -- the amount of friction to be applied to the circle
    p_rect.linearVelocity = vec2(100+math.random(400),100+math.random(400))  --velocity (pixels per second = 60 redraws)
    --p_rect.linearDamping = 0.2
    --p_rect.angularDamping = 0.2

    p_rect.info="rect" --so when collisions occur, we can figure out which object was involved

    --now much the same for the image
    img=readImage("Tyrian Remastered:Mine Spiked Huge")
    img_diam=(img.width+img.height)/2 --use average of width and height as diameter
    --create the physics object
    p_img = physics.body(CIRCLE,img_diam/2) --physics bodies use radius not diameter
    p_img.x = math.random(60,250) -- choose a random position 
    p_img.y = math.random(60,250) -- same for the y position
    p_img.angle=math.random(0,360)
    p_img.gravityScale = 0 -- no gravity
    p_img.restitution = 0.8 -- this image is not so bouncy
    p_img.friction = 0.4 -- the amount of friction to be applied to the image
    p_img.linearVelocity = vec2(math.random(400),math.random(400))  -- velocity
    p_img.info="mine" --so when collisions occur, we can figure out which object was involved
    --p_img.linearDamping = 0.9 -- WHAT DO THESE DO?
    --p_img.angularDamping = 0.9

    --finally the walls
    CreateWalls()
end

--create the walls - physics objects can only bounce off each other
function CreateWalls()
    leftWall = physics.body(EDGE,vec2(1,1),vec2(1,HEIGHT-1)) -- vec2 is a "vector" consisting of an x,y pair
    rightWall = physics.body(EDGE,vec2(WIDTH-1,0),vec2(WIDTH-1,HEIGHT-1)) -- HEIGHT and WIDTH give us screen dimensions
    bottomWall = physics.body(EDGE,vec2(1,1),vec2(WIDTH-1,1)) 
    topWall = physics.body(EDGE,vec2(1,HEIGHT-1),vec2(WIDTH-1,HEIGHT-1))
    --set the bounciness of the walls
    leftWall.restitution=1.0 --no slowing
    rightWall.restitution=0.9 --some slowing
    bottomWall.restitution=0.2 
    rightWall.restitution=0.7
end

function draw()
    background(200,200,200,255)

    --draw the rectangle --
    pushStyle()
    fill(255,0,0,255)
    pushMatrix()
        translate(p_rect.x, p_rect.y)
        rotate(p_rect.angle)
        rect(-rect_width / 2, -rect_height / 2, rect_width, rect_height)
    popMatrix() 
    popStyle()
     -------------------------------

    --draw image ---
    pushMatrix()
        translate(p_img.x, p_img.y)
        rotate(p_img.angle)
        sprite(img,0,0)
    popMatrix() 
    -------------------------------

end
</code></pre>
]]></description>
   </item>
   <item>
      <title>There seems to be an errror with my code, could you please help?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2448/there-seems-to-be-an-errror-with-my-code-could-you-please-help</link>
      <pubDate>Fri, 15 Mar 2013 20:08:49 -0400</pubDate>
      <dc:creator>McPhenom</dc:creator>
      <guid isPermaLink="false">2448@/Codea/Talk/discussions</guid>
      <description><![CDATA[<pre><code>function setup()
    displayMode(FULLSCREEN)
    timerBlueA = 20
    timerBlueB = 300
    timerRedA = 300
    timerRedB = 300
    timerWolves = 60
    timerWraiths = 50
    timerBaron = 420
    timerDragon = 360
    timerGolems = 60
    timerFlashA = 300
    timerFlashB = 300
    timerWard = 180
    runBlueA = false
    runBlueB = false
    runRedA = false
    runRedB = false
    runWolves = false
    runWraiths = false
    runBaron = false
    runDragon = false
    runGolems = false
    runFlashA = false
    runFlashB = false
    runWard = false
end

function draw()
    sprite("Documents:BlueBox",128,640) -- Top Left
    sprite("Documents:BlueBox",128,128) -- Bottom Left
    sprite("Documents:PurpBox", 896,640) -- Top Right
    sprite("Documents:PurpBox",896,128) -- Bottom Right
    sprite("Documents:BlueBuff",128,640) -- Top Left
    sprite("Documents:BlueBuff",896,640) -- Top Right
    sprite("Documents:RedBuff",128,128) -- Bottom Left
    sprite("Documents:RedBuff",896,128) -- Bottom Right
    sprite("Documents:Baron 1",384,384)
    sprite("Documents:Background",512,384)

    if runBlueA == true then
        BlueA()
    end

    if runBlueB == true then
        BlueB()
    end

    if runRedA == true then
        RedA()
    end

    if runRedB == true then
        RedB()
    end

    if runWolves == true then
        Wolves()
    end

    if runWraiths == true then
        Wraiths()
    end

    if runBaron == true then
        Baron()
    end  

    if runDragon == true then
        Dragon()
    end

    if runGolems == true then
        Golems()
    end

    if runFlashA == true then
        FlashA()
    end

    if runFlashB == true then
       FlashB()
    end

    if runWard == true then
        Ward()
    end
end

function touched(t)
    if t.x &lt; 256 and t.y &gt; 512 then
        runBlueA = true
    end -- BlueA

    if t.x &gt; 768 and t.y &gt; 512 then
        runBlueB = true
    end --BlueB

    if t.x &lt; 256 and t.y &lt; 256 then
        runRedA = true
    end --RedA

    if t.x &gt; 768 and t.y &lt; 256 then
        runRedB = true
    end --RedB

-- ERRORS FOR EVERY BOX BELOW THIS LINE
    --[[if t.x &gt; 256 and t.x &lt; 512 and t.y &gt; 512 then
        runWolves = true
    end -- Wolves

    if t.x &gt; 256 and t.x &lt; 512 and t.y &lt; 256 then
        runWraiths = true
    end--]] --Wraiths

    if t.x &gt; 256 and t.x &lt; 512 and t.y &gt; 256 and t.y &lt; 512 then
        runBaron = true
    end --Baron

    --[[if t.x &gt; 512 and t.x &lt; 768 and t.y &gt; 256 and t.y &lt; 512 then
        runDragon = true
    end --Dragon

    if t.x &lt; 256 and t.y &gt; 256 and t.y &lt; 512 then
        runGolems = true
    end --Golems

    if t.x &gt; 512 and t.y &gt; 512 then
        runFlashA = true
    end --FlashA

    if t.x &gt; 512 and t.y &lt; 256 then
        runFlashB = true
    end --FlashB

    if t.x &gt; 768 and t.y &gt; 256 and t.y &lt; 512 then
        runWard = true
    end--]] --Ward
end

function BlueA()
    if timerBlueA &gt; 0 then
        timerBlueA = timerBlueA - DeltaTime
        fontSize(25)
        text(math.ceil(timerBlueA),128,575)
        fill(57, 255, 0, 255) 
    else runBlueA = false
        timerBlueA = 3
    end
end

function BlueB()    
    if timerBlueB &gt; 0 then  
        timerBlueB = timerBlueB - DeltaTime
        fontSize(25)
        text(math.ceil(timerBlueB),896,575)
        fill(57, 255, 0, 255)
    else
        timerBlueA = 300
    end
end

function RedA()
    if timerRedA &gt; 0 then
        timerRedA = timerRedA - DeltaTime
        fontSize(25)
        text(math.ceil(timerRedA),128,63)
        fill(57, 255, 0, 255) 
    else
        timerRedA = 300
    end
end

function RedB()
    if timerRedB &gt; 0 then
        timerRedB = timerRedB - DeltaTime
        fontSize(25)
        text(math.ceil(timerRedB),896,63)
        fill(57, 255, 0, 255) 
    else
        timerRedB = 300
    end
end

function Wolves()
    if timerWolves &gt; 0 then
        timerWolves = timerWolves - DeltaTime
        fontSize(25)
        text(math.ceil(timerWolves),384,575)
        fill(57, 255, 0, 255) 
    else
        timerWolves = 60
    end
end

function Wraiths()
    if timerWraiths &gt; 0 then
        timerWraiths = timerWraiths - DeltaTime
        fontSize(25)
        text(math.ceil(timerWraiths),384,63)
        fill(57, 255, 0, 255) 
    else
        timerWraiths = 50
    end
end

function Baron()
    if timerBaron &gt; 0 then
        timerBaron = timerBaron - DeltaTime
        fontSize(25)
        text(math.ceil(timerBaron),384,319)
        fill(57, 255, 0, 255) 
    else
        timerBaron = 420
    end
end

function Dragon()
    if timerDragon &gt; 0 then
        timerDragon = timerDragon - DeltaTime
        fontSize(25)
        text(math.ceil(timerDragon),640,319)
        fill(57, 255, 0, 255) 
    else
        timerDragon = 360
    end
end

function FlashA()
    if timerFlashA &gt; 0 then
        timerFlashA = timerFlashA - DeltaTime
        fontSize(25)
        text(math.ceil(timerFlashA),640,575)
        fill(57, 255, 0, 255) 
    else
        timerFlashA = 300
    end
end

function FlashB()
    if timerFlashB &gt; 0 then
        timerFlashB = timerFlashB - DeltaTime
        fontSize(25)
        text(math.ceil(timerFlashB),384,63)
        fill(57, 255, 0, 255) 
    else
        timerFlashB = 300
    end
end

function Ward()
    if timerWard &gt; 0 then
        timerWard = timerWard - DeltaTime
        fontSize(25)
        text(math.ceil(timerWard),896,319)
        fill(57, 255, 0, 255) 
    else
        timerWard = 180
    end
end

function Golems()
    if timerGolems &gt; 0 then
        timerGolems = timerGolems - DeltaTime
        fontSize(25)
        text(math.ceil(timerGolems),128,319)
        fill(57, 255, 0, 255) 
    else
        timerGolems = 60
    end
end

</code></pre>

<p>Anything besides blueA, blueB, RedA,RedB isnt working. Each has this error: the initial time comes up, then it counts down 1 second and puts that on top of that initial time. It's weird because its almost the same code for BlueA and Baron, yet Baron has the error. Thanks for helping, i look forward to your replies.</p>
]]></description>
   </item>
   <item>
      <title>Problem with physics.raycast</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2444/problem-with-physics-raycast</link>
      <pubDate>Fri, 15 Mar 2013 03:23:47 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2444@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I'm building a very simple top down 2D track which is a plain image with a track cut out of it. I have built a series of physics edge lines that follow the inner and outer edges of the track, and I wanted to use raycast to look ahead to see where the track is going, using these edges.</p>

<p>The problem, as this little video shows </p><div class="Video"><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/GtscyFQd_Yg&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/GtscyFQd_Yg&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" width="640" height="385" /></object></div> (red track boundary shows physics edges, rays are shown in green) is that it works fine for a while, then suddenly the raycast seems to skip the closest track wall and see the one beyond it, or maybe a further one. I thought maybe it was seeing though the joins in the edges, so I overlapped them, but it doesn't make any difference.

<p>Perhaps I shouldn't be using raycast, but I thought it was a nice way to get to grips with it.</p>
]]></description>
   </item>
   <item>
      <title>List of apps</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2434/list-of-apps</link>
      <pubDate>Wed, 13 Mar 2013 13:29:32 -0400</pubDate>
      <dc:creator>Luatee</dc:creator>
      <guid isPermaLink="false">2434@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Is there a way to look through all the files on a device, such as apps directory to get a list of apps and reading the icon images for sprites? Im thinking of making a dynamic app board where i can use the files in the apps folder such as the icon to make physical bodies which i can click (using openURL) and manipulate the bodies like a physical sandbox</p>
]]></description>
   </item>
   <item>
      <title>threading model, touched() and collide()</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2438/threading-model-touched-and-collide</link>
      <pubDate>Wed, 13 Mar 2013 18:31:44 -0400</pubDate>
      <dc:creator>bm212</dc:creator>
      <guid isPermaLink="false">2438@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Do calls to touched() and collide() happen on the same thread as the draw() call in Codea?  I'm seeing some non-deterministic bugs in my code that seem to happen when there are lots of physics bodies hitting each other, and was wondering if I need to worry about access to meshes etc from multiple threads. (it is of course totally plausible that I've causing this problem in a less esoteric manner, was just curious about the threading model in Codea)</p>
]]></description>
   </item>
   <item>
      <title>iExplorer problem</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2433/iexplorer-problem</link>
      <pubDate>Wed, 13 Mar 2013 13:18:58 -0400</pubDate>
      <dc:creator>HyroVitalyProtago</dc:creator>
      <guid isPermaLink="false">2433@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>When i try to paste or make new folder =&gt; Permission denied. Any suggestion ?</p>
]]></description>
   </item>
   <item>
      <title>Best Lua JSON library</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/1919/best-lua-json-library</link>
      <pubDate>Sat, 24 Nov 2012 02:37:59 -0500</pubDate>
      <dc:creator>Simeon</dc:creator>
      <guid isPermaLink="false">1919@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi Everyone</p>

<p>If we were to include a JSON library in the next version of Codea, which one would you like to see? Or what would your ideal Lua interface for JSON look like?</p>
]]></description>
   </item>
   <item>
      <title>upload the app</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2426/upload-the-app</link>
      <pubDate>Wed, 13 Mar 2013 05:29:01 -0400</pubDate>
      <dc:creator>Mohammad_abumoosa</dc:creator>
      <guid isPermaLink="false">2426@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>how i can uplode my app i have finish the game</p>
]]></description>
   </item>
   </channel>
</rss>