Blockly graphics not working

UnRedKnown

  • Newbie
  • *
    • Posts: 4
    • View Profile
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: 106
  • TinyCircuits Employee
    • View Profile
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
    • View Profile

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?
« Last Edit: December 01, 2023, 05:39:52 PM by UnRedKnown »


Jason

  • Administrator
  • Hero Member
  • *****
    • Posts: 106
  • TinyCircuits Employee
    • View Profile

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
    • View Profile

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
« Last Edit: December 01, 2023, 06:05:21 PM by UnRedKnown »


Jason

  • Administrator
  • Hero Member
  • *****
    • Posts: 106
  • TinyCircuits Employee
    • View Profile

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