image and scene size... best practices... need advice

I am having difficulties figuring out what is the best way to put my game together. As you can see in the screen shot below, the top half of the screen is actually just 1 image (ignore the yellow square). The game is going to be kind of like a maze, so you make one path choice and the screen will slide into the next area.

I think I’m running into a problem with image sizes and its slowing things down and I can even notice the player movement is hindered. I need some insight on what is the best way to handle what it is I’m trying to accomplish.

I have read that sprite sheets are best used whenever you can. However, I have rather large sprite sheet that is 2700 x 3900 (15 images total that are 900 x 780 individually) each image is one of the possible background images that could appear.

as mentioned, I am running into some issues with performance and I am pretty positive its because of such a huge sprite sheet.

would it be best to break down my single sprite sheet into maybe 2 or 3 smaller sheets?

my other concern is the bounds or image sizes Corona can handle within each scene…

The goal is to have a 3 x 3 grid for the maze on each scene, and each of the individual 900 x 780 images would naturally fill in one of those spots, so within one scene, I’m looking at a total scene size of 2700 x 2340

is that something that could work, or do I need to re-think how I’m going to achieve this?

Screen_Shot_2017_01_08_at_5_17_27_AM.png

do you want to your character(the yellow dot I assume) moves to the edges? if you don’t want that, you can assign at tap event in buttons to change backgrounds. And if you want to your character to move until the borders, use transition function:

 

 transition.to( character, { y=-40, time=500,

        onComplete = function() display.remove( newLaser ) end

    } )

where character its your object, the table wich comes next, is y from top location. (from the left and right sides, you will have to use X.)
The time is the ammount it takes to reach te location.

and onComplete, is a function wich will be executed when the translation ENDS. So there, you will have to change the background ( I don’t know if its optimal to have a scene for each background, because you have tons of them) and also you will reset your character location.

Yeah, the character can move freely around the scene until he hits the edge, then the images will slide in the correct direct to bring up the new background.

The problem isnt figuring out how to get the character to move, the problem is image sizes and what corona can handle without slowing down performance.

Don’t use huge images.  Instead use smaller (say 64 x 64) images and tile them.  This means you can make levels dynamically if you want.  Personally, I would keep the player stationary and scroll the background.

Yeah, I have created smaller sprite sheets, basically broke the big single image into 4 squares and the game seems to run just fine :slight_smile:

any reason why you suggest scrolling the background and keeping the player stationary?

Just convention really… if the game fits in one screen (like Pacman) then move the player, if not (like Sonic or Mario) then scroll the scene instead.

My game uses a rendered size of at least 12000 x 6000 and that is made up of 20+k smaller graphics laid out isometrically.  I had to do a lot of culling to ensure it runs at a decent frame rate. So a large size is not a problem if you code accordingly and only load on demand.

do you want to your character(the yellow dot I assume) moves to the edges? if you don’t want that, you can assign at tap event in buttons to change backgrounds. And if you want to your character to move until the borders, use transition function:

 

 transition.to( character, { y=-40, time=500,

        onComplete = function() display.remove( newLaser ) end

    } )

where character its your object, the table wich comes next, is y from top location. (from the left and right sides, you will have to use X.)
The time is the ammount it takes to reach te location.

and onComplete, is a function wich will be executed when the translation ENDS. So there, you will have to change the background ( I don’t know if its optimal to have a scene for each background, because you have tons of them) and also you will reset your character location.

Yeah, the character can move freely around the scene until he hits the edge, then the images will slide in the correct direct to bring up the new background.

The problem isnt figuring out how to get the character to move, the problem is image sizes and what corona can handle without slowing down performance.

Don’t use huge images.  Instead use smaller (say 64 x 64) images and tile them.  This means you can make levels dynamically if you want.  Personally, I would keep the player stationary and scroll the background.

Yeah, I have created smaller sprite sheets, basically broke the big single image into 4 squares and the game seems to run just fine :slight_smile:

any reason why you suggest scrolling the background and keeping the player stationary?

Just convention really… if the game fits in one screen (like Pacman) then move the player, if not (like Sonic or Mario) then scroll the scene instead.

My game uses a rendered size of at least 12000 x 6000 and that is made up of 20+k smaller graphics laid out isometrically.  I had to do a lot of culling to ensure it runs at a decent frame rate. So a large size is not a problem if you code accordingly and only load on demand.