Screen content is distorted (too wide)


when I start the app in the simulator (Xcode 6.2), since version 3.2 the screen content is distorted (too wide). After rotation of the ipad the content is displayed correctly. Until version 2.2 everything is displayed correctly. When I run the code in Codea everything works fine. The app is set as portrait_any.


function setup() …

Has someone the same problem?
greetings schuju

Hi, same problem here. It happens with all projects, including the examples. I am using Xcode 6.1 and Codea 2.3 (the problem began after update). For illustrate, I have made this little test:

-- Prueba

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

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

    -- This sets the line thickness

    -- Do your drawing here
    ellipse(WIDTH/2, HEIGHT/2, 64*4)
    line(0, HEIGHT/2, WIDTH, HEIGHT/2)
    line(WIDTH/2, 0, WIDTH/2, HEIGHT)
    for i = 0, 12 do
        ellipse(i*64, HEIGHT/2, 20)
    for i = 0, 16 do
        ellipse(WIDTH/2, i*64, 20)

Inside Codea environment the circle appears correctly, but after export to Xcode it seems a ellipse until reset button is pressed or the iPad is rotated. This happens both in the simulator as in the real device. Here you may view the images:

Before reset
After reset

Hey, schuju, are you find some solution or workaround for this? Are we the only Codea users with the problem?


This is something @dave1707 noticed in the beta that was fixed… @Simeon is it possible the bug is fixed in Codea but not in the Xcode export?

Thank you for the detailed report, @rodoval, @schuju. Could you log it on the issue tracker? I should be able to resolve it fairly soon.

@rodoval @schuju

Please go into your “Libs” folder within your exported project and delete the libcodea.a and libtools.a files. Then rebuild your project in Xcode.

The issue should be fixed. Please let me know if it isn’t.

Hello rodoval,
put the statement “displayMode(FULLSCREEN)” above the setup function:


function setup ()


That works for me.

Greetings schuju


I have tried to follow your indications, but:

-After uncompress the zip archive generated by Codea, there aren’t libcodea.a or libtools.a in the Libs folder.

-When Xcode opens the project the files appear in the folder. The project can be executed in the simulator, now without distortion (!?). But a try of testing in the real device produces a linker error.
I am really confused about this.


It works! Simply changing the code in the standalone app makes it starts without distortion.

Thanks to both of you.