<?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>General - Codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/categories/general/feed.rss</link>
      <pubDate>Sun, 19 May 13 15:35:55 -0400</pubDate>
         <description>General - Codea</description>
   <language>en-CA</language>
   <atom:link href="/Codea/Talk/discussions/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Codea Competition: Survival games</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2805/codea-competition%3A-survival-games</link>
      <pubDate>Sat, 18 May 2013 13:51:55 -0400</pubDate>
      <dc:creator>Zoyt</dc:creator>
      <guid isPermaLink="false">2805@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello,<br />
There has been a microscopic ammount of interest in a Codea Competition, so I thought it wouldn't hurt to host one. Here we go:<br />
Theme: Survival games
Make a game where the player has to last as long as possible without loosing or dying. Some examples of these are Jet Pack Joy Ride, Snake, Missile Defense, Crabitron, etc. Some Codea-made examples are TouchLine and Big Bigger, which could be entered into the competition.<br />
Rules:<br />
 • I suggest that the game has a start, game, and loosing screen.<br />
 • Make it look pretty. A large part of what makes a game good is its effects and graphics. 3D is even better.<br />
 • Please do not copy other games exactly. If you aren't inspired, give the game concept a new twist.<br />
 • The game shouldn't crash.<br />
 • The game should either be locked to one orientation, or resize in landscape and portrait orientation.<br />
 • The game should look or be complete.<br />
 • You may work with others, just let me know who else you worked with.<br />
 • Feel free to make a development thread. People love to see what others are working on.<br />
 • Enter your entry by June 7. I will release my verdict and feedback on all the code and give away the prizes on June 10.</p>

<p>How to enter:<br />
There are a few ways to enter your app.<br />
1. If your app is already on the App Store and is free, then give me a link to it.<br />
2. If you app is on the App Store and is paid, send me a redemption code for it.<br />
3. If you have the code for your game, but it isn't on the App Store, then you can email the code to zoyt12 (at) gmail (dot) com.<br />
4. You can also send me a private message to me with the code in it or a conversation thread with the code in it.<br />
If you have the game in code form, please send me the name of the game.</p>

<p>Entries:<br />
I will post the name of the game and the creator here when I get some entries.</p>

<p>Prizes:<br />
First:<br />
$20 at thatdevelopermarketplace.com<br />
Second:<br />
2 weeks of ad space at thatdevelopermarketplace.com</p>

<p>Please throw in a little something for prizes. It could be anything worthwhile, wether it's a snippet of code or a redemption code for your app. PM me anything you would be willing to throw in.</p>

<p>Thanks, and good luck!</p>
]]></description>
   </item>
   <item>
      <title>Indie Game Blog - Tutorials &amp; More</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2801/indie-game-blog-tutorials-more</link>
      <pubDate>Sat, 18 May 2013 04:13:58 -0400</pubDate>
      <dc:creator>ThermoApps</dc:creator>
      <guid isPermaLink="false">2801@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Indie game blog @ <a href="http://thatdevelopermarket.com/?page_id=365" target="_blank" rel="nofollow">http://thatdevelopermarket.com/?page_id=365</a></p>

<p>We blog about games &amp; Development, 
If you want us to post about your new game, Don't be shy... We're indies too!</p>

<p>Some of our favourite articles:
Learn to program in iOS Lesson 1 : <a href="http://thatdevelopermarket.com/?p=453" target="_blank" rel="nofollow">http://thatdevelopermarket.com/?p=453</a>
The Pschology of game development: Attractong customers like corporates - <a href="http://thatdevelopermarket.com/?p=392" target="_blank" rel="nofollow">http://thatdevelopermarket.com/?p=392</a></p>

<p>If you'd like to submit some codea tuts to us, I'd be more than delighted to put them up, I'll also include all your links and data. 
For the store we have over 400 visitors per week, It's great to attract some attention to show how powerful codea actually is!</p>

<p>All the best,
Jack :-)</p>
]]></description>
   </item>
   <item>
      <title>AutoGist v2.05 - Backup your projects by changing a version number.</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-05-backup-your-projects-by-changing-a-version-number</link>
      <pubDate>Thu, 09 May 2013 13:42:20 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2744@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>*Project MUST be named "AutoGist". This is case sensitive.</p>

<p><em>New</em> AutoGist Installer: <a href="https://gist.github.com/briarfox/5562489" target="_blank" rel="nofollow">https://gist.github.com/briarfox/5562489</a></p>

<p>The Installer is one file. Copy it and paste it over main in a newly created project named AutoGist. Then just run it twice! Thanks to <a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a> for the code.</p>

<p>AutoGist code - <a href="https://gist.github.com/briarfox/5525674" target="_blank" rel="nofollow">https://gist.github.com/briarfox/5525674</a></p>

<p>AutoGist 2.0 is here! First you will need to create a Github account @ <a href="http://www.github.com" target="_blank" rel="nofollow">http://www.github.com</a></p>

<p>-Open AutoGist and supply your username and password. These are not saved and only need to be used once. After you Authenticate it will save your Github token as a global.</p>

<p>-Exit and reload AutoGist</p>

<p>-You can now use AutoGist to pull full projects from a gist id. You Simply create a blank project, open AutoGist Enter the project name and the gist ID from the gist you want to pull.</p>

<p>-AutoGist can now create a single file that will install all tabs from a Gist. This makes it easy for people who do not have a Gist app. Simply Enter the Name of the Project and the gist id from it's gist. A new gist will be created with one file. That files is ran in place of main and will install the project all in separate tabs.</p>

<p>-You can comment out code that you do not want to appear in the Gist. use</p>

<pre><code>--to comment out code do
--/*
code to comment out
--*/
</code></pre>

<p>This is how you include AutoGist into your project to backup.</p>

<pre><code>To backup your projects you simply add this to your main file and include AutoGist in your project:
VERSION = your version number 
-- When this number changes it will update your Gist. 

BUILD = true/false 
--BUILD will create a separate gist for builds when set to true, version is ignored

In setup add:
AutoGist.setProjectInfo("YOUR CODEA PROJECT NAME","AUTHOR","DESCRIPTION",VERSION)
 -- VERSION should be the variable used in setting the version at the top.
AutoGist.backup()
 -- if you pass true in backup, your Version gist will be public.
</code></pre>

<p>Thats it! Future update will include Version tracking as a tab within Codea.</p>
]]></description>
   </item>
   <item>
      <title>Spritely to Dropbox</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2803/spritely-to-dropbox</link>
      <pubDate>Sat, 18 May 2013 12:17:32 -0400</pubDate>
      <dc:creator>JakAttak</dc:creator>
      <guid isPermaLink="false">2803@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>If any of you use the Spritely example program for images, here is a quick little program that saves an image made in Spritely to your Dropbox</p>

<pre><code><br />--# Main
-- SpritelyToDropbox

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")
    aloader = SpritelyLoader()

    -- Change "YourImageNameHere" to the name of your image
    Name = "YourImageNameHere"
end

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

    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    createImage = loadstring( readProjectData(Name))
    anImage = createImage() 

    saveImage("Dropbox:"..Name, anImage)

    -- Quits program as soon as image is saved
    close()

end


--# SpritelyLoader
SpritelyLoader = class()

-- SpriteLoader 
-- ver. 1.0
-- moves data from global to project storage
-- ====================

-- This class takes data from global and dumps it into your project.
-- 
-- To use this class, create an instance in your project.
-- For example:  aloader = SpritelyLoader()
--
-- This call will read both keys and images from the global Spritely
-- storage and copy them into your project space. 
--
-- Once in the project data, load the saved string to 
-- an image using it's key.  For example:
--
-- createImage = loadstring( readProjectData("bob"))
-- anImage = createImage() 

-- To display your images, you'll need to load them into
-- a sprite. The command looks like this

-- sprite(anImage, 100, 100, 32, 32)

-- Good luck!

function SpritelyLoader:init()
    local keys, k, s
    if readGlobalData("SpritelyKeys") == nil then
        print("No Spritely data found.")
    else
        -- read global keys
        keys = readGlobalData("SpritelyKeys")
        saveProjectData("SpritelyKeys", keys)
        print("Moving...")
        for k in string.gmatch(keys,"([^,]+)") do
            print(k)
            s = readGlobalData(k)
            saveProjectData(k, s)
        end
        print("Move complete.")
    end

end
</code></pre>

<p>Just change Name =  "YourImageNameHere" to your image name and after running the program sync your Dropbox from within Codea</p>

<p>Also note, if you want it to save to documents just change saveImage("Dropbox:") to saveImage("Documents:") 
The program is supposed to close as soon as the image is saved so do not be alarmed when it quits, the image should have been saved</p>

<p>Enjoy!</p>
]]></description>
   </item>
   <item>
      <title>Interesting - a Codea programming workshop held recently</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2809/interesting-a-codea-programming-workshop-held-recently</link>
      <pubDate>Sun, 19 May 2013 05:20:09 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2809@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p><a href="http://dcdoolan.wordpress.com/2013/05/14/ipads-galore-codea-ipad-programming-workshop/" target="_blank" rel="nofollow">http://dcdoolan.wordpress.com/2013/05/14/ipads-galore-codea-ipad-programming-workshop/</a></p>
]]></description>
   </item>
   <item>
      <title>thoughts on saveLocalData</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2808/thoughts-on-savelocaldata</link>
      <pubDate>Sun, 19 May 2013 01:32:09 -0400</pubDate>
      <dc:creator>se24vad</dc:creator>
      <guid isPermaLink="false">2808@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>hey folks,
I somewhat guessed it but now tested and found out, that saveLocalData saves information under a "global" key. Which means, saving information from class instances(!), causes the key to get overriden!</p>

<p>What are your thoughts - how could this problem be solved in an elegant way?
My first idea would be to save all instances in a table and save this table to LocalData. Any other ideas? Any suggestions how to approach this?</p>
]]></description>
   </item>
   <item>
      <title>Loving Logitech FabricSkin Keyboard Folio</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2804/loving-logitech-fabricskin-keyboard-folio</link>
      <pubDate>Sat, 18 May 2013 13:19:27 -0400</pubDate>
      <dc:creator>Zoyt</dc:creator>
      <guid isPermaLink="false">2804@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello,<br />
Yesterday I just got my Logitech FabricSkin Keyboard Folio for $150. I thought I might let you guys know if it's a good purchase for coding, because most keyboard reviews are not aimed for coders.<br />
Anyways, when I first open up the keyboard and set it up, it looked and acted amazing. When you link the iPad with the correct magnetic spot, the keyboard would automatically turn on. When you unlink it, it turns off. That way, when it is normal using mode (whith the keyboard part folded back), you don't have to worry about keys being pressed. This may sound like a slow process and a battery waister, but turning/connecting it on and off takes less than a second. The keyboard automatically pops up when you disconnect it. Goodbye power buttons.<br />
As for the battery, I'd say I've been using it about 8 hours already, without running out. It will probably take a month for it to run out.
There were some complaints about the keys being too far apart, but for me, it only took a few lines of code to get use to it. I usually type about 70-80 words per minute, and I'm at about 60 on here. On the normal iPad screen, I'm at about 35.<br />
Some users complained about the number keys being clumsy, but I'm not having a single issue. The keys are lined up at the top as home, 1-0,-,=, and delete.<br />
One of my only complaints that isn't really fixable is the tab. For certain keys, like the caps loc, tab, iOS specific function, ~, and ` you need to hold the "fn" key to access. That can be onoying when you have to use the tab key a lot. Thank heavens for automatic tabbing.
Typing in characters other languages is still easy on the keyboard just like on iOS. On iOS, you have to tap and holdon a letter to access a key in another language. On a keyboard, just like on the Mac, you press "alt" and a key that represents the type of cahracter, then press the character and you're done. For instance, here is my name in Spanish (it's original version): Natãn.<br />
My rating for this is a 4.9/5. If there was such a thing as a perfect keyboard, this is as close as you'll get.<br />
- Type on a Logitech FabricSkin Keyboard Folio<br />
Bonus - The keyboard is waterproof, but I haven't tried that out, and I don't plan to.</p>
]]></description>
   </item>
   <item>
      <title>Big Bigger - A Game Made with Codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2781/big-bigger-a-game-made-with-codea</link>
      <pubDate>Wed, 15 May 2013 04:35:53 -0400</pubDate>
      <dc:creator>wave</dc:creator>
      <guid isPermaLink="false">2781@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>It's available now for $0.99. You can download it from the link below.</p>

<p><a href="https://itunes.apple.com/us/app/big-bigger/id640028352?ls=1&amp;mt=8" target="_blank" rel="nofollow">https://itunes.apple.com/us/app/big-bigger/id640028352?ls=1&amp;mt=8</a></p>

<p>Thanks to people who helped me learn to code in Codea. And all beta testers who helped improve this game a lot.</p>

<p>Thank you Simeon and TwoLivesLeft for Codea too :)</p>

<p>I use Codea Splash Screen in this game, hope it helps people know about Codea more.</p>

<p>Here are some promo codes</p>

<p>Y9WP47H3T4YK</p>

<p>FHJWAT9RHPLL</p>

<p>W4NLE3XJ93L6</p>

<p>3RTPY746XNEK</p>

<p>RYJRR9RLL6XE</p>
]]></description>
   </item>
   <item>
      <title>math.probablity</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2802/math-probablity</link>
      <pubDate>Sat, 18 May 2013 07:39:08 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2802@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Is there a way to set probablity between two things? Let say I want one photo to pop 80% of the times and another one to pop 20% of the times. Is there a shortcut to do so. I've written this code but it'll be better if there's a shorter way.</p>

<pre><code><br />--# Main

--# Main
function setup()
    photo = {}
    photo[1] = readImage("Cargo Bot:Codea Icon")
    photo[2] = readImage("Cargo Bot:Codea Logo")
    t = 5
    i = 1
    previousi = 1
    twop = 0
    onep = 0
    parameter.watch("percenttwo")
end

function draw()
    background(255, 255, 255, 255)
    t = t-1
    if t==0 then
        i = math.random(1,10)
        if i==previousi then t=1 else
            t = 5
            previousi = i
        end
    end
    if i&lt;=8 then
        p = 1
        onep = onep+1
    elseif i&gt;8 then
        p = 2
        twop = twop+1
    end
    percenttwo = (twop/(twop+onep))*100
    sprite(photo[p],WIDTH/2,HEIGHT/2)
end

</code></pre>
]]></description>
   </item>
   <item>
      <title>Random photos code</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2797/random-photos-code</link>
      <pubDate>Fri, 17 May 2013 06:31:34 -0400</pubDate>
      <dc:creator>Mohammad_abumoosa</dc:creator>
      <guid isPermaLink="false">2797@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Pleas i want a code to help me take a random pictures to play on it</p>

<p>Random photo code</p>
]]></description>
   </item>
   <item>
      <title>iPad resolution</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2800/ipad-resolution</link>
      <pubDate>Fri, 17 May 2013 21:27:19 -0400</pubDate>
      <dc:creator>dreamergb</dc:creator>
      <guid isPermaLink="false">2800@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Since I use Codea to code my games, I do it on an iPad mini. Today, I got an iPad 4th generation Retina to test my games in 2048x1536 and I wanted to see the resolution in a test project using the print(WIDTH) and print(HEIGHT). I was surprised to see that it showed 1024x768 !!!!!!!!!! Codea does not seem to properly recognize the resolution!!! Any comments?</p>
]]></description>
   </item>
   <item>
      <title>How to creat a main menu with a select botton</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/1445/how-to-creat-a-main-menu-with-a-select-botton</link>
      <pubDate>Mon, 30 Jul 2012 08:15:23 -0400</pubDate>
      <dc:creator>Mohammad_abumoosa</dc:creator>
      <guid isPermaLink="false">1445@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Pleas can any one help me i want to creat a main menu with a select botton but i dont now what is the code and i want it 3 select bouttun firs eazy go to eazy game normal go normal game hard go to hard game i have a gift for the best answer</p>
]]></description>
   </item>
   <item>
      <title>Endless</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/852/endless</link>
      <pubDate>Sun, 15 Apr 2012 12:23:22 -0400</pubDate>
      <dc:creator>Mark</dc:creator>
      <guid isPermaLink="false">852@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I haven't been able to spend as much time coding lately as I would like, but I have been knocking around one project I hope to get out soon.</p>

<p>Endless is a "roguelike" adventure game where you troop through randomly generated levels facing... well, endless numbers of monsters, discovering endless keys, opening endless chests, and descending endless staircases to the next level.  Each level has a different sets of creatures, with difficulty that is always increasing. Likewise, weapons become more powerful and your character's abilities increase.</p>

<p>I've stripped the statistics down to a bare minimum (attack, defense, health) so at the moment there are no ranged weapons or magical attacks. I hope to work those in later.  At the moment, all the graphics come from standard sprite packs.  I'll improve on that with time, but don't really have plans to take this beyond the traditional 2D view..</p>

<p>Hopefully, I'll get an initial version out in the next week or so.  Soon you too can discover a Balanced Sword of Unyielding Vorpalness and face off with a Deadly Whispering Spider.</p>

<p>Suggestions are welcome.</p>

<p><a href="http://db.tt/m22Cd66f" target="_blank" rel="nofollow">http://db.tt/m22Cd66f</a></p>
]]></description>
   </item>
   <item>
      <title>RSS feed reader possible in codea?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2776/rss-feed-reader-possible-in-codea</link>
      <pubDate>Tue, 14 May 2013 14:56:37 -0400</pubDate>
      <dc:creator>ThermoApps</dc:creator>
      <guid isPermaLink="false">2776@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Just wondering if you more experienced codea guys would say an RSS feed reader is possible on Codea, I'm aware it's possible in Corona (An other LUA engine) with JSON and a few API calls, But I'm wondering would it be possible in Codea?</p>

<p>Jack</p>
]]></description>
   </item>
   <item>
      <title>background sounds?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2782/background-sounds</link>
      <pubDate>Wed, 15 May 2013 10:09:17 -0400</pubDate>
      <dc:creator>jugade92</dc:creator>
      <guid isPermaLink="false">2782@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>How can i insert in my game my own audio/sound using Codea?</p>

<p>Regards</p>
]]></description>
   </item>
   <item>
      <title>Roadmap update?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2779/roadmap-update</link>
      <pubDate>Wed, 15 May 2013 01:23:47 -0400</pubDate>
      <dc:creator>Jmv38</dc:creator>
      <guid isPermaLink="false">2779@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello Simeon and John. Could you tell us the direction you are taking for nex Codea release? Has been quite some time without any sign from you guys (not a complain, just a worry).</p>
]]></description>
   </item>
   <item>
      <title>Console.Alert</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2783/console-alert</link>
      <pubDate>Wed, 15 May 2013 13:08:15 -0400</pubDate>
      <dc:creator>CodeaNoob</dc:creator>
      <guid isPermaLink="false">2783@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Would it be possible to add console.alert or something like it to Codea? Or does something like it already out there?</p>
]]></description>
   </item>
   <item>
      <title>Free Graphics for your projects</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2786/free-graphics-for-your-projects</link>
      <pubDate>Wed, 15 May 2013 16:01:27 -0400</pubDate>
      <dc:creator>ThermoApps</dc:creator>
      <guid isPermaLink="false">2786@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hey All,</p>

<p>Just want to share some free graphics for your projects in this thread :-) I think they might be useful for some of you anyway :)</p>

<p>All are free to use in commercial apps/games</p>

<p>Jack</p>
]]></description>
   </item>
   <item>
      <title>Hello - I&#039;m new to this community</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2765/hello-i-m-new-to-this-community</link>
      <pubDate>Mon, 13 May 2013 14:14:01 -0400</pubDate>
      <dc:creator>ThermoApps</dc:creator>
      <guid isPermaLink="false">2765@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hey All,</p>

<p>You may have seen me in one of my other threads :) Didn't go as we'll as I thought it would, However I've decided to introduce myself,</p>

<p>My name is Jack, I'm from Ireland, I've been developing for 4 years, Mainly Lua, I'm a 100% Corona SDK developer, It's quite different to codea, Apart from the language itself of course! It's a very new experience developing on my iPad,</p>

<p>You can view my website here: <a href="http://thermo-apps.com" target="_blank" rel="nofollow">http://thermo-apps.com</a></p>

<p>I also run a small online marketplace for developers for game assets like sounds, graphics and code: <a href="http://ThatDeveloperMarket.com" target="_blank" rel="nofollow">http://ThatDeveloperMarket.com</a></p>

<p>I look forward to integrating with the community here,</p>

<p>Thank you,</p>

<p>J</p>
]]></description>
   </item>
   <item>
      <title>[REMOVED] Gister  - AutoGist contains the functionality</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2785/removed-gister-autogist-contains-the-functionality</link>
      <pubDate>Wed, 15 May 2013 15:07:36 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2785@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Removed Gister as AutoGist can be used the same way</p>

<p>AutoGist - <a href="http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-05-backup-your-projects-by-changing-a-version-number/p1" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-05-backup-your-projects-by-changing-a-version-number/p1</a></p>
]]></description>
   </item>
   <item>
      <title>3d texture mesh</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2773/3d-texture-mesh</link>
      <pubDate>Tue, 14 May 2013 12:56:04 -0400</pubDate>
      <dc:creator>Mnjk78lg</dc:creator>
      <guid isPermaLink="false">2773@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>When you create a 3d shape can you have each side show a different texture or picture</p>
]]></description>
   </item>
   <item>
      <title>How to print Console errors to screen</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2777/how-to-print-console-errors-to-screen</link>
      <pubDate>Tue, 14 May 2013 16:12:40 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2777@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I was browsing some older code on the forums and found a class that would let you output log() to screen. I simply overloaded the print() function so anything in print gets sent to the screen. However, I'm not sure what to override to get any of the red/orange errors that can pop up in the command console.</p>

<p>Goal is to create a class that allows command input and output from the screen so I do not have to have the parameters window open. Just can't figure out how to catch the errors.</p>
]]></description>
   </item>
   <item>
      <title>Codea Project and Utility Links</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2758/codea-project-and-utility-links</link>
      <pubDate>Mon, 13 May 2013 03:14:13 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2758@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I was thinking that it might be a good idea to have a thread with all the links to various utilities, projects and tutorials. I'll be doing my best to add whats on the forum but the search function is lacking. Please PM me with anything I might have missed. If we could get a Mod to sticky this it would be great!</p>

<h2>Projects</h2>

<p>Ballon Game - <a href="http://twolivesleft.com/Codea/Talk/discussion/2701/ballons-game#Item_7" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2701/ballons-game#Item_7</a></p>

<p>Grass and Wind - <a href="http://twolivesleft.com/Codea/Talk/discussion/2698/grass-and-wind#Item_3" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2698/grass-and-wind#Item_3</a></p>

<h2>Utilities</h2>

<p>Gister gists your project- <a href="http://twolivesleft.com/Codea/Talk/discussion/comment/21842#Comment_21842" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/comment/21842#Comment_21842</a></p>

<p>AutoGist Version control with gist- <a href="http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-0-backup-your-projects-as-a-gist#Item_23" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-0-backup-your-projects-as-a-gist#Item_23</a></p>

<p>Cider 1.6 UI controls - <a href="http://twolivesleft.com/Codea/Talk/discussion/comment/21784#Comment_21784" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/comment/21784#Comment_21784</a></p>

<p>Cider 2 Windowed - <a href="http://twolivesleft.com/Codea/Talk/discussion/2168/cider2-windowed-controls#Item_41" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2168/cider2-windowed-controls#Item_41</a></p>

<p>Zoom Library - <a href="http://twolivesleft.com/Codea/Talk/discussion/550/zoom-library#Item_16" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/550/zoom-library#Item_16</a></p>

<p>TexturePacker - <a href="http://twolivesleft.com/Codea/Talk/discussion/1862/texturepacker-exporters-for-codea-easy-sprite-sheet-import-and-use#Item_29" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/1862/texturepacker-exporters-for-codea-easy-sprite-sheet-import-and-use#Item_29</a></p>

<p>Simple Timer Class - <a href="http://twolivesleft.com/Codea/Talk/discussion/2600/simple-timer-class-to-speed-up-your-game-development#Item_7" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2600/simple-timer-class-to-speed-up-your-game-development#Item_7</a></p>

<p>Windows Utility - <a href="http://twolivesleft.com/Codea/Talk/discussion/2542/a-windows-utility#Item_40" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2542/a-windows-utility#Item_40</a></p>

<h2>Tutorials</h2>

<p>Andrew Stacey Code - Library <a href="http://www.math.ntnu.no/~stacey/HowDidIDoThat/iPad/Codea.html" target="_blank" rel="nofollow">http://www.math.ntnu.no/~stacey/HowDidIDoThat/iPad/Codea.html</a></p>

<p>Reefwing Tutorials - <a href="http://codeatuts.blogspot.fr/?m=1" target="_blank" rel="nofollow">http://codeatuts.blogspot.fr/?m=1</a></p>

<p>Vega Mesh Tutorial - <a href="http://twolivesleft.com/Codea/Talk/discussion/1244/mesh-tutorial/p1" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/1244/mesh-tutorial/p1</a></p>

<p>Ignatz Tutorials - <a href="https://coolcodea.wordpress.com/" target="_blank" rel="nofollow">https://coolcodea.wordpress.com/</a></p>

<p>Jmv38 Tutorials -  <a href="http://jmv38.comze.com/CODEAbis/server.php#3D" target="_blank" rel="nofollow">http://jmv38.comze.com/CODEAbis/server.php#3D</a></p>
]]></description>
   </item>
   <item>
      <title>Pretty printing a table</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2759/pretty-printing-a-table</link>
      <pubDate>Mon, 13 May 2013 05:41:54 -0400</pubDate>
      <dc:creator>Ceres</dc:creator>
      <guid isPermaLink="false">2759@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>For debugging, I'd like to print the contents of a table.  I'm sure that I saw something like this here in one of the discussions, but now I can't find it.  Can anyone point it out?  Thanks.</p>
]]></description>
   </item>
   <item>
      <title>Portal flash version on codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2760/portal-flash-version-on-codea</link>
      <pubDate>Mon, 13 May 2013 07:20:29 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2760@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I tried to make portal 2d on codea and made quite a few things and then thought lets make a level(cause the first few wont have much complications in them). I made the first level and then the second one and tried shifting between them using FSM. But unfortunately if I switch rapidly codea crashes sometimes it doesn't and sometimes if I just switch it crashes. Here's the code I wrote  <a href="https://gist.github.com/Saurabh96jun/5567707" target="_blank" rel="nofollow">https://gist.github.com/Saurabh96jun/5567707</a>. If anyone finds a solution please help me out.</p>
]]></description>
   </item>
   <item>
      <title>Detect collide</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2763/detect-collide</link>
      <pubDate>Mon, 13 May 2013 12:52:30 -0400</pubDate>
      <dc:creator>Mnjk78lg</dc:creator>
      <guid isPermaLink="false">2763@/Codea/Talk/discussions</guid>
      <description><![CDATA[<pre><code>-- construction dodge

function setup()
    parameter.watch("t")
    parameter.watch("Score")
    parameter.watch("gm")
    displayMode(FULLSCREEN)
    l= HEIGHT-50
    Helicopter:init()
    Ball:init()
    w={}
    table.insert(w,Wood())
    end
    gm=2
s=0
t=5
function draw()
    --gm 0 is debug
    --gm 1 is game
    --gm 2 is menu
    --gm 3 is gameover
    if gm==0 or 1 then
    s = s + 1
    end
    if gm==2 then
    background(78, 79, 59, 255)

    if CurrentTouch.tapCount==2 then
       gm=1
    end
    end
    if gm==1 then
    Score= math.floor(s)

    background(26, 164, 24, 255)
    sprite("Documents:bricks",WIDTH/2,HEIGHT/2,WIDTH,HEIGHT)
    text(Score,WIDTH/2,HEIGHT-20)
    for i,ww in pairs(w) do
        ww:draw()
        fill(198, 198, 198, 255)
        pushMatrix()
        pushStyle()
        popStyle()
        popMatrix()

            if CurrentTouch.state==BEGAN then
                Helicopter:touched()
            elseif CurrentTouch.state==MOVING then
                Helicopter.touched()
                elseif CurrentTouch.state==ENDED then
                    l = l - 5
                end
        Helicopter:draw()
        if l&gt;= HEIGHT then
            l=HEIGHT
            end
        if l&lt;=0 then
            l=0
            end
            end

    end
end
</code></pre>

<pre><code><br />Helicopter = class()

function Helicopter:init()
    -- you can accept and set parameters here

    self.yx = l
end

function Helicopter:draw()

    fill(222, 222, 222, 255)  
    circle=physics.body(CIRCLE,30)
    circle.type=STATIC
    circle.x=WIDTH-50
    circle.y=l



    sprite("Dropbox:funny",WIDTH-50,l,20,20)
    -- Codea does not automatically call this method
end

function Helicopter:touched(touch)
            l = l + 5
    -- Codea does not automatically call this method
end
</code></pre>

<pre><code><br />Wood = class()
q=0.001
function Wood:init()
    self.x = -200

    self.size = 50
    self.y = math.random(50,HEIGHT-500)
    self.y3= math.random(self.y,self.y+400)

end    

function Wood:draw()
 q = q + 0.01
self.y2 = self.y + 500
    t = t + .001
    if t&gt;= 60 then
        t = 60
        end
    self.x = self.x + t
    self.y2 = self.y2 - 0.001
    a=self.x
    b=self.y
    if self.x&gt;WIDTH+200 then
        table.remove(w)
        table.insert(w,Wood())


    end

    pushStyle()
    strokeWidth(2)
    stroke(255)
    line(self.x,0,self.x,self.y)
    line(self.x,HEIGHT,self.x,self.y2)
    line(self.x,self.y3,self.x,self.y3+200)
    popStyle()
    fmesh=mesh() 
    fmesh.vertices= {vec2(self.x-200,0),
                     vec2(self.x,self.y),
                     vec2(self.x+200,0)}
    fmesh.texCoords= {vec2(0,0),
                      vec2(1,0),
                      vec2(1,1)}
    fmesh.texture = "Documents:stone"
    fmesh:setColors(255,255,255,255)
    tmesh=mesh()
    tmesh.vertices= {vec2(self.x-200,HEIGHT),
                     vec2(self.x,self.y2),
                     vec2(self.x+200,HEIGHT)}
    tmesh.texCoords= {vec2(0,0),
                     vec2(1,0),
                     vec2(1,1)}
    tmesh.texture= "Documents:stone"
    tmesh:setColors(255,255,255,255)
    fmesh:draw()
    tmesh:draw()
end
</code></pre>

<p>My question is how can I make it so that its game over if the red dot touches eather the very top very bottom the triangle rocks and the line inbettween if anyone can do it that will be great</p>
]]></description>
   </item>
   <item>
      <title>mesh mooving</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2768/mesh-mooving</link>
      <pubDate>Mon, 13 May 2013 19:26:38 -0400</pubDate>
      <dc:creator>Cabernet</dc:creator>
      <guid isPermaLink="false">2768@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi there,</p>

<p>I need help with mesh and ball movement. The ball have to move only on y-axis, so it looks like it is "not moving". And ground movement is based on how fast ball is moving on x-axis. As you can see on video it is too fast, i just can't find right formula. thanks</p>

<p></p><div class="Video"><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/VnoLdFGcO6o&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/VnoLdFGcO6o&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" width="640" height="385" /></object></div>
]]></description>
   </item>
   <item>
      <title>RSS Feed</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2767/rss-feed</link>
      <pubDate>Mon, 13 May 2013 19:03:05 -0400</pubDate>
      <dc:creator>LizzyClub</dc:creator>
      <guid isPermaLink="false">2767@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>How would I make a RSS feed of my blog without making it exit the app? I want it to only show the images that I post though?</p>
]]></description>
   </item>
   <item>
      <title>Getting Project name</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2705/getting-project-name</link>
      <pubDate>Sat, 04 May 2013 20:40:27 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2705@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Is there a way to get the name of the project you are working on in codea? It appears that readProjectInfo() only has the preset Description and Author values.</p>
]]></description>
   </item>
   <item>
      <title>I know I shouldn&#039;t do this</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2764/i-know-i-shouldn-t-do-this</link>
      <pubDate>Mon, 13 May 2013 13:50:40 -0400</pubDate>
      <dc:creator>Mnjk78lg</dc:creator>
      <guid isPermaLink="false">2764@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>But time is of the essence
My other discussion called detect collide needs to be answered
Because restrictions I can't come back on tell tomorrow</p>
]]></description>
   </item>
   <item>
      <title>IOS development with Codea --Updated movement</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2753/ios-development-with-codea-updated-movement</link>
      <pubDate>Sun, 12 May 2013 03:39:07 -0400</pubDate>
      <dc:creator>Thwapp</dc:creator>
      <guid isPermaLink="false">2753@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>If anyone is interested here is the blog <a href="http://vidopiac.blogspot.com/" target="_blank" rel="nofollow">http://vidopiac.blogspot.com/</a></p>
]]></description>
   </item>
   <item>
      <title>Direction of a vector</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2751/direction-of-a-vector</link>
      <pubDate>Sat, 11 May 2013 06:02:35 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2751@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>If I want a physics body to move in a particular direction that is decide by two other vec2's. but the velocity of the object I want to move is decided by me then how can I find the direction of the vector formed by the other two vectors. I tried this but it only gave me four direction, ofcourse because the velocities would be + or - 100 depending on the value of math.abs(v3.x or v3.y)</p>

<pre><code><br />--# Main
function setup()
    b = physics.body(CIRCLE,10)
    b.x = WIDTH/2
    b.y = HEIGHT/2
    physics.gravity(0,0)
end

function draw()
    background(255, 255, 255, 255)
    fill(0, 0, 0, 255)
    ellipse(b.x,b.y,20)
    v1 = vec2(b.x,b.y)
end

function touched(touch)
    tx = touch.x
    ty = touch.y
    if touch.state == BEGAN then
        v2 = vec2(tx,ty)
        v3 = v2-v1
        b.linearVelocity = vec2(100*v3.x/math.abs(v3.x),100*v3.y/math.abs(v3.y))
    end
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Major Codea Bug</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2747/major-codea-bug</link>
      <pubDate>Thu, 09 May 2013 18:45:03 -0400</pubDate>
      <dc:creator>JakAttak</dc:creator>
      <guid isPermaLink="false">2747@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p><a rel="nofollow" href="/Codea/Talk/profile/Simeon">@Simeon</a>, <a rel="nofollow" href="/Codea/Talk/profile/John">@John</a> 
Hey so I just opened up Codea and it has become very weird...
Here are some pics:</p>

<p>As I edit: <a href="https://www.dropbox.com/s/f4efa9eqa224sdi/Photo%20May%2009%2C%203%2042%2059%20PM.png" target="_blank" rel="nofollow">https://www.dropbox.com/s/f4efa9eqa224sdi/Photo May 09, 3 42 59 PM.png</a></p>

<p>The console: <a href="https://www.dropbox.com/s/g21nwwbgi08mjqn/Photo%20May%2009%2C%203%2043%2007%20PM.png" target="_blank" rel="nofollow">https://www.dropbox.com/s/g21nwwbgi08mjqn/Photo May 09, 3 43 07 PM.png</a></p>

<p>When I start a new project: <a href="https://www.dropbox.com/s/xa47ybqipsmtk9b/Photo%20May%2009%2C%203%2050%2012%20PM.png" target="_blank" rel="nofollow">https://www.dropbox.com/s/xa47ybqipsmtk9b/Photo May 09, 3 50 12 PM.png</a></p>
]]></description>
   </item>
   <item>
      <title>Best way to back up?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2733/best-way-to-back-up</link>
      <pubDate>Tue, 07 May 2013 16:55:15 -0400</pubDate>
      <dc:creator>Luatee</dc:creator>
      <guid isPermaLink="false">2733@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>As far as I can see the best way for me to backup is to go in to iFile and select all code a folders then compress them and put them on sky drive. Does anyone have a more efficient way?</p>
]]></description>
   </item>
   <item>
      <title>Doubt with true and false</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2749/doubt-with-true-and-false</link>
      <pubDate>Fri, 10 May 2013 06:21:14 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2749@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I wanted two make two physics bodies using one class and that too had two different cases. But I couldn't differentiate between the two, either the first one would get drawn or the second one. I know what is going wrong. But can't find a solution for it. 'Horizontal' is set to true or false depending on the last wall created. How should I prevent that and make it true and false for walls individually.
So if the last wall is w[3] then only it will be drawn but If the last one is w[1or2] then those two will be drawn.
here's the code. I want all the walls to be drawn.</p>

<pre><code><br />--# Main
function setup()
    w = {}
    w[1] = Walls(WIDTH/2,0,WIDTH/2,HEIGHT/2,false)
    w[2] = Walls(WIDTH/3,0,WIDTH/3,HEIGHT/2,false)
    w[3] = Walls(0,HEIGHT/2,WIDTH/5,HEIGHT/2,true)
end

function draw()
    background(244, 242, 242, 255)
    for i = 1,#w do
        w[i]:draw()
    end
end
--# Walls

Walls = class()

function Walls:init(x1,y1,x2,y2,h)
    self.x1 = x1
    self.y1 = y1
    self.x2 = x2
    self.y2 = y2
    if h then
        horizontal = true
        self.wall1 = physics.body(EDGE,vec2(self.x1,self.y1 - 5),vec2(self.x2,self.y1 - 5))
        self.wall2 = physics.body(EDGE,vec2(self.x1,self.y1 + 5),vec2(self.x2,self.y2 + 5))
        self.wall1.info = "UpWall"
        self.wall2.info = "DownWall"
    else
        horizontal = false
        self.wall1 = physics.body(EDGE,vec2(self.x1 - 5,self.y1),vec2(self.x1 - 5,self.y2))
        self.wall2 = physics.body(EDGE,vec2(self.x1 + 5,self.y1),vec2(self.x1 + 5,self.y2))
        self.wall1.info = "LeftWall"
        self.wall2.info = "RightWall"
    end
end

function Walls:draw()
    pushStyle()
    fill(0, 0, 0, 255)
    stroke(127, 127, 127, 255)
    strokeWidth(3)
    if horizontal then
        rect(self.x1,self.y1 - 5,self.x2 - self.x1,10)
    else
        rect(self.x1 - 5,self.y1,10,self.y2 - self.y1)
    end
    popStyle()
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Help: saveScore GameCenter Add On</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2713/help%3A-savescore-gamecenter-add-on</link>
      <pubDate>Sun, 05 May 2013 19:47:46 -0400</pubDate>
      <dc:creator>JakAttak</dc:creator>
      <guid isPermaLink="false">2713@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, 
i used <a rel="nofollow" href="/Codea/Talk/profile/Reefwing">@Reefwing</a> s tutorial to get GameCenter in my app and everything works fine except saveScore. I have it set to saveScore(highscore) if i beat my highscore but for some reason it never saves it. Anybody have any idea why?</p>
]]></description>
   </item>
   <item>
      <title>[RESOLVED]Help with OAuth needed</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2741/resolved-help-with-oauth-needed</link>
      <pubDate>Wed, 08 May 2013 19:48:41 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2741@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I do not recall who it was but someone on here said they knew how OAuth worked. I'm working on a program to backup to giithub with gists. I understand all methods for posting and updating gists. However how can I get an OAuth key from within codea? I've only been able to do this using console and curl -username <a href="http://githubaddress" target="_blank" rel="nofollow">http://githubaddress</a> then json encoded table. Anyone have any idea how to get an Auth Token from github from within codea? It would really make my app more user friendly instead of asking people to get the token via osx or windows. I thought I had it but my attempts prove usless.</p>
]]></description>
   </item>
   <item>
      <title>Touch.id query</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2734/touch-id-query</link>
      <pubDate>Tue, 07 May 2013 18:17:59 -0400</pubDate>
      <dc:creator>West</dc:creator>
      <guid isPermaLink="false">2734@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Using the multi touch demo I've inserted a print statement to dump out the value of touch.id</p>

<pre><code><br /><br />-- Use this function to perform your initial setup
function setup()
    print("This example tracks multiple touches and colors them based on their ID")
    -- keep track of our touches in this table
    touches = {}
end

function touched(touch)
    if touch.state == ENDED then
        touches[touch.id] = nil
    else
        touches[touch.id] = touch
        print(touch.id)
    end
end

-- This function gets called once every frame
function draw()
    background(0, 0, 0, 255)

    for k,touch in pairs(touches) do
        -- Use the touch id as the random seed
        math.randomseed(touch.id)
        -- This ensures the same fill color is used for the same id
        fill(math.random(255),math.random(255),math.random(255))
        -- Draw ellipse at touch position
        ellipse(touch.x, touch.y, 100, 100)
    end
end

</code></pre>

<p>Quite often the same touch.id value appears again after only 2 or 3 touches.  Is there a way to prevent this?</p>

<p>I'm building up gestures based on successive touch events and am using the touch.id as the unique identifier for the gesture.  If a gesture doesn't exist with an id the same as any of the touches then create a new gesture.  The problem is that if a touch.id is reused to quickly it tries to add it to the existing gesture rather than the new one.</p>
]]></description>
   </item>
   <item>
      <title>One More Thing Conference</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2497/one-more-thing-conference</link>
      <pubDate>Fri, 22 Mar 2013 05:41:12 -0400</pubDate>
      <dc:creator>Reefwing</dc:creator>
      <guid isPermaLink="false">2497@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Just signed up for the One More Thing Conference in Melbourne. I'm looking forward to <a rel="nofollow" href="/Codea/Talk/profile/Simeon">@Simeon</a>'s presentation!</p>
]]></description>
   </item>
   <item>
      <title>Contact position</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2740/contact-position</link>
      <pubDate>Wed, 08 May 2013 13:29:23 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2740@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I read the codeas in built manual on contact position but I didn't get it. What I want to do is create an ellipse near the contact position.
I tried this but didn't work. How exactly do you find the contacts position.</p>

<pre><code><br />--# Main
function setup()
    w = physics.body(EDGE,vec2(0,0),vec2(0,HEIGHT))
    b = physics.body(CIRCLE,10)
    b.x = WIDTH/2
    b.y = HEIGHT/2
    b.linearVelocity = vec2(-200,0)
    b.gravityScale = 0
end

function draw()
    background(0, 0, 0, 255)
    fill(255, 0, 0, 255)
    stroke(255, 0, 0, 255)
    strokeWidth(5)
    ellipse(b.x,b.y,20)
    line(0,0,0,HEIGHT)
end

function collide(contact)
        fill(255,0,0,255)
        ellipse(contact.position.x + 100,contact.position.y + 100,40)
end
</code></pre>

<p>And one more thing how can I find the unit vector along a certain a direction. I know the direction of vector v3 as v3=v1-v2 and I know v1 and v2. They are position vectors. I tried v3/math.abs(v3) but it only gives a positive or negative 1 which is right mathematically but in physics that's how we find the unit vector. So is there a way to find the unit vector along v3</p>
]]></description>
   </item>
   <item>
      <title>Cube 3d help</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2739/cube-3d-help</link>
      <pubDate>Wed, 08 May 2013 13:04:32 -0400</pubDate>
      <dc:creator>Mnjk78lg</dc:creator>
      <guid isPermaLink="false">2739@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>How can I make a 3d cube just with the line(x1,y1,x2,y2) and vec3(x,y,z)
Aka the simplest way to do it</p>
]]></description>
   </item>
   <item>
      <title>Do I have the wrong approach with meshes?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2735/do-i-have-the-wrong-approach-with-meshes</link>
      <pubDate>Tue, 07 May 2013 21:46:09 -0400</pubDate>
      <dc:creator>Inviso</dc:creator>
      <guid isPermaLink="false">2735@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hey, I tried to do something with meshes because I want things to be faster and use shaders...
How many meshes should I use?</p>

<p>I tried this but it seems pretty slow, that can't be right. I'm working on a side scroller and everything near the bottom should have a shader reflection...</p>

<p>Is my approach wrong?</p>

<pre><code><br /><br />Ship = class()



function Ship:init(x,y)

    self.x = x
    self.y = y
    self.m = mesh()
    self.m.texture=("SpaceCute:Rocketship")
    self.rIdx = self.m:addRect(0, 0, 0, 0)
    self.m:setRect(self.rIdx, 0, 0,64,64)

end

function Ship:draw()

pushMatrix()
translate(self.x, self.y)
    self.m.shader = nil
    -- Draw the mesh
        self.m:draw()
    translate(0, -64)



      self.m.shader = shader("Documents:Myripple")



    -- Configure out custom uniforms for the ripple shader
    self.m.shader.time = ElapsedTime
    self.m.shader.freq = 2

    self.m:draw()

    popMatrix()

end

function setup()
   myship={}
    for i=0 , 10 do
     myship[i] =  Ship(30+(i*64),250)
    end


end

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


    for i=0 , 10 do
        myship[i]:draw()
    end

end
</code></pre>

<p>Any ideas?</p>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>Return a vec2 from a Codea addon?</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2737/return-a-vec2-from-a-codea-addon</link>
      <pubDate>Wed, 08 May 2013 06:00:58 -0400</pubDate>
      <dc:creator>tnlogy</dc:creator>
      <guid isPermaLink="false">2737@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, how do you return a vec2 value from a codea addon? I tried using Pnew from the old runtime, but it doesn't seem to work. Do you have any example on how to do it?</p>
]]></description>
   </item>
   <item>
      <title>OpenCV</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2736/opencv</link>
      <pubDate>Wed, 08 May 2013 02:43:14 -0400</pubDate>
      <dc:creator>tnlogy</dc:creator>
      <guid isPermaLink="false">2736@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, I'm trying to link the runtime with OpenCV, but have some compilation issues.</p>

<p>I'm getting "duplicate symbol" since the file surf.o is included twice. Any idea where the other reference is to it, and any idea how to solve. Maybe I need to put some time in compiling OpenCV myself instead of trying to use their precompiled version, but would be nice to not have to.</p>
]]></description>
   </item>
   <item>
      <title>Http.request uploading</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2732/http-request-uploading</link>
      <pubDate>Tue, 07 May 2013 14:39:45 -0400</pubDate>
      <dc:creator>CodeaNoob</dc:creator>
      <guid isPermaLink="false">2732@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Can someone show me how to format an http.request for uploading data to a site?</p>
]]></description>
   </item>
   <item>
      <title>Version control with AutoGist</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2711/version-control-with-autogist</link>
      <pubDate>Sun, 05 May 2013 15:29:25 -0400</pubDate>
      <dc:creator>Briarfox</dc:creator>
      <guid isPermaLink="false">2711@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Original Gister by <a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a> <a href="http://twolivesleft.com/Codea/Talk/discussion/comment/21842#Comment_21842" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/comment/21842#Comment_21842</a></p>

<p><em>UPDATED to version 2 Now get your Github token inside the app</em>
<a href="http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-0-backup-your-projects-as-a-gist#Item_2" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/2744/autogist-v2-0-backup-your-projects-as-a-gist#Item_2</a></p>

<p>I had been using Gister by <a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a>.  But I found that i rarely took the time to update my gists and when I did I would have to find the gist ID for my last gist. This resulted in creating multipal gists of my projects. I added on to <a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a> 's library to only update the gist when the version number changes. So just include this as a library and set the required info.<a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a> did all the work on this I just added version checking. So all credit is <a rel="nofollow" href="/Codea/Talk/profile/acp">@acp</a> 's :)</p>

<p>You are required to set some project info. This can be done manually or with AutoGist.setProjectInfo(). There are two fields that are required. "Project" = "Your Exact Project Name" and "Version" = "current version number"</p>

<p>Then you call AutoGist.backup() with no params it will create a new Gist id for the project and save it as private. It can take 2 parameters. The first can be true to make it a Public Gist and the second can be a Gist ID of a currently existing gist.</p>

<p>You will need to create a github account and get an Authentication key. I Save this key as local data so itcan not be accidently gisted for the world to see.</p>

<p>Make sure to grab all 3 files
AutoGist on GitHub: <a href="https://gist.github.com/briarfox/5525674" target="_blank" rel="nofollow">https://gist.github.com/briarfox/5525674</a></p>

<p>GitHub token tutorial - <a href="https://help.github.com/articles/creating-an-oauth-token-for-command-line-use" target="_blank" rel="nofollow">https://help.github.com/articles/creating-an-oauth-token-for-command-line-use</a></p>

<p>main.lua</p>

<pre><code>-- AutoGist
VERSION = 1.05 -- Use this to set Version Numbers

function setup()  
AutoGist.setProjectInfo("AutoGist","Briarfox","Auto Gists your Project",VERSION) --sets Project Info
AutoGist.backup() -- Add this to make backups 
end
</code></pre>

<p>This is what I used to get and set the GitHub Token</p>

<pre><code>--   curl <a href="https://api.github.com/authorizations" target="_blank" rel="nofollow">https://api.github.com/authorizations</a> \
--   --user "username" \
--   --data '{"scopes":["gist"],"note":"Codea Gister"}'

saveGlobalData("Auth_Gist_Token", PLACE_TOKEN_HERE) -- run this one in any projectthen delete it. you do not want to give this token out.
</code></pre>
]]></description>
   </item>
   <item>
      <title>Anti-aliasing in Code Editor</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2731/anti-aliasing-in-code-editor</link>
      <pubDate>Tue, 07 May 2013 13:12:32 -0400</pubDate>
      <dc:creator>juce</dc:creator>
      <guid isPermaLink="false">2731@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Is there a way to turn off anti-aliasing in the Code Editor? It really hurts my eyes..
If not, would it be possible to add such a feature in the future version?
Thanks.</p>
]]></description>
   </item>
   <item>
      <title>About number precision on Codea</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2633/about-number-precision-on-codea</link>
      <pubDate>Sat, 20 Apr 2013 16:10:44 -0400</pubDate>
      <dc:creator>Rosso5</dc:creator>
      <guid isPermaLink="false">2633@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello everyone.
I am new to Codea, I bouth it just few days ago.
I started by studying the examples and my first program has been a new Mandebrot set drawing program.
I realized that at a not so high zoom level, there are floating point precision artifacts.
What is the floating precision of Codea? The Lua manual states that numbers all are of a unique type, with double precision, but to me it seems there is no evidence of that.
There is some way to get at least a double precision for float variables?
Thank you in advance.</p>

<p>P.S.: sorry for my english.</p>
]]></description>
   </item>
   <item>
      <title>Shorten a code</title>
      <link>http://www.twolivesleft.com/Codea/Talk/discussion/2720/shorten-a-code</link>
      <pubDate>Tue, 07 May 2013 01:32:33 -0400</pubDate>
      <dc:creator>Saurabh</dc:creator>
      <guid isPermaLink="false">2720@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Can I shorten the fallowing code using tables or anything like that
d1,d2,d3.... All are physics bodies with info "d1","d2","d3"...</p>

<pre><code>if contact.bodyA.info == "d1" or contact.bodyB.info == "d1" then
        d1.y = HEIGHT/2 + 100
end
if contact.bodyA.info == "d2" or contact.bodyB.info == "d2" then
        d2.y = HEIGHT/2 + 100
end
if contact.bodyA.info == "d3" or contact.bodyB.info == "d3" then
        d3.y = HEIGHT/2 + 100
end
-- goes on for ten bodies
</code></pre>

<p>I tried using this but it didn't work</p>

<pre><code>for i =1,10 do
If contact.bodyA.info == "d[i]" or contact.bodyB.info == "d[i]" then
        d[i].y = HEIGHT/2 + 100
end
end
</code></pre>

<p>The bodies keep on moving, don't return to height/2 + 100</p>
]]></description>
   </item>
   </channel>
</rss>