Blockly graphics not working

Started by UnRedKnown, November 23, 2023, 07:45:53 AM

Previous topic - Next topic

UnRedKnown

*
Newbie
Posts: 4
Logged
I wanted to make something not too complicated (blockly) but also relatively hard and currently missing from the arcade (as far as i'm aware), so i'm trying to make an all-in-one calculator, but basically all blocks from the graphics tab don't work, besides the print to display one. It's kinda hard to graph a quadratic funtion without drawing pixels. I tried with a much simpler program too, to see if it was maybe something else, but no.

TL;DR: Blockly graphics tab not working, not my fault

Jason

Administrator
*****
Hero Member
Posts: 107
TinyCircuits Employee
Logged
Quote from: UnRedKnown on November 23, 2023, 07:45:53 AM
I wanted to make something not too complicated (blockly) but also relatively hard and currently missing from the arcade (as far as i'm aware), so i'm trying to make an all-in-one calculator, but basically all blocks from the graphics tab don't work, besides the print to display one. It's kinda hard to graph a quadratic funtion without drawing pixels. I tried with a much simpler program too, to see if it was maybe something else, but no.

TL;DR: Blockly graphics tab not working, not my fault

Could you share a screenshot of your blockly program? I can help you debug it that way.

UnRedKnown

*
Newbie
Posts: 4
Logged
#2
Quote from: Jason on November 27, 2023, 09:59:08 AM

Could you share a screenshot of your blockly program? I can help you debug it that way.

Figured it out, i didn't put the Draw to display block beforehand. Still, if i see Draw white fill, it should draw to display without anything else no?

Jason

Administrator
*****
Hero Member
Posts: 107
TinyCircuits Employee
Logged
Quote from: UnRedKnown on December 01, 2023, 05:37:38 PM
Quote from: Jason on November 27, 2023, 09:59:08 AM

Could you share a screenshot of your blockly program? I can help you debug it that way.

Figured it out, i didn't put the Draw to display block beforehand. Still, if i see draw to display it should draw to display without anything else no?

The draw block/code is required. Drawing everything out to the screen right away would take more time and impact performance. When you draw anything it is put in a buffer very quickly (compared to sending data to the screen) and then the entire buffer is sent in one transmission to the screen when you use the draw block.

UnRedKnown

*
Newbie
Posts: 4
Logged
#4
Quote from: Jason on December 01, 2023, 05:39:57 PM
Quote from: UnRedKnown on December 01, 2023, 05:37:38 PM
Quote from: Jason on November 27, 2023, 09:59:08 AM

Could you share a screenshot of your blockly program? I can help you debug it that way.

Figured it out, i didn't put the Draw to display block beforehand. Still, if i see draw to display it should draw to display without anything else no?

The draw block/code is required. Drawing everything out to the screen right away would take more time and impact performance. When you draw anything it is put in a buffer very quickly (compared to sending data to the screen) and then the entire buffer is sent in one transmission to the screen when you use the draw block.

Another issue would be that it only works in a loop? First does, second stays on print to display

Jason

Administrator
*****
Hero Member
Posts: 107
TinyCircuits Employee
Logged
Quote from: UnRedKnown on December 01, 2023, 06:03:22 PM
Quote from: Jason on December 01, 2023, 05:39:57 PM
Quote from: UnRedKnown on December 01, 2023, 05:37:38 PM
Quote from: Jason on November 27, 2023, 09:59:08 AM

Could you share a screenshot of your blockly program? I can help you debug it that way.

Figured it out, i didn't put the Draw to display block beforehand. Still, if i see draw to display it should draw to display without anything else no?

The draw block/code is required. Drawing everything out to the screen right away would take more time and impact performance. When you draw anything it is put in a buffer very quickly (compared to sending data to the screen) and then the entire buffer is sent in one transmission to the screen when you use the draw block.

Another issue would be that it only works in a loop? First does, second stays on print to display

The first image starts a while loop once A is pressed and then exits out of it when B is pressed.

The second image will only fill the screen with white while A is held down (not just quickly pressed).

SMF spam blocked by CleanTalk