We use physics because it keeps the objects from touching each other. “Static” means the spawned object stays in place; “dynamic” enables it to move if it collides with another object. It’s handy because you can set a radius value that gives each item its own personal space.
For the matching images, I ended up pulling those from a separate table altogether. It’s kludgy, but I did this because I knew that I was going to include a two player version.
I only worry about the 2x images for the application bundle (icons, App Store graphics, etc). For in-game assets, I usually just start out with a high-res image to begin with, then just scale down using :scale( x%, y%). Do a Google search for ultimate config.lua file, and it should take care of the rest (at least for iOS).
local matchingimages = { ...your objects } randomMatchImage = matchingimages[math.random(#matchingimages)] --pick 1 item from matchingimages table above filename1 = randomMatchImage filename2 = filename1 --make filename2 a copy of filename1 math.randomseed(os.time()) local function showMatchItem1() item1 = display.newImage(filename1) item1:scale(.2, .2) item1.x, item.y = etc... --spawn on left half of screen end local function showMatchItem2() item2 = display.newImage(filename2) item2:scale(.2, .2) item1.x, item.y = etc... --spawn on right half of screen end showMatchItem1() showMatchItem2()