Magic Link Tutorial - Texture size 4096x2048 exceeds maximum supported texture size (2048x2048)?

I am seeing this error when attempting to build the Magic Link tutorial on my device.

ERROR:GAMESYS: Texture size 4096x2048 exceeds maximum supported texture size (2048x2048). Using blank texture.

I think you can get down the size of the atlas by rearranging the image order in the atlas. Texture packing needs to be improved.

I create bgs.atlas, place the background sprites.
bgs.atlas 2048 X 2048
Change all gui’s to reflect change

Split the magic spheres and blocks into two atlas files.
sprite.atlas 2048 X 2048
block.atlas 2048 X 1024

Change the main_menu.gui

Block.go and Block.script is where it starts to fall apart.
Both blocks and magic spheres need to belong to the same atlas, #sprite.

Add a new component to block.go of block. #block
Change #sprite to #block
if self.color ~= nil then
msg.post("#block", “play_animation”, { id = self.color })
else
msg.post("#block", “disable”)
end

Now I see magic spheres and block in same spot.

Needs some logic change to actually work and use textures that will load on android device.

FYI - I am developing on a Nexus 7 running 5.1

I did learn a few things about the texture size as I saw this error with another project and now understand to break up the atlas if too large.

Stepped away and came up with a solution.

Scaled down the blocks and magic spheres to 100 X 100.
This puts sprites.atlas at 2048 X 2048.

Then change block.script to
go.set_scale(1)

Attached are the scaled down assets.resized-magic-link-assets.zip (86.6 KB)

2 Likes