pxt-arcade icon indicating copy to clipboard operation
pxt-arcade copied to clipboard

Make the Sprite Util and Scaling extensions available in the main Extension library

Open bmarslandCN opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. We regularly see the MakeCode livestream team using the Sprite Util (jwunderl/arcade-sprite-util) and Scaling (jwunderl/pxt-scaling) extensions in their projects, but those extensions are not easy to access because they are not in the "main" Extension library. We would love to see both of those extensions available to use more easily.

Describe the solution you'd like We would love to more easily be able to add the Sprite Util and Scaling extensions by having them in the main Extensions library.

Describe alternatives you've considered We have used the search feature using the full extension name from github, but this is tricky when writing curriculum that uses the code from these extensions, especially since the extension names we have to search with are long.

Additional context This is the scaling extension I'm referring to (the additional scaling extension blocks only available by searching jwunderl/pxt-scaling): image

Thank you for considering!

bmarslandCN avatar Feb 15 '23 19:02 bmarslandCN

@jwunderl

Do you know if these extensions have everything they need to be brought in as official extensions? I thought that scaling already was? Does sprite-utils just need documentation?

kiki-lee avatar Feb 21 '23 21:02 kiki-lee

for reference, these two: https://github.com/jwunderl/pxt-scaling and https://github.com/jwunderl/arcade-sprite-util

I think I did a decent job at first of adding docs in sprite util (though they could use a refresher), but a few more blocks have snuck in after the first batch that need their own documentation (e.g. I think the on update that runs at certain points in the game loop).

I haven't done any docs for pxt-scaling - it does a good job of rotations using the rotsprite algorithm most of the time so I think it's worth keeping even if we look at other (less memory / compute intensive) algorithms.

Both also need an icon but that's not a big barrier~

jwunderl avatar Feb 21 '23 22:02 jwunderl

I second this! A couple of weeks ago I wrote some tutorials for my students for calculating distance and direction using the standard blocks - the resulting code was really quite bloated. And then I found the Sprite Utils extension (thank you @jwunderl , it's awesome!)

I would go one step further and say that some of the blocks should be added to Arcade as standard blocks, especially:

  • distance between mySprite and myEnemy
  • angle from mySprite to myEnemy
  • place myEnemy angle 0 distance 0 from mySprite
  • set mySprite velocity at angle 0 speed 0 (along with perhaps 'set acceleration at angle' for the sake of completeness)

I feel like these concepts, essentially just Pythagoras' Theorem and basic trigonometry, have very broad reach.

Thank you!

dcgs-sbu avatar Mar 11 '23 16:03 dcgs-sbu

Hello! Wanted to resurface this issue and see if there's any possibility of these 2 extensions being made permanent/regular extensions in the MakeCode Arcade Extension library. Thanks! @jwunderl @kiki-lee @abchatra @ssmolevitzCN

bmarslandCN avatar Dec 06 '23 16:12 bmarslandCN

@jwunderl feel free to add these two extension to approved it in targetconfig

abchatra avatar Dec 06 '23 17:12 abchatra