Game working fine on Mac, images not displaying on Windows

Hi everyone,
I’m having some strange issues with a game we’re developing. I started working on it on a Mac (build 2011.591) and, since our artist has a windows machine, he downloaded the Windows version of the SDK. Once he opens the project (and I tried as well) it doesn’t show anything apart one of the images and the player. Physics is working fine. Here’s the code I use to display the images:

[lua]local sky = display.newImageRect(game, “Level_1/lvl1_bkg.png”, 573, 2580 )
game:insert( sky )
sky.x = display.contentWidth / 2 + 43
sky.y = 1290

local platforms = display.newImageRect(game, “Level_1/lvl1_platforms.png”, 573, 2580)
game:insert( platforms )
platforms.x = display.contentWidth / 2 + 43
platforms.y = 1290

local leftWall = display.newImage( “Level_1/lvl1_wall_left.png” )
game:insert( leftWall )
leftWall.x = 35
leftWall.y = 1290

local rightWall = display.newImage( “Level_1/lvl1_wall_right.png” )
game:insert( rightWall )
rightWall.x = 499
rightWall.y = 1290

local player = display.newImage( “Sprite/standright.png” )
game:insert(player)

local ground = display.newImageRect(game, “Lava/lava.png”, 573, 682)
game:insert( ground )
physics.addBody( ground, “static”, { friction=0.3, bounce=0.0 } )
ground.x = display.contentWidth / 2 + 43
ground.y = 2700
ground.stopx = display.contentWidth / 2 + 43
ground.stopy = 425[/lua]

It’s not displaying anything apart from “ground” and “player”. I read that there are restrictions on names, but that should only affect video and audio files. I should mention that I’m using the “director” library to load the levels, but we had the same issue even when it was all in the main file.

Any ideas?

Thanks a lot for any suggestion!

Marco [import]uid: 96352 topic_id: 17780 reply_id: 317780[/import]

  1. why there is 2580 in this line

local sky = display.newImageRect(game, “Level_1/lvl1_bkg.png”, 573, 2580 )

any sprite has max size of 2048x2048 if any image or sprite has more size then it the result will be crash on mobile. may be this is the issue. you can do a little test for this also search any image with more size then this on google send link to your email and try to open in your idevice your browser will crash

  1. does your artist have installed graphics driver in his pc?

  2. does you and your artist using same config.lua ? [import]uid: 12482 topic_id: 17780 reply_id: 67863[/import]

hgvyas has a good point regarding the image size - that’s the first thing I’d look at.

Can you try a smaller image and update the thread please? (You could also break the image up into smaller images, etc - just no one image that large.)

Peach :slight_smile: [import]uid: 52491 topic_id: 17780 reply_id: 67870[/import]

Hey guys,
thanks for the quick reply. I will try it tonight and let you know how it goes.

hgvyas, for your other questions:

  1. I think so; I tried on my windows machine as well (which has the graphics drivers installed) but I have the same problem;

  2. Yes, the config.lua file is the same.

Thanks again,

Marco [import]uid: 96352 topic_id: 17780 reply_id: 67906[/import]

awesome.

i knows that some times error will generate in mac and not in windows or vice-versa and resulting some bad results but cant say anything about the layout difference i think you have to fight in mac and windows to find put problem there should be some error may be that is not printing in terminal and may be not affecting on mac
have you tried to build how was the output in real device? [import]uid: 12482 topic_id: 17780 reply_id: 67911[/import]

Hey guys,
splitting the images worked like a charm! Thanks again for your help for such a silly mistake :slight_smile:

Marco [import]uid: 96352 topic_id: 17780 reply_id: 68012[/import]

Great! Glad to hear it :slight_smile:

Peach [import]uid: 52491 topic_id: 17780 reply_id: 68076[/import]