I recently posted a project (Battleship) that makes use of the location of very small sprites (hidden ships) relative to another sprite (hidden ship grid) to encode information (ship location). It all worked great offline. When I uploaded it to the website, most of the sprites worked fine but a couple of them, in one orientation, gave a different location (by one pixel) in the online version. This really screwed things up. Since I am doing everything at the pixel level, I'm not sure if rounding error can be blamed and I'm really at a loss for why this is happening.
I am going to try to isolate this behavior in a small project so I can show you more easily what is happening. If anybody has an idea now from my description, I'd love to hear it. Thanks!
Offline
I have isolated this bug in the following project: http://scratch.mit.edu/projects/Paddle2See/70495
It appears that the position of the sprite does not change (if you ask for the y position of the sprite) but the actual location on the screen does change, if you send a single pixel sprite probe over and try and touch it. Not only that, but the behavior seems to be related to the number of pixels in the sprite...the sprite that is 5 pixels long (the Carrier) does not show the behavior while the one that is 4 pixels long (the Battleship) does. You won't find it in my sample project here, since I only included two ship sprites, but in my actual project, I noticed the bug occuring in all ship sprites with an even number of pixels (Destroyer and Battleship). Very curious.
Any help you can provide would be greatly appreciated. Thanks.
Mark
Offline
I realize this issue probably isn't very high on anybodys priority list since I've already found a work around. But I am curious to know why this behavior is happening and if anybody on the Scratch team has any interest in pursuing it. If not, I'll get rid of the sample project that shows the bug and declutter my account a little bit. Thanks for your attention.
Offline