Codea Runtime Library

@Simeon - If there were to be a contract between the developer and 2LL that spelled out the relationship, then I would think it would be legal, just as a contract programmer would be able to write programs that you submit. But then again, I am no lawyer!

I think PhoneGap manage to do it but I could be wrong. And I have to admit that having buttons inside Codea to push a build out to TestFlight would be super sweet.
Having said that I found it ridiculously easy to get my game onto my iPhone using the runtime engine. But then I don’t have the problem of not owning a Mac OS.

@peteroyle - “And I have to admit that having buttons inside Codea to push a build out to TestFlight would be super sweet.” - +10 , but that means having problems with app signing and such. IDK

I am having some problems with the Codea Runtime Library. I don’t understand how to run the script from terminal. Every time I try it says “Codea Template: No such file or directory” Any help would be appreciated

@Bieber208 are you running it from inside the Codea-Runtime directory? eg:

git clone
cd Codea-Runtime
./ AngryPigs

I ran this. Where does it place the folder “AngryPigs”? I’m sorry, I’m new to Mac

Nvm, I got it. Thanks for the help!

i figured it out. Turns out the problem was that i had two ‘Main’ files and so it got confused

@Simeon When I run my app, it does not work and the output box says “there is no draw function in Lua” How do I get function draw to work?

did you copy your Project.codea folder in as a folder reference (and not a group)? The icon folder icon must be blue in the Xcode files & folders section.

Works perfect! :slight_smile:

Crashed before I upgraded to iOS 5.1, don’t know why, but now it works fine.

I copyed it into Classes like it says to

I even tried recreating with Codea Runtime Library. Is it possible that draw isn’t supported by the Library?

draw is supported. It sounds like the runtime can’t find your project (and hence the draw function). This is a folder reference / group issue — you need to copy your project named Project.codea as a folder reference (so that it maintains the folder structure in the generated .app package).

I did that. I have tried recreating multiple times, following the instructions exactly. It still does not work

I have another question. My program uses custom sprites from spritely. when i try to run it in Xcode it says “attempting to call global ‘Spritely’ (a nil value)” Does this mean that the global data can’t be read and so it isnt loading anything? If so, how would i get it to work. It runs fine in Codea…

It sounds like you were saving images to global data with Spritely — these would only exist on your device. You would need to save them instead using saveProjectData and then ensure that the Data.plist file from your project is inside your Project.codea file.

So the default Spritely save function won’t work?

I’d suggest using saveProjectData instead of saveGlobalData. This will generate a Data.plist in your project’s bundle that you can move into the runtime project.

Your error sounds like you are trying to use a ‘Spritely’ class that is not defined.

The code you posted looks okay. It should only touch global data if the SpritelyKeys exists.