Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
How to avoid FPS drop while loading Texturepack? - Gideros Forum

How to avoid FPS drop while loading Texturepack?

Apollo14Apollo14 Member
edited October 17 in General questions
Hi guys!

I've noticed that there're heavy FPS drops while creating new texturepacks:
TEST_TEXTUREPACK = TexturePack.new("images/spritesheet1.txt", "images/spritesheet1.png")
--causes significant lag, FPS drops from 60 down to 40, then restores
--spritesheet is not big, it's only 132kb, 1243x1542px
I've tried it with Core.asyncCall, still lags.
local function LOAD_SPRITESHEET()
	TEST_TEXTUREPACK = TexturePack.new("images/spritesheet1.txt", "images/spritesheet1.png")
It seems that 'TexturePack.new' is extremely heavy for some reason
(first thought was to pre-cache texturepacks but it still will cause lots of lags; and pre-cached texturepacks consume lots of ram: 10 pre-cached texturepacks of ~1mb size consume up to ~200mb ram)
> Newcomers roadmap: from where to start learning Gideros
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)


Sign In or Register to comment.