scratchfoundation / scratch-flash

Open source version of the Scratch 2.0 project editor. This is the basis for the online and offline versions of Scratch found on the website.
https://scratch.mit.edu
GNU General Public License v2.0
1.33k stars 512 forks source link

Variable watchers always in front of sprites #385

Closed Paddle2See closed 9 years ago

Paddle2See commented 10 years ago

This issues was brought to my attention by Boltbait on his Chess project

http://scratch.mit.edu/projects/2737104/

where you can see that the "Ply" variable is in front of the title screen, despite a "go to front" block on the title screen. Dragging the title screen sprite manually in the editor also does not move it in front of the variable for very long - as soon as you release the sprite with the mouse, the variable jumps in front of it.

I remixed the Chess project and removed all the sprites except one, all the variables except one, all the lists except one, etc. This isolation project is here

http://scratch.mit.edu/projects/24759729

It also shows the behavior - although at times it has gone away during this narrowing process so that I had to start over. I've looked at the JSON file of this project and I don't see anything unusual other than a Comments section that seems to contain comments added by the author - there's nothing visible in the project though (that I have found). There is also a rather large History section.

Newly created projects do not seem to have this problem - so I'm thinking there is something weird about this particular project. Consequently, I've tagged it as low priority since it is only impacting a small population so far as we know.

Paddle2See commented 10 years ago

I don't see a way to attach a file here - so I'll paste in the JSON in case it is helpful

{
    "objName": "Stage",
    "variables": [{
            "name": "Ply",
            "value": "3",
            "isPersistent": false
        }],
    "lists": [{
            "listName": "AdditionalMoves",
            "contents": ["E2E4C7C5G1F3D7D6F1B5B8C6B5C4C8G4F3E5C6E5C4E2"],
            "isPersistent": false,
            "x": 163,
            "y": 116,
            "width": 207,
            "height": 199,
            "visible": true
        }],
    "costumes": [{
            "costumeName": "ChessBoard",
            "baseLayerID": 2,
            "baseLayerMD5": "b61b1077b0ea1931abee9dbbfa7903ff.png",
            "bitmapResolution": 2,
            "rotationCenterX": 480,
            "rotationCenterY": 360
        }],
    "currentCostumeIndex": 0,
    "penLayerMD5": "5c81a336fab8be57adc039a8a2b33ca9.png",
    "penLayerID": 0,
    "tempoBPM": 20,
    "videoAlpha": 0.5,
    "children": [{
            "objName": "TitlePage",
            "scripts": [[10, 10, [["whenGreenFlag"], ["say:duration:elapsed:from:", "Going to the Front", 2], ["comeToFront"]]]],
            "costumes": [{
                    "costumeName": "costume1",
                    "baseLayerID": 1,
                    "baseLayerMD5": "4af80414ef17adfc6df548034c2050de.png",
                    "bitmapResolution": 2,
                    "rotationCenterX": 124,
                    "rotationCenterY": 51
                }],
            "currentCostumeIndex": 0,
            "scratchX": 147,
            "scratchY": 57,
            "scale": 1.0000000002328306,
            "direction": 90.00000000023283,
            "rotationStyle": "normal",
            "isDraggable": false,
            "indexInLibrary": 1,
            "visible": true,
            "spriteInfo": {
            }
        },
        {
            "target": "Stage",
            "cmd": "timeAndDate",
            "param": "minute",
            "color": 2926050,
            "label": "minute",
            "mode": 1,
            "sliderMin": 0,
            "sliderMax": 100,
            "isDiscrete": true,
            "x": 5,
            "y": 5,
            "visible": false
        },
        {
            "target": "Stage",
            "cmd": "timeAndDate",
            "param": "year",
            "color": 2926050,
            "label": "year",
            "mode": 1,
            "sliderMin": 0,
            "sliderMax": 100,
            "isDiscrete": true,
            "x": 5,
            "y": 32,
            "visible": false
        },
        {
            "target": "Stage",
            "cmd": "timeAndDate",
            "param": "month",
            "color": 2926050,
            "label": "month",
            "mode": 1,
            "sliderMin": 0,
            "sliderMax": 100,
            "isDiscrete": true,
            "x": 5,
            "y": 59,
            "visible": false
        },
        {
            "target": "Stage",
            "cmd": "getVar:",
            "param": "Ply",
            "color": 15629590,
            "label": "Ply",
            "mode": 3,
            "sliderMin": 3,
            "sliderMax": 4,
            "isDiscrete": true,
            "x": 396,
            "y": 91,
            "visible": true
        },
        {
            "listName": "AdditionalMoves",
            "contents": ["E2E4C7C5G1F3D7D6F1B5B8C6B5C4C8G4F3E5C6E5C4E2"],
            "isPersistent": false,
            "x": 163,
            "y": 116,
            "width": 207,
            "height": 199,
            "visible": true
        }],
    "info": {
        "spriteCount": 1,
        "projectID": "24759729",
        "flashVersion": "WIN 14,0,0,145",
        "videoOn": false,
        "os-version": "NT",
        "author": "BoltBait",
        "userAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/35.0.1916.153 Safari\/537.36",
        "scratch-version": "1.4 of 30-Jun-09",
        "history": "2012-7-19 17:04:32\tsave\tChess\t\tBoltBait\r2012-7-19 17:38:40\tsave\tChess\t\tBoltBait\r2012-7-19 19:08:58\tsave\tChess\t\tBoltBait\r2012-7-20 14:45:51\tsave\tChess\t\t\r2012-7-20 14:46:37\tsave\tChess\t\t\r2012-7-20 16:37:41\tsave\tChess\t\t\r2012-7-20 17:23:54\tsave\tChess\t\t\r2012-7-21 08:43:11\tsave\tChess\t\t\r2012-7-21 08:43:19\tsave\tChess\t\t\r2012-7-21 09:05:16\tsave\tChess\t\t\r2012-7-21 12:03:11\tsave\tChess\t\t\r2012-7-21 14:19:45\tsave\tChess\t\t\r2012-7-21 14:22:08\tsave\tChess\t\t\r2012-7-21 15:12:22\tsave\tChess\t\t\r2012-7-21 18:06:04\tsave\tChess\t\t\r2012-7-21 18:16:56\tsave\tChess\t\t\r2012-7-21 18:31:36\tsave\tChess\t\t\r2012-7-21 19:04:59\tsave\tChess\t\t\r2012-7-21 20:11:51\tsave\tChess\t\t\r2012-7-21 20:20:15\tsave\tChess\t\t\r2012-7-21 20:24:38\tsave\tChess\t\t\r2012-7-21 21:26:40\tsave\tChess\t\t\r2012-7-21 21:43:07\tsave\tChess\t\t\r2012-7-21 21:54:15\tsave\tChess\t\t\r2012-7-22 19:48:46\tsave\tChess\t\t\r2012-7-22 20:00:22\tsave\tChess\t\t\r2012-7-22 20:03:05\tsave\tChess\t\t\r2012-7-23 16:49:54\tsave\tChess\t\t\r2012-7-23 18:00:02\tsave\tChess\t\t\r2012-7-24 15:50:30\tsave\tChess\t\t\r2012-7-24 16:08:44\tsave\tChess\t\t\r2012-7-24 16:24:15\tsave\tChess\t\t\r2012-7-24 16:24:36\tsave\tChess\t\t\r2012-7-24 16:35:48\tsave\tChess\t\t\r2012-7-24 16:57:06\tsave\tChess\t\t\r2012-7-24 18:16:17\tsave\tChess\t\t\r2012-7-24 18:27:52\tsave\tChess\t\t\r2012-7-24 18:28:50\tsave\tChess\t\t\r2012-7-25 11:52:35\tsave\tChess\t\t\r2012-7-25 11:56:35\tsave\tChess\t\t\r2012-7-25 12:18:41\tsave\tChess\t\t\r2012-7-25 12:21:42\tsave\tChess\t\t\r2012-7-25 12:39:50\tsave\tChess\t\t\r2012-7-25 12:44:26\tsave\tChess\t\t\r2012-7-25 12:55:42\tsave\tChess\t\t\r2012-7-25 12:57:11\tsave\tChess\t\t\r2012-7-25 14:21:17\tsave\tChess\t\t\r2012-7-25 21:36:41\tsave\tChess\t\t\r2012-7-25 21:44:00\tsave\tChess\t\t\r2012-7-25 23:07:29\tsave\tChess\t\t\r2012-7-25 23:09:07\tsave\tChess\t\t\r2012-7-25 23:21:17\tsave\tChess\t\t\r2012-7-26 13:18:05\tsave\tChess\t\t\r2012-7-26 18:50:21\tsave\tChess\t\t\r2012-7-26 18:52:45\tsave\tChess\t\t\r2012-7-26 19:01:20\tsave\tChess\t\t\r2012-7-26 19:31:15\tsave\tChess\t\t\r2012-7-26 19:47:26\tsave\tChess\t\t\r2012-7-26 23:42:54\tsave\tChess\t\t\r2012-7-26 23:47:38\tsave\tChess\t\t\r2012-7-26 23:51:20\tsave\tChess\t\t\r2012-7-27 18:18:04\tsave\tChess\t\t\r2012-7-27 19:50:11\tsave\tChess\t\t\r2012-7-27 20:00:01\tsave\tChess\t\t\r2012-7-27 20:55:59\tsave\tChess\t\t\r2012-7-27 21:13:35\tsave\tChess\t\t\r2012-7-27 21:15:46\tsave\tChess\t\t\r2012-7-27 21:57:03\tsave\tChess\t\t\r2012-7-27 22:10:49\tsave\tChess\t\t\r2012-7-27 22:22:57\tsave\tChess\t\t\r2012-7-27 22:35:20\tsave\tChess\t\t\r2012-7-27 22:44:13\tsave\tChess\t\t\r2012-7-27 23:09:24\tsave\tChess\t\t\r2012-7-27 23:49:20\tsave\tChess\t\t\r2012-7-28 00:00:55\tsave\tChess\t\t\r2012-7-28 10:22:59\tsave\tChess\t\t\r2012-7-28 11:21:36\tsave\tChess\t\t\r2012-7-28 12:04:11\tsave\tChess\t\t\r2012-7-28 21:07:43\tsave\tChess\t\t\r2012-7-28 21:33:40\tsave\tChess\t\t\r2012-7-28 21:46:18\tsave\tChess\t\t\r2012-7-28 21:53:53\tsave\tChess\t\t\r2012-7-28 22:17:06\tsave\tChess\t\t\r2012-7-29 00:51:46\tsave\tChess\t\t\r2012-7-29 13:23:27\tsave\tChess\t\t\r2012-7-29 13:33:36\tsave\tChess\t\t\r2012-7-29 13:41:07\tsave\tChess\t\t\r2012-7-29 14:48:17\tsave\tChess\t\t\r2012-7-29 15:24:41\tsave\tChess\t\t\r2012-7-29 16:53:06\tsave\tChess\t\t\r2012-7-29 17:07:10\tsave\tChess\t\t\r2012-7-29 20:10:58\tsave\tChess\t\t\r2012-7-29 20:53:37\tsave\tChess\t\t\r2012-7-29 21:15:51\tsave\tChess\t\t\r2012-7-29 21:22:19\tsave\tChess\t\t\r2012-7-29 21:36:29\tsave\tChess\t\t\r2012-7-29 21:38:25\tsave\tChess\t\t\r2012-7-29 22:08:21\tsave\tChess\t\t\r2012-7-29 22:35:39\tsave\tChess\t\t\r2012-7-29 23:36:43\tsave\tChess\t\t\r2012-7-30 23:05:26\tsave\tChess\t\t\r2012-7-30 23:09:35\tsave\tChess\t\t\r2012-7-30 23:14:16\tsave\tChess\t\t\r2012-7-30 23:16:30\tsave\tChess\t\t\r2012-7-30 23:17:24\tsave\tChess\t\t\r2012-7-30 23:37:33\tsave\tChess\t\t\r2012-7-31 18:06:37\tsave\tChess\t\t\r2012-7-31 19:00:22\tsave\tChess\t\t\r2012-7-31 19:11:45\tsave\tChess\t\t\r2012-8-1 21:53:43\tsave\tChess\t\t\r2012-8-2 13:21:48\tsave\tChess\t\t\r2012-8-4 10:04:50\tsave\tChess\t\t\r2012-8-4 12:07:11\tsave\tChess\t\t\r2012-8-4 19:10:50\tsave\tChess\t\t\r2012-8-4 19:17:43\tsave\tChess\t\t\r2012-8-4 19:55:40\tsave\tChess\t\t\r2012-8-4 21:24:32\tsave\tChess\t\t\r2012-8-4 21:31:04\tsave\tChess\t\t\r2012-8-4 22:25:51\tsave\tChess\t\t\r2012-8-4 22:33:08\tsave\tChess\t\t\r2012-8-18 16:52:20\tsave\tChess\t\t\r2012-8-18 22:37:28\tsave\tChess\t\t\r2012-8-18 23:24:55\tsave\tChess\t\t\r2012-8-18 23:30:47\tsave\tChess\t\t\r2012-8-18 23:39:08\tsave\tChess\t\t\r2012-8-18 23:46:03\tsave\tChess\t\t\r2012-8-19 00:15:42\tsave\tChess\t\t\r2012-8-19 00:22:13\tsave\tChess\t\t\r2012-8-19 19:24:26\tsave\tChess\t\t\r2012-8-19 19:31:21\tsave\tChess\t\t\r2012-8-19 19:34:00\tsave\tChess\t\t\r2012-8-19 19:40:28\tsave\tChess\t\t\r2012-8-19 19:47:21\tsave\tChess\t\t\r2012-8-21 22:57:37\tsave\tChess\t\t\r2012-8-21 23:00:14\tsave\tChess\t\t\r2012-8-21 23:02:19\tsave\tChess\t\t\r2012-8-21 23:16:33\tsave\tChess\t\t\r2012-8-21 23:39:44\tsave\tChess\t\t\r2012-8-22 00:16:07\tsave\tChess\t\t\r2012-8-23 10:59:57\tsave\tChess\t\t\r2012-8-23 11:12:14\tsave\tChess\t\t\r2012-8-23 11:47:53\tsave\tChess\t\t\r2012-8-24 00:49:21\tsave\tChess\t\t\r2012-8-25 12:49:46\tsave\tChess\t\t\r2012-8-25 12:51:58\tsave\tChess\t\t\r2012-8-25 13:09:46\tsave\tChess\t\t\r2012-8-25 13:41:50\tsave\tChess\t\t\r2012-8-25 14:02:06\tsave\tChess\t\t\r2012-8-25 14:14:27\tsave\tChess\t\t\r2012-8-25 14:18:30\tsave\tChess\t\t\r2012-8-25 16:10:11\tsave\tChess\t\t\r2012-8-25 16:14:57\tsave\tChess\t\t\r2012-8-25 16:55:22\tsave\tChess\t\t\r2012-8-25 17:40:23\tsave\tChess\t\t\r2012-8-25 17:42:35\tsave\tChess\t\t\r2012-8-25 17:45:17\tsave\tChess\t\t\r2012-8-25 17:58:54\tshare\tChess\tBoltTest\t\r2012-8-25 18:19:41\tsave\tChess\tBoltTest\t\r2012-8-25 21:39:23\tsave\tChess\t\t\r2012-8-25 22:04:36\tshare\tChess\tBoltTest\t\r2012-8-25 22:38:08\tsave\tChess\tBoltTest\t\r2012-8-25 22:38:57\tshare\tChess\tBoltTest\t\r2012-8-25 22:45:31\tshare\tChess\tBoltTest\t\r2012-8-25 23:10:00\tshare\tChess\tBoltTest\t\r2012-8-25 23:33:04\tsave\tChess\tBoltTest\t\r2012-8-26 00:37:36\tsave\tChess\t\t\r2012-8-26 00:38:30\tshare\tChess\tBoltBait\t\r2012-8-26 01:01:05\tshare\tChess\tBoltBait\t\r2012-8-26 01:12:32\tshare\tChess\tBoltBait\t\r2012-8-26 01:18:03\tshare\tChess\tBoltBait\t\r2012-8-26 01:24:03\tsave\tChess\tBoltBait\t\r2012-8-26 02:07:47\tsave\tChess\tBoltBait\t\r2012-8-26 02:08:22\tshare\tChess\tBoltBait\t\r2012-8-26 02:19:49\tsave\tChess\tBoltBait\t\r2012-9-2 00:19:59\tsave\tChessV21\t\t\r2012-9-2 00:20:51\tsave\tChessV21\t\t\r2012-9-2 00:32:43\tsave\tChessV21\t\t\r2012-9-5 22:31:42\tsave\tChessV22\t\tBoltBait\r2012-9-6 22:44:51\tsave\tChessV22\t\t\r2012-9-6 22:59:49\tsave\tChessV22\t\t\r2012-9-6 23:15:58\tsave\tChessV22\t\t\r2012-9-6 23:18:31\tsave\tChessV22\t\t\r2012-9-6 23:35:11\tsave\tChessV22\t\t\r2012-9-6 23:36:49\tsave\tChessV22\t\t\r2012-9-6 23:52:43\tsave\tChessV22\t\t\r2012-9-6 23:54:26\tsave\tChessV22\t\t\r2012-9-7 00:17:38\tsave\tChessV22\t\t\r2012-9-8 11:21:47\tsave\tChessV22\t\t\r2012-9-8 11:26:45\tsave\tChessV22\t\t\r2012-9-8 11:44:26\tsave\tChessV22\t\t\r2012-9-8 12:10:51\tsave\tChessV22\t\t\r2012-9-14 21:48:27\tsave\tChessV22\t\t\r2012-9-29 10:14:14\tsave\tChessV22\t\t\r2012-9-29 10:26:34\tsave\tChessV22\t\t\r2012-9-29 10:27:47\tshare\tChess\tBoltBait\t\r2012-9-29 10:34:57\tshare\tChess\tBoltBait\t\r2012-9-29 10:41:51\tshare\tChess\tBoltBait\t\r2012-9-29 10:51:51\tshare\tChess\tBoltBait\t\r2012-9-29 10:57:29\tsave\tChess\tBoltBait\t\r2012-9-29 11:05:20\tsave\tChess\tBoltBait\t\r2012-9-29 11:14:07\tsave\tChess\t\t\r2012-9-29 11:35:04\tsave\tChess\t\t\r2012-9-29 11:49:11\tsave\tChess\t\t\r2012-9-29 11:50:06\tshare\tChess\tBoltBait\t\r2012-9-29 12:07:07\tsave\tChess\tBoltBait\t\r2012-9-29 12:08:40\tshare\tChess\tBoltBait\t\r",
        "language": "en",
        "hasCloudData": false,
        "scriptCount": 1,
        "swfVersion": "v420",
        "comment": "Chess\rBy: BoltBait\rVersion 2.3\rDevelopment time: ~31 hours\r \rFeatures:\r \r-Click the \"See Inside\" button for a brief history of The Turk.\r-Castling and en passant captures supported.\r-The Turk uses a small opening book which I designed myself.\r-The Turk uses the MiniMax algorithm with a 3-ply or a 4-ply search depth.  It considers about 25,000 or 800,000 board positions per turn based on ply.\r-Click the wrench to adjust the ply (difficulty level).\r \rBe sure to run this project in the online Flash player with Turbo Mode enabled.\r \rLimitations:\r \r-The game ends when a king is captured.\r-Pawn promotions are limited to Queen.\r-If you leave yourself in \"check\" The Turk will capture your king without warning.\r-Repetitive position draws are not detected.\r \rIf you think this is a good project and want to show your appreciation \/ encouragement, please click the \"love it\" link below the project window.  Thanks!\r \rv1.0\rInitial Release.\r \rv1.1\rAdded \"check\" indicator.\r \rv2.0\rAdded the 4-ply chess engine.\r \rv2.1\rAdded some entries to the opening book to correct some poor plays.\r \rv2.2\rChanged to Algebraic Notation.\r \rv2.3\rFixed black En passant captures.\rAdded + indicator to notation.\rAdded more entries to the opening book to correct poor plays.",
        "platform": "Win32"
    }
}
nathan commented 10 years ago

I added ``` to your comment so it formats the JSON nicely. If you want to attach big files, you can also use gist.

Paddle2See commented 10 years ago

Thanks Nathan.

Son of a ....I just shared the isolation project...and now it doesn't show the behavior any more. I am not happy. So maybe the page refresh did something?

nathan commented 10 years ago

comment and history are added by the Scratch 1.4 project converter (they were the old way of storing remix history and project notes).

nathan commented 10 years ago

This is caused by the 3D renderer. We don't render variable and list watchers in 3D, so we put them on a separate layer above the sprites. The reason it went away in your test project is that you removed the effects blocks that triggered the 3D renderer.

nathan commented 10 years ago

A workaround is to remove all effects blocks from the project except brightness and ghost.

Paddle2See commented 10 years ago

Yeah, okay, but it was showing in my test project - right up to when I shared it. I saved it many times to make sure that the behavior was still there - and it was. Right up until I shared. Does the render decision only get made on share? I thought it happened on the fly.

nathan commented 10 years ago

Does the render decision only get made on share? I thought it happened on the fly.

It gets decided when you load the page (sharing forces a reload) and it gets enabled when you put an effect block in your project, but it doesn't get disabled when you remove the effects blocks until you reload the page or press ctrl + m.

kaschm commented 10 years ago

Let's discuss removing ability to put watchers behind sprites. @ntlrsk

kaschm commented 9 years ago

Thanks for pointing this out. This is a feature - just added to rally. Closing it out.

tjvr commented 8 years ago

@kaschm Did this discussion move somewhere else, or was it decided not to do this?

nathan commented 8 years ago

@tjvr the 3d player still does this, but I don't know what the plan is for the future. Unless they start rendering watchers in 3d with the sprites, it's probably here to stay.