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

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
bloctans_4
Scratcher
1000+ posts

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


this is weird

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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.

This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
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?

Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
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)


Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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?

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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.

This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
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

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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.

This is my signature. Go check out my GitHub if you want to!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Make sure to check out these cool projects, written in real code! (outdated, sorry)
Aviate - Itinerary - Scratch Auth - Orange OS Linux Distro - ocular - Leopard - PyHelp - My GitHub
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)


Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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.

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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

Join my studio!
Shape Fillers

To join, ask me on my profile. Everyone is invited!
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

Pro forumer, Scratch Empires I OG


Im hosting Scratch origins SMP part 2, a modded minecraft server for all scratchers! Join it here! Scratch origins 2 is delayed until the summer, i will notify everyone before it starts dont worry
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)


Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
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)

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
Agazila
Scratcher
3 posts

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

how do i download it?

Powered by DjangoBB