Using big images as background

Hi!,
I haven’t tried it yet, but I want to know if there are memory/performance issues by using big background images on tiled + lime.

What I want to achieve is the following:

the game is simples and will have, at one given time, 4 to five physical elements on screen, with very detailed and beautiful background images changing as to represent the various stages. These backgrounds will not interact with the game, but I want the artists to have full control of it, and not use lime.

any thoughts? [import]uid: 31814 topic_id: 6349 reply_id: 306349[/import]

If you wish to add a background image you can simply use code similar to this:

  
-- load image  
local backImage = display.newImage("level1.png")  
  
-- now load map so image is behind it  
local map = lime.loadMap("map.tmx")  
  
lime.createVisual(map)  
  
lime.buildPhysical(map)  
  

Alternatively if you wanted it to be set up in Tiled you could create an Object that would have a property for the image path and then listen for that in Lime and add as required.

Or simply make a new tileset in Tiled that is the image you want and with its tile size set to the size of the image. Then just create a single tile of that image. [import]uid: 5833 topic_id: 6349 reply_id: 21952[/import]

Or simply make a new tileset in Tiled that is the image you want and with its tile size set to the size of the image. Then just create a single tile of that image.

I am in process of consideration of the solution You have given - thus with poor results:- I have created first tileset of size 32x32 pixels, then the second one - 64x64, first tileset is used on first tileLayer, the second one - on the separate tileLayer that is over first one. While in Tiled - both layers are visible and in Lime loaded map - there is only the first one visible.

So for now, Is the usage of this technique limited, and it’s not possible to differentiate the size of tiles on separate layers? Or am I doing something wrong? [import]uid: 10881 topic_id: 6349 reply_id: 22418[/import]

What you would want to do is create your large image, say 320*480, and then load that up as a tileset with its tilewidth set to 320 and its tileheight set to 480.

The layersize of the map can still be a more suitable value of 32*32 or whatever you are using.

You would then create your new background tile layer and add in the single tile from your new tileset. That should work, if it doesn’t I am either forgetting something silly or I have broken it somehow so if it still doesn’t work please send your project (if you can) to support@justaddli.me and I will look into it for you. [import]uid: 5833 topic_id: 6349 reply_id: 22419[/import]

I have sent an email to support@justaddli.me, with detailed description of a problem and hints how to reproduce it. [import]uid: 10881 topic_id: 6349 reply_id: 22441[/import]

For what it’s worth - I can reproduce the fact that when you start with a 32x32 map and 32x32 tileset, then a subsequent 64x64 tileset does show the tiles in Tiled, but Lime doesn’t seem to incorporate them…

-FS.
[import]uid: 8093 topic_id: 6349 reply_id: 23005[/import]

Hi,

The fix for multisized tiles is in 2.8 however if you need it currently it is a very small fix that I can post here. [import]uid: 5833 topic_id: 6349 reply_id: 23209[/import]

I’ll wait - do not want to distract you from your 2.8 release :wink: [import]uid: 8093 topic_id: 6349 reply_id: 23230[/import]

It should be very soon :slight_smile: [import]uid: 5833 topic_id: 6349 reply_id: 23303[/import]

HELPPPPP: NEED TO INSERT A HUGE image as background like this

local backImage = display.newImage(“level1.png”)

the problem is that the image is 4000px width and 900 height and it doesent appear wen i simulate in the corona simulator because is to big
someone know who to fix it???
HELP!! [import]uid: 110762 topic_id: 6349 reply_id: 83409[/import]

You can stop a large image being scaled by setting the isFullResolution paramater to true - http://developer.anscamobile.com/content/display-objects#Image_Autoscaling - however there is a maximum texture size that depends on the actual hardware and yours will be above that. You will need to split it up into a few smaller images and then display them. [import]uid: 5833 topic_id: 6349 reply_id: 83419[/import]

Any Update on this???

Thanks,
Ahesanali [import]uid: 9664 topic_id: 6349 reply_id: 93204[/import]

What sort of an update is required? The multi sized tiles was fixed quite a while ago and the requirement to load large images for backgrounds has many different solutions. [import]uid: 119420 topic_id: 6349 reply_id: 93963[/import]