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] Tier 1 AGK_V2_07_19 Disk activity interferes with subimage files

Author
Message
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 16th Aug 2017 10:12
Hey Paul, I made Spine animations work with nz0s awesome WAD loader tool but hit a problem when loading a file from the wad; if the .atlas file is deleted from local storage after loading, the subimage system intermittantly fails meaning the spine attachment is sometimes blank white. The fact that different results happen every time the .exe is run suggests to me it might me an AppGameKit problem.

I load the Spine animation 5 times and offset it. It references one image loaded beforehand.

How it should look:


How it looks sometimes if the atlas file is deleted from local storage: (One spine anim works, the others are blank)


How it looks most times - no atlas/subimages are working:


Project attached.

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 16th Aug 2017 19:48
After the load you should be able to delete the files on disk without any problem. I ran your example and saw the missing images, but noticed you were using SetRawWritePath to change the write folder location. If I remove this then it seems to work. SetRawWritePath is deprecated in favour of "raw:" file paths.
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 17th Aug 2017 05:49
Weird, commenting out the SetRawWritePath line changes nothing for me. The only way to get the image to display consistently is to not delete the atlas file. When deleting the file, the image displays for the first run, then breaks on subsequent runs. Just tested with 08_16 as well, same problem.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Aug 2017 13:22
I had another look and it's to do with the order the files are created and deleted. the .atlas file behaves the same as a subimages.txt file, it is loaded during the initial LoadImage command, so it must exist at the same time as the .png file is loaded. After that it is no longer used, the sub image data is held in memory. In your code you extract the .png file, along with any subimages.txt file, but you don't extract the .atlas file, that seems to be done later after the image is already loaded. The reason this sometimes works is if the .atlas file still exists from a previous run then the LoadImage will work as expected.
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 17th Aug 2017 16:11 Edited at: 17th Aug 2017 16:12
Ah gotcha, yes atlas stuff was being dealt with in the wad_load skeleton() function instead of at load image time. Thanks!

Issue is fixed with these amended functions.

Login to post a reply

Server time is: 2024-03-29 06:16:00
Your offset time is: 2024-03-29 06:16:00