[Extension] arcade-drawing-utils

Hey folks!

Time for another extension inspired by the Zelda-like game we’ve been working on for stream. I present: riknoll/arcade-drawing-utils

This extension has some notable improvements over the base drawing blocks in the image category:

  • All x/y coordinates in the drawing functions are represented by points rather than two numbers. You can also use sprites or tilemap locations wherever a point is accepted
  • All of the target image shadow blocks are replaced with the screen by default
  • The fill and outline blocks are combined with a dropdown to switch between
  • Adds circles, triangles, and four sided polygons
  • Adds a block for drawing a thick line in addition to the usual 1-pixel wide lines
  • Adds a block for copying part of an image to another image
  • Adds a block for drawing tilemaps to the screen (great for games with multiple tilemaps)

In addition to drawing, there are some other new transform blocks for some nifty image effects:

  • Lots of blocks for swapping colors in images
  • A new block for scrolling images by an x/y value
  • A block for rotating images in 90 degree increments

Finally, this extension also provides lots of way for you to make custom render functions that draw to the screen:

  • Render on z (just like the similar block in jwunderl/arcade-sprite-utils)
  • A dockable version of render on z that you can place inside a function
  • Renderables that can be assigned to variables and destroyed (great for drawing temporary things like effects or menus)
  • Blocks for rendering above/below individual sprites. Great for applying effects to sprites like flashing when taking damage or for making sprites that are drawn entirely using shapes
  • A loop that loops over all of the tilemap locations that are currently visible on screen (great for Animating tiles in tilemaps)

Examples

18 Likes

This has been such a fun series to watch! I’m looking forward to watching live on Friday! I have Fridays off now, so I’m hoping to catch y’all every week. I missed last week because I got distracted. :laughing:

6 Likes

its crazy how many extensions you’ve been releasing and just when im getting rlly busy lol

7 Likes

hehe i’ve got a bunch more that i haven’t even posted yet

10 Likes

I love all these extensions you bring out/everyone else who does, but my brain kind of just breaks in two when I try to understand any of them :sweat_smile:

3 Likes

But it’s not compatible w/ sprite utils :(((

1 Like

@BlueYoshi507 it totally is, not sure what you’re referring to

2 Likes

wasent there already a extension for animation tiles?

also Im a little confused why cant I just animate the player the tiles kinda make sense and the shapes why can I just again animate the sprites

do whatever you’re comfortable with! there are lots of ways to do similar things. this extension gives you a lot more flexibility in how you draw things, but i’d also say it’s at the expense of being much more complicated/advanced

2 Likes

maybe they mean like could be combined all in one

All visible tiles will help SO MUCH! Thank you!!!

like don’t render what’s not on screen?

1 Like

yeah i found it TilesXtra - new extension with animated tiles has animated tiles

why does no one talk about THIS


this could be so useful for drawing a tail like that one tail game thingy @TeddyB asked help on

2 Likes

Hi is there a way to make these sprites images with your extenstion?

1 Like

https://makecode.com/_ewhX6g7v60fp Richard is the remove renderable block working it doesn’t seem to remove the renderables in my demo

hmm, yeah looks like there may be a bug. i’ll take a look when i have a sec

but, i think i should also point out you’re using the “render above sprite” block incorrectly:

  • you never want to call “render above sprite” inside of an on game update, you only need to register the handler once (i.e. when you create the sprite)
  • that block is for rendering to the screen, but you’re drawing to a sprite’s image (which you don’t need a special block to do). try changing the image to the screen block from the images category and see if that’s closer to what you want
  • if the “remove all renderables” block was working, your code would result in nothing being drawn to the screen because you’re immediately removing the renderable after registering it. renderables don’t run immediately, they only run when the screen is rendered

new bug z depth not working properly or I’m just bad if its the second option could you find a way to fix it

i have no idea what you’re trying to do in this program, i need more context than that