Icons disappearing when downloading resource pack

Greg

  • *
  • Posts: 1260
I just uploaded the Cutscene resource pack to Forge.  All behaviors and Actors have icons specified.  When I downloaded the resource pack to a new game, some of the icons disappeared.

I know that this was looked at in the past, and I thought it was fixed.  Looks like there may be one case that was missed?

To see the icons, look at the "Cutscene Pack" game, and then to see the problem, download the "Cutscene" resource pack into any other game.

Greg

  • *
  • Posts: 1260
Here's something interesting from the log file.  Looks like it's trying to save them as -1.png?

edit: looks like they all do that, so maybe that's just the convention.

Code: [Select]
[LOG] Sharing: Camera Manager
[LOG] 22418
[LOG] Write String out as file to: D:\Documents and Settings\212040619/.stencylworks/forge/22418-html/index.html
[LOG] Copy file from: games\Cutscene Pack\resources\533.png to: D:\Documents and Settings\212040619\.stencylworks\forge\533.png
[LOG] Copy file from: games\Cutscene Pack\resources\550.png to: D:\Documents and Settings\212040619\.stencylworks\forge\550.png
[LOG] Copy file from: games\Cutscene Pack\resources\532.png to: D:\Documents and Settings\212040619\.stencylworks\forge\532.png
[LOG] Copy file from: games\Cutscene Pack\resources\535.png to: D:\Documents and Settings\212040619\.stencylworks\forge\535.png
[LOG] Copy file from: games\Cutscene Pack\resources\534.png to: D:\Documents and Settings\212040619\.stencylworks\forge\534.png
[LOG] Copy file from: games\Cutscene Pack\resources\537.png to: D:\Documents and Settings\212040619\.stencylworks\forge\537.png
[LOG] Copy file from: games\Cutscene Pack\resources\536.png to: D:\Documents and Settings\212040619\.stencylworks\forge\536.png
[LOG] Copy file from: games\Cutscene Pack\resources\538.png to: D:\Documents and Settings\212040619\.stencylworks\forge\538.png
[LOG] Copy file from: games\Cutscene Pack\snippets\Design_236_236_CameraManager.design to: D:\Documents and Settings\212040619\.stencylworks\forge\Design_236_236_CameraManager.design
[LOG] Copy file from: games\Cutscene Pack\snippets\236.png to: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png
[LOG] Status of Share: HTTP/1.1 200 OK
[LOG] Message of Share: ERROR: Could not upload SWF.
200
[LOG] Sharing: Cutscene Manager
[LOG] 22419
[LOG] Write String out as file to: D:\Documents and Settings\212040619/.stencylworks/forge/22419-html/index.html
[LOG] Copy file from: games\Cutscene Pack\resources\567.png to: D:\Documents and Settings\212040619\.stencylworks\forge\567.png
[LOG] Copy file from: games\Cutscene Pack\resources\569.png to: D:\Documents and Settings\212040619\.stencylworks\forge\569.png
[LOG] Copy file from: games\Cutscene Pack\snippets\Design_219_219_CutsceneManager.design to: D:\Documents and Settings\212040619\.stencylworks\forge\Design_219_219_CutsceneManager.design
[LOG] Copy file from: games\Cutscene Pack\snippets\219.png to: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png
[LOG] Status of Share: HTTP/1.1 200 OK
[LOG] Message of Share: ERROR: Could not upload SWF.
200

Greg

  • *
  • Posts: 1260
Here's more oddness.  If I try to track down the events of one particular icon that is missing -- in this case for the "CS Rotation" behavior - I see the following.  The image in question is 229.png.  The first block is the upload, then the download -- everything looks fine up to that point, and then for some reason it looks like the processing of the Dialog behavior is mapping 595.png from the resources folder on to 229.png.

595.png is just the missing image icon.

Code: [Select]
[LOG] Sharing: CS Rotation
[LOG] 22400
[LOG] Write String out as file to: D:\Documents and Settings\212040619/.stencylworks/forge/22400-html/index.html
[LOG] Copy file from: games\Cutscene Pack\resources\516.png to: D:\Documents and Settings\212040619\.stencylworks\forge\516.png
[LOG] Copy file from: games\Cutscene Pack\resources\508.png to: D:\Documents and Settings\212040619\.stencylworks\forge\508.png
[LOG] Copy file from: games\Cutscene Pack\resources\515.png to: D:\Documents and Settings\212040619\.stencylworks\forge\515.png
[LOG] Copy file from: games\Cutscene Pack\snippets\Design_229_229_CSRotation.design to: D:\Documents and Settings\212040619\.stencylworks\forge\Design_229_229_CSRotation.design
[LOG] Copy file from: games\Cutscene Pack\snippets\229.png to: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png
[LOG] Status of Share: HTTP/1.1 200 OK
[LOG] Message of Share: ERROR: Could not upload SWF.
200


[LOG] Initializing Snippet... 218 : CS Rotation : scripts.Design_229_229_CSRotation
[LOG] Copy file from: games\Edge of the World\snippets\Design_218_218.design to: games\Edge of the World\snippets\Design_218_218_CSRotation.design
[ERR] Remapped snippet classname: Design_218_218_CSRotation
[ERR] Has a Dependency
[LOG] Downloading: 22401
[LOG] Download Type:
[LOG] URL: http://static.stencyl.com/forge/assets/22401.zip
[LOG]
[LOG] Unzipping...
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/-1.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/22401.xml
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/566.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/570.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/591.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/592.png


[LOG] Initializing Snippet... 228 : CS Dialog : scripts.Design_223_223_CSDialog
[LOG] Copy file from: games\Edge of the World\snippets\Design_228_228.design to: games\Edge of the World\snippets\Design_228_228_CSDialog.design
[ERR] Remapped snippet classname: Design_228_228_CSDialog
[ERR] Has a Dependency
[LOG] Downloading: 22411
[LOG] Download Type:
[LOG] URL: http://static.stencyl.com/forge/assets/22411.zip
[LOG]
[LOG] Unzipping...
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/-1.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/22411.xml
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/595.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/596.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/Design_217_217_CSMovement.design
[LOG] Guessing type of unknown resource: snip-root
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png to: games\Edge of the World\snippets\229.png
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\595.png to: games\Edge of the World\snippets\229.png

Greg

  • *
  • Posts: 1260
Last post from me and then I will stop until someone else has taken a look.  I wonder if this has to do with the creation of custom blocks, without assigning them an image? 

I'm noticing a ton of missing icon images in the resources folder, and I can only imagine that it comes from the custom blocks that have no images.  That doesn't explain the other issue - but I'm wondering if we don't specify an icon for custom blocks, if we could just share a single centralized image instead.

Jon

  • *
  • Posts: 17524
Has this always been the case, or is it new?

It would be great if you could look a little further into this since you've already started. I won't have a chance to look at this one today unless someone else does.

Greg

  • *
  • Posts: 1260
I'll keep digging around a bit, although Forge is one of my least looked at pieces of code.  Question though - do we need the ability to specify an image for custom blocks?  Are you only ever able to see this if you right click the custom block and choose Edit Custom Block Details?

Or was it originally planned that it would be possible to share a custom block on Forge?  If not, I would argue that an icon wouldn't be necessary for these.  Maybe that would cut down on complexity. 

If there are plans for Forge someday though, it makes sense to keep it.

Darkhog

  • Posts: 1243
For icons, maybe we should use it like other blocks icon, probably with tag [i:cbicon] (it'll look like blocks with icons alongside them, like mobile controls)?

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Greg

  • *
  • Posts: 1260
I started by creating a very simple test game.

1) One Actor
2) One Behavior (has icon specified)
3) One Custom block in the Behavior from #2 (no icon for the custom block)
4) Attached Behavior to Actor

Created a new resource pack and just put the Actor in it (since any attached behaviors are auto uploaded)

Now when I downloaded this into another game, I found that the icon for my behavior in #2 was missing.  This is about as simple as a test case that I think we're going to get.

Also verified:
1) When you create a new custom block, and don't specify an icon -- it will generate a new missing image icon in the resources folder every time.
2) If you delete the custom block, the missing image icon that it had generated is not removed.

Epic428

  • Posts: 1118
I had this problem too when downloading behaviors such as "Animation Manager" I would notice that when downloaded the Icon for the behavior would be either: A Puzzle Piece, Blank, or the Missing Icon image. Hopefully this turns out to be just as easy of a fix.

I would also have to agree that if custom blocks aren't planned on being shared on forge, the best solution may be to just remove the images altogether.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Greg

  • *
  • Posts: 1260
Here's more info based on my last post.

1) 0.png is the icon for my Behavior
2) 1-0.png is the icon for my Actor
3) 2.png is the icon for my custom block (the default missing icon image).

Here's the log file when uploading the resource pack to forge:

Code: [Select]
[LOG] Sharing: TestBehavior
[LOG] 22467
[LOG] Write String out as file to: D:\Documents and Settings\212040619/.stencylworks/forge/22467-html/index.html
[LOG] Copy file from: games\Icon Test Original\resources\2.png to: D:\Documents and Settings\212040619\.stencylworks\forge\2.png
[LOG] Copy file from: games\Icon Test Original\snippets\Design_0_0_TestBehavior.design to: D:\Documents and Settings\212040619\.stencylworks\forge\Design_0_0_TestBehavior.design
[LOG] Copy file from: games\Icon Test Original\snippets\0.png to: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png
[LOG] Sharing: TestActor
[LOG] Status of Share: HTTP/1.1 200 OK
[LOG] Message of Share: ERROR: Could not upload SWF.
200
[LOG] 22468
[LOG] Write String out as file to: D:\Documents and Settings\212040619/.stencylworks/forge/22468-html/index.html
[LOG] Copy file from: games\Icon Test Original\resources\1-0.png to: D:\Documents and Settings\212040619\.stencylworks\forge\1-0.png
[LOG] Mark actor's sprite as clean (memory).
[LOG] Status of Share: HTTP/1.1 200 OK
[LOG] Message of Share: ERROR: Could not upload SWF.
200

To me, that part looks fine.  Now I created a brand new game and downloaded the resource pack.  Here's what the log looks like:

Code: [Select]
[LOG] Downloading: 22467
[LOG] Download Type:
[LOG] URL: http://static.stencyl.com/forge/assets/22467.zip
[LOG]
[LOG] Unzipping...
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/-1.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/2.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/22467.xml
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/Design_0_0_TestBehavior.design
[LOG] Guessing type of unknown resource: snip-root
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\-1.png to: games\Icon Test Downloader\snippets\0.png
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\2.png to: games\Icon Test Downloader\snippets\0.png
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\Design_0_0_TestBehavior.design to: games\Icon Test Downloader\snippets\Design_0_0.design
[LOG] Missing: My Custom Block
[ERR] Remapping design mode snippet's attributes: games/Icon Test Downloader/snippets/Design_0_0.design
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remapping design mode snippet's attributes to: 0
[ERR] Remap receiver-1-2 to receiver-1-0
[LOG] Initializing Snippet... 0 : TestBehavior : scripts.Design_0_0_TestBehavior
[LOG] Copy file from: games\Icon Test Downloader\snippets\Design_0_0.design to: games\Icon Test Downloader\snippets\Design_0_0_TestBehavior.design
[ERR] Remapped snippet classname: Design_0_0_TestBehavior
[ERR] Has a Dependency
[LOG] Downloading: 22468
[LOG] Download Type:
[LOG] URL: http://static.stencyl.com/forge/assets/22468.zip
[LOG]
[LOG] Unzipping...
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/1-0.png
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/22468.xml
[LOG] Guessing type of unknown resource: root
[LOG] Copy file from: D:\Documents and Settings\212040619\.stencylworks\forge\1-0.png to: games\Icon Test Downloader\resources\2-0.png
[LOG] Initializing... 1 : TestActor
[LOG] Initializing... 2 : TestActor
[LOG] Downloading: 22469
[LOG] Download Type: pack
[LOG] URL: http://static.stencyl.com/forge/assets/22469.zip
[LOG]
[LOG] Unzipping...
[ERR] Extracting file: D:\Documents and Settings\212040619/.stencylworks/forge/22469.xml

Problem #1
Both -1.png and 2.png are copied to 2.png (only the -1 one is valid, since it corresponds to how Forge saved the Behavior icon).  So it looks like icons for custom blocks are overwritting the icon for the Behavior itself.  The issue may be as simple as the fact that it's looking to the snippets folder rather than the resources folder, which is where custom block icons are stored. I haven't looked at the code yet, but maybe it saw that the next available image was 0.png (in the resources folder), and then accidentally saved it to the snippet folder (overwritting the behavior icon).

Possible Problem #2
It's saving 1-0.png as 2-0.png.  Not sure why this is, maybe it's ok. 

« Last Edit: April 07, 2011, 11:00:04 am by Greg »

Greg

  • *
  • Posts: 1260
Sorry for using this to document my research, but if I don't write it down somewhere I'll forget it. 

After taking a quick peek at the code, this is my guess -

1) When we upload a Behavior to Forge, all images (both Behavior icon and custom block icons) are thrown into the same zip file.  When downloading from Forge, we detect the type of resource (in this case Behavior) and then throw all the images into the Snippet folder.  The problem is, custom block icons are normally stored in the Resources folder.  And...how do we know (at the time of download) if a particular image is a Behavior icon, or a custom block icon?

Jon

  • *
  • Posts: 17524
I'll keep digging around a bit, although Forge is one of my least looked at pieces of code.  Question though - do we need the ability to specify an image for custom blocks?  Are you only ever able to see this if you right click the custom block and choose Edit Custom Block Details?

Or was it originally planned that it would be possible to share a custom block on Forge?  If not, I would argue that an icon wouldn't be necessary for these.  Maybe that would cut down on complexity. 

If there are plans for Forge someday though, it makes sense to keep it.

It's been long enough that as the creator, I don't recall what my intentions were. Your guess that I wanted there to eventually be a way to upload standalone custom blocks to Forge is plausible and likely.

Now, I don't see that happening or being feasible, so we should cut this out or cover it up with default icons.

Greg

  • *
  • Posts: 1260
It's been long enough that as the creator, I don't recall what my intentions were. Your guess that I wanted there to eventually be a way to upload standalone custom blocks to Forge is plausible and likely.

Now, I don't see that happening or being feasible, so we should cut this out or cover it up with default icons.

Sounds good, scrapping it would solve the issue that I found with the Behavior icon being overwritten, so I will look into doing that.

Greg

  • *
  • Posts: 1260
Removing the saving of icons for custom blocks appears to have worked.  I did a quick test on my Cutscene resource pack and everything looked good after download (I had to manually delete the missing icon images from the resources directory). 

I'll have people test by using that pack before I commit the fixes.  Also still need to remove the icon image and chooser from the custom block creation page.

Jon

  • *
  • Posts: 17524
Thanks for taking this on. Glad to hear that the initial results were successful.