Help me a make a block engine

I am making a project that looks like a Snap! replica. I am currently stuck trying to make a block engine. Here it should works at follows:

  • It consists of three parts: the left part that has the extruding part, the middle which is duplicated for longer blocks and the right to complete the outline. Use nested sprites/clones to glue the parts together.
  • Make a Verdana font text engine so it appears over the block too
  • Add support for inputs. Similarly use left, middle and right parts.

Why I'm doing that is so it can support inputs better and in the future maybe I will add custom blocks. And, it should be able to be moved stably and it's a little boring for me to rip each letter of the Latin alphabet in Verdana font.

If you can find the font online, you can write a Snap! program to read the font file and extract the characters, I think.

Not to get offtopic but, is that even possible? do font files use traditional image data?

Some use svgs.

Not really. There are svg fonts, but then there't TrueType fonts that don't use image data, but some other type. I don't really know, but you can google it.

If it is not in Snap! Take a look at my BAB - Replit

I don't know about font file formats, but this is the 21st century and there's the internet, and somehow or other they have to be able to turn the font into pixels, which is what you want, in order to display text!

In fact, a scratcher has been able to create a website to convert a font file into a format used by their text engine in scratch, as well as another text engine that is based off costumes, e.g. converting a font file to images.

The projects I'm talking about
Stamp Font Engine++ (characters as costumes)
Pen Font Engine++ {characters in some format in lists)

I'm only mentioning these because they could be useful in reading font files, and also because these projects are very impressive (for scratch anyway).

Cool, thanks!

There are some useful font processing concepts
Set Font, Bold and Italic for Pen Writing Block

Yes, I've read all of those. The only thing is that I'm not on my computer right now (which does all the work efficiently). You can also do the work of ripping the alphabet for me, but maybe just focus on the block length.

Try this Snap! Build Your Own Blocks

why ? this has nothing to do with this topic

i dont recommend using clones as they get very slow with only very few on the screen

...it doesn't do that much

Yes it does it is stamping as pixels

i think they are talking about outside of Snap!

Oh then just try to look at BAB it’s not a block coding engine but you get the idea or look into snap source code it uses morphic

Oh yeah looking at Snap! source code was a nice idea but I'm pretty sure that Snap! blocks use closed paths, not individual parts.

Yeah but snap! Also utilizes CTX(also known as canvas rendering context) which is where you can draw stuff on a html canvas that is how the blocks were created and the UI and others utilized morphic