Discuss Scratch

bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

imfh wrote:

bloctans_4 wrote:

so as a performance test i ran https://scratch.mit.edu/projects/659120206/ through the converter, and the results are:
the converting assets stage used up all my cpu
the actual project used all my memory
the project cant run in 1920x1080
Hmm, yeah that seems like a stress test of the asset conversion.

bloctans_4 wrote:

https://assets.scratch.mit.edu/get_image/.%2E/38373c8c5c08f9f4e7ae8b90e6e2dc40.png
i feel like this would be too hard to fix
Not necessarily… The colors are probably not too hard to fix. The positioning might be a bit harder though.

bloctans_4 wrote:

another error with griffpatches gd: ERROR:root:Error in gathered task ‘<Task finished name=’Task-143' coro=<Spritemenu.broadcast_menuin1() done, defined at D:\sb3topy-1.1-beta\sb3topy-1.1-beta\outputs\project.py:2883> exception=NameError(“name ‘co nfig’ is not defined”)>'
Traceback (most recent call last):
File “D:\sb3topy-1.1-beta\sb3topy-1.1-beta\outputs\engine\util.py”, line 170, in _handle_tasks
task.result()
File “D:\sb3topy-1.1-beta\sb3topy-1.1-beta\outputs\project.py”, line 2898, in broadcast_menuin1
await util.sprites.broadcast_getrank(util)
File “D:\sb3topy-1.1-beta\sb3topy-1.1-beta\outputs\project.py”, line 3377, in broadcast_getrank
await self.my_TexttoNumber(util, config.USERNAME)
NameError: name ‘config’ is not defined
It looks like the username block is broken. I'm not sure how that missed testing. It's an easy fix though.

bloctans_4 wrote:

https://assets.scratch.mit.edu/get_image/.%2E/2129bf83add22918656df9391f6e092d.png
how did you fix this?
Fix what?
well
1. ok
2. seems reasonable
3. ok
4. what im talking about is how the rotation is done, it feels too, weird.
also another issue is that the sprite goes a few pixels forward or back when rotating for my vm
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame


this is weird
ZZC12345
Scratcher
500+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

bloctans_4 wrote:


this is weird
Like the error?
If you're talking about the json, that's a Scratch Block.
imfh
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

bloctans_4 wrote:


this is weird
Is that error related to this project? I don’t think so since it is JavaScript.

That is a weird error though. Those are not valid inputs/fields for a motion_gotoxy block, which expects two inputs, “X” and “Y,” and no fields. Was the project converted from Scratch 2 to Scratch 3?
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

imfh wrote:

bloctans_4 wrote:


this is weird
Is that error related to this project? I don’t think so since it is JavaScript.

That is a weird error though. Those are not valid inputs/fields for a motion_gotoxy block, which expects two inputs, “X” and “Y,” and no fields. Was the project converted from Scratch 2 to Scratch 3?
this is another vm im working on
also no, it wasnt converted, the code for that block (jn scratch) is:
go to x: (0) y: (0)
heres the surrounding blocks:

edit 1: also i wish i was able to talk to people that knew about block parsing outside of this forum inside of another topic or something
but i rarely get any responses

edit 2: just tested with your converter and the project works fine, unless it skips blocks it cant parse

Last edited by bloctans_4 (Aug. 25, 2022 15:22:51)

bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

ok i just found the issue

apparently its acting like setvar block is the gotoxy block
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame


the top is the proper one, the other is the set var block, what makes this happen?
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

another edit, it turns out the actual json has the issue with the blocks
ZZC12345
Scratcher
500+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

bloctans_4 wrote:

imfh wrote:

bloctans_4 wrote:


this is weird
Is that error related to this project? I don’t think so since it is JavaScript.

That is a weird error though. Those are not valid inputs/fields for a motion_gotoxy block, which expects two inputs, “X” and “Y,” and no fields. Was the project converted from Scratch 2 to Scratch 3?
this is another vm im working on
also no, it wasnt converted, the code for that block (jn scratch) is:
go to x: (0) y: (0)
heres the surrounding blocks:

edit 1: also i wish i was able to talk to people that knew about block parsing outside of this forum inside of another topic or something
but i rarely get any responses

edit 2: just tested with your converter and the project works fine, unless it skips blocks it cant parse
I learned a lot about Scratch Block parsing from this repo.
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

ZZC12345 wrote:

bloctans_4 wrote:

imfh wrote:

bloctans_4 wrote:


this is weird
Is that error related to this project? I don’t think so since it is JavaScript.

That is a weird error though. Those are not valid inputs/fields for a motion_gotoxy block, which expects two inputs, “X” and “Y,” and no fields. Was the project converted from Scratch 2 to Scratch 3?
this is another vm im working on
also no, it wasnt converted, the code for that block (jn scratch) is:
go to x: (0) y: (0)
heres the surrounding blocks:

edit 1: also i wish i was able to talk to people that knew about block parsing outside of this forum inside of another topic or something
but i rarely get any responses

edit 2: just tested with your converter and the project works fine, unless it skips blocks it cant parse
I learned a lot about Scratch Block parsing from this repo.
doesnt really help, the json file is the issue here
ZZC12345
Scratcher
500+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

bloctans_4 wrote:

ZZC12345 wrote:

bloctans_4 wrote:

~snip~
this is another vm im working on
also no, it wasnt converted, the code for that block (jn scratch) is:
go to x: (0) y: (0)
heres the surrounding blocks: ~snip~

edit 1: also i wish i was able to talk to people that knew about block parsing outside of this forum inside of another topic or something
but i rarely get any responses

edit 2: just tested with your converter and the project works fine, unless it skips blocks it cant parse
I learned a lot about Scratch Block parsing from this repo.
doesnt really help, the json file is the issue here
No, that library parses the blocks dictionary (or JavaScript object? lol) inside the JSON file. I read through the library to learn about how the blocks were structured, then wrote my own parser.
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

ZZC12345 wrote:

bloctans_4 wrote:

ZZC12345 wrote:

bloctans_4 wrote:

~snip~
this is another vm im working on
also no, it wasnt converted, the code for that block (jn scratch) is:
go to x: (0) y: (0)
heres the surrounding blocks: ~snip~

edit 1: also i wish i was able to talk to people that knew about block parsing outside of this forum inside of another topic or something
but i rarely get any responses

edit 2: just tested with your converter and the project works fine, unless it skips blocks it cant parse
I learned a lot about Scratch Block parsing from this repo.
doesnt really help, the json file is the issue here
No, that library parses the blocks dictionary (or JavaScript object? lol) inside the JSON file. I read through the library to learn about how the blocks were structured, then wrote my own parser.
yeah, my parser checks for the opcode, and reads the inputs based on that opcode, some of the inputs for some reason use inputs from another block, like a set var block

Last edited by bloctans_4 (Aug. 28, 2022 15:01:28)

bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

turns out that that doesnt mean anything

i now have trust issues with json.parse
Keaton42
Scratcher
34 posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

I've started on Lua and Python about a month ago and it's been pretty fun, I wanna make a decent game soon, my only goals are to make people happy and have fun making the game.
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

Keaton42 wrote:

I've started on Lua and Python about a month ago and it's been pretty fun, I wanna make a decent game soon, my only goals are to make people happy and have fun making the game.
off topic.
IAMATP
Scratcher
79 posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

-OofyRoblox- wrote:

I know this might sound stupid, but I'm 12 (I've already learned java and python; yep I'm a nerd) and I'm on a school Chromebook, is there a way I could use this because python doesn't install on here
You can use https://www.replit.com
5_g
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

IAMATP wrote:

-OofyRoblox- wrote:

I know this might sound stupid, but I'm 12 (I've already learned java and python; yep I'm a nerd) and I'm on a school Chromebook, is there a way I could use this because python doesn't install on here
You can use https://www.replit.com
replit is slow in many areas
bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

5_g wrote:

IAMATP wrote:

-OofyRoblox- wrote:

I know this might sound stupid, but I'm 12 (I've already learned java and python; yep I'm a nerd) and I'm on a school Chromebook, is there a way I could use this because python doesn't install on here
You can use https://www.replit.com
replit is slow in many areas
then what do you suggest?
(edited cuz i dont wanna be banned for some stupid joke i made)

Last edited by bloctans_4 (Nov. 2, 2022 17:05:20)

bloctans_4
Scratcher
1000+ posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

bloctans_4 wrote:

5_g wrote:

IAMATP wrote:

-OofyRoblox- wrote:

I know this might sound stupid, but I'm 12 (I've already learned java and python; yep I'm a nerd) and I'm on a school Chromebook, is there a way I could use this because python doesn't install on here
You can use https://www.replit.com
replit is slow in many areas
then what do you suggest? smart guy?
(btw the stroke means that im jokingly saying it)
Agazila
Scratcher
3 posts

[v1.1-beta] sb3topy: Scratch to Python with Pygame

how do i download it?

Powered by DjangoBB