Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Bug: 2.0.16 Agk Player

Author
Message
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 12th Jan 2016 14:19
When i get to mush media , the agk player start to crash.
If i have more then 48mb media , on ipad2 the agk player just closes. On Android ( asus ) the Agk player start to flash between "receiving" and "waiting " very fast and then the asus start rebooting.

When i cut down to around 32mb media , both works fine.

Dont know if this has to do with the old 50mb limit ?

Also when i have 32 mb media , the agk player works for 3 or 4 times then it start to have problems , so perhaps there is also something not getting cleanup on exit. ( i use broadcast/cancel broadcast button ).
best regards Preben Eriksen,
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 12th Jan 2016 14:23
https://tinypng.com/
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 12th Jan 2016 14:34
Quote: "https://tinypng.com/"

Thanks for sharing, this will be useful in the future

Sign up for NaGaCreMo!
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 12th Jan 2016 14:41
My app is 70 meg and works fine in the player, iOS and Android.

Tiny PNG is useful, we use it all the time.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 12th Jan 2016 14:51
hmm, maybe a problem with a file itself if you got / using something from web. try what happens if you save all images again with one app.
AGK (Steam) V2.0.16 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Jan 2016 17:30
Even though the media may be 48MB on disk, once they are loaded into the GPU they are decompressed to full size. So a 1024x1024 image might be a few hundred KBs in PNG form but consumes 4MB in GPU memory. If you load too many images without deleting any then eventually you will run out of memory and your app will get closed by the operating system. Use atlas textures to place many irregular sized images onto a single power of two image to save some memory. Sprites on the other hand use very little memory so also make sure you only load images once and then share them across all sprites that need that image.
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 13th Jan 2016 00:15
Yes i cut it down by switching from a 2048x2048 (10 mb ) texture to a 1024x1024. that fixed it. cant use a png packer as the textures has other types of data used by the shaders.

But i like to use the 2048x2048 texture, but how many times is the same texture sent to the GPU ?

LoadImage , put the packed image into memory compressed ?
SetObjectImage , copy the packed image into the GPU memory and uncompress it ? , and still leaves the packed image in memory ?

What if i use the same texture on different objects that use different shaders , is the same image then copied multiply times to the GPU ?

best regards Preben Eriksen,
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Jan 2016 02:27
LoadImage puts the image in memory uncompressed. DeleteImage removes it from memory. Everything else like SetObjectImage or using it with different shaders all just point to the image that has already been loaded.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 13th Jan 2016 14:00
For mobile devices it's best to stick to 1024x1024 image resolution because not all mobile GPUs can handle anything bigger. One solution is to offer a separate HD version if it's really needed. Or include both and have a setting.
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 16th Jan 2016 12:30

Media that are in the media folder but NOT used take up memory on the device , i believe that the "recieving app" function dont release the memory after it writes the media to storage, if i have unused media in the media folder it takes up more memory on the device, even if i dont use the media i need to delete it from the media folder to make the app run on the device.

So i still think there is a memory problem in the AppGameKit Player app.

best regards Preben Eriksen,

Login to post a reply

Server time is: 2024-11-17 03:04:33
Your offset time is: 2024-11-17 03:04:33