Background Sprite image size question

I’m building a game that is going to have multiple drawn level backgrounds (sprites) that change. I was planning on making them retina display size (2048x1536) and quickly discovered they get pretty darn big in file size. I ended up settling for the standard (1024x768) size and after lots of compression I got the images down to about 450k.

My questions are, does an image that size affect the drawing rate of dragging an object by touch around? And if so, is there a way to set up the scene so that the background only has to be drawn once when it is called? And not 60-ish times a second?

Thanks for the swift reply Dave!

I am a graphic designer taking my first crack at coding on my ipad. I’m well aware my coding abilities are not going to be in the best of practices, but I can definitely get things to work… Lol, comparing myself to cargobot, I make a decent 1 star (3 star never enters my mind unless I copy it from YouTube tutorials). Hopefully in the coming months I’ll have something to show for it. I really appreciate the advice and replies!

@notw22 Here’s an example of a full screen background image with 100 sprites that can be dragged around the screen. The average FPS still remains in the high 50’s. I believe that’s what you were asking about.


function setup()
    img=readImage("Cargo Bot:Startup Screen")

function draw()
    background(40, 40, 50)
    for x=-5,4 do
        for y=-5,4 do       
            sprite("Planet Cute:Character Horn Girl",tx+x*50,ty+y*50,70)
    text(string.format("AVG FPS  %d",cnt/tot),WIDTH/2,HEIGHT-50)

function touched(t)
    if t.state==MOVING then

@notw22 Also see the link below. It’s a large scrolling background with a scrolling character to move on it.

@notw22 Anything that is drawn does so at 60 FPS or slower depending on the amount of things on the screen. Dragging an object around the screen shouldn’t slow the display rate down. If you want more info, you can do a forum search ( search bar is on top right side of screen just above “Start a New Discussion”.) There are a couple of years worth of information.

Thanks for the swift reply Dave!

@notw22 Based on what you’re doing, I don’t think there will be any slowdown. It takes a lot of objects being drawn to slow things down enough to notice.

@dave1707 I shall now regard you as king of all things Codea! … Ok, not really, but you have been immensely helpful to me. Thanks again.

@notw22 There are a lot of people here that know more than I do, I just happened to answer your question first.