So.. Snap! has 3D now :)

https://snap.berkeley.edu/versions/dev/snap.html#present:Username=mr_owlssssnap2&ProjectName=TRUE%203D!!&editMode&noRun
I made a basic 3d enviornment where you can move and rotate with WASD and jump with space.
Only possible in development version

not at all a direction i expected snap to go in, quite neat
there doesn't seem to be any way to color anything? even just for demonstrations mysteriously shaded grey isn't nice to work with. i hope users aren't expected to take the costume and manually color it (that would be really funny but snap is still way too slow at those kinds of graphics operations)

i was interested in performance, so i made a flame graph.


you'd think that 3d rendering or maybe interpreting the blocks would take lots of time, and sure, it does, but check out that canvasBoundingBox function.
image
21% of the time is just spent on that one function, because snap trims the sides of the costume every time it's created. that's a LOT of time doing something that isn't even needed for the project!

i improved the speed of this function significantly a long time ago, it hasn't been pulled. i'm not sure how i'm expected to prove that it works without any dev testing it themselves. does this count? maybe all the graphs are fake!

I feel like someone on the snap team just decided to make a bit more modern version of beetleblocks, which you can see the library took heavy inspiration from. I have a feeling there will be a way to change color, as that is a very needed thing.

What I feel like the 3d library could do to make it even better, is allow the programmer to manipulate the camera, and also enable/disable the user camera control (dragging the camera around).

That'd be cool, but for now I think I actually have an idea

Yeah, but I think it may be necessary for some specific projects, in which case it should be toggleable

Hi, you're right, and I'm that person in the Snap! team. :slight_smile:

I also was the developer of Beetle Blocks, so it was my obvious job to make something similar for Snap!, now that we have a nice extension framework.

Please know that this is in very active development and many things in the API may change.

Regarding color, it grabs the current pen color. I'm not 100% convinced this is the right idea, though.

If I can find the time I'll let you know all about what's behind this extension and the awesome things you can make with it. In the meantime, here's a bunch of shots of things you can currently make with this:

imatge

imatge

imatge

Wow!

Oh, that's cool, I didn't know that.

I honestly don't think it should use the pen's color, but at the same time, it makes it feel less of an external feature and more of an included feature.

Honestly, all I really want right now is a way to detect if the beetle touches an extruded part

image

image

i'm not sure to understand what "right angle" means

image

I might try to create a First Person FPS Test using Beetleblocks, then I might get into some more advanced areas, probably like creating SCP Containment Breach or CS:Go or something.

Okay, maybe not recreating those games, because they're for more mature PG-13 audiences, but the point is that Beetleblocks implemented in Snap! might unlock a plethora of new 3D projects and I'm excited for that.

I think it would be cool if there was a block that is able to get the mouse position relative to the 3d window, as currently there in no way, as the window is not on top of the stage at all times.

Guys, this feature is part of the unreleased beta 10 of Snap, so there's still a lot to come, I beleive.

Also, I just found out Snap 10 has arrows on the context menu for custom blocks to reorder them, just like my mod SnapStuff+, which came out before the beta for Snap 10,

My mod:
image
Snap! 10:
image
so, this may be a stretch but, did I inspire a feature into base snap?

Github repo
2023-12-14

  • byob: let users rearrange custom blocks in the palette, thanks, Simon M. for pioneering this!

Not sure who Simon M is but ok :(

:arrow_right: Please read :arrow_left:

Hi again!

I would suggest you do not invest too much time into this yet. I'm in the middle of developing it. Some things are just proofs of concept, there are bugs, etc. If you could please wait until it is actually released to ask any questions or make any suggestions that'd be very appreciated :slight_smile:

As a one-time thing, though, let me answer your questions:

Right angle is already gone in my local version, so you don't need to waste any time understanding what it meant. It was a bad idea :slight_smile:

That's exactly what I've been debating in my head :person_shrugging:

May eventually do, I'm not sure. The idea behind Beetle Blocks (and the Beetle extension) is to generate geometry, not to interact with geometry. In any case, I may look into it in the future. Not a priority at all right now when more essential things are being worked on.

I'd say... good luck? It'll be paaaaainfully slow and unusable. Again, the 3D Beetle extension is meant to explore generating 3D geometry. Sort of like a programmer's naive and tiny CAD. That is, you look at a real -or imaginary- shape, and try to come up with code that generates it. Or the other way around, you think of an algorithm and explore the kinds of shapes it generates. It's not meant to be a framework for 3D games or anything like that. You can probably do a bit of that to some extent, but not at all to the extent you're imagining.

I honestly don't think we'll ever have this. The 3D window is not meant to be interacted with. That's what the Snap! stage is for. Hold on until I release the docs to read all about the rationale behind all of these decisions.

Absolutely.

Thanks everyone for your interest. Please hold on. You're free to play with it, of course, but beware things will change and break in the dev version. Please don't report any bugs until this is actually released, it will only make development slower...

I'm working on documentation in parallel. There, I explain what the aim of the extension is and what sort of methods you may use for generating different geometries. I'm working through a list of shape examples and finding new interesting ways to generate them. Even rethinking big parts of the extension to accommodate operations I hadn't thought were needed in the first place, or to remove redundant operations.

I think this extension is shaping up to be an interesting thing. Please be patient, and thanks for your understanding!

Off to teach the Beetle new tricks now! :wave: :beetle:

I can tell. Collisions are going to be a nightmare, so I'll try to create a collision system that works at least. Doesn't have to be a masterpiece or have good Box2D Physics, just...yeah.

Hmmmm... You making a FPS Test would lead to someone remaking DOOM in Snap!, which in turn would lead to someone remaking Sonic Robo Blast 2 in Snap!, and that's not even considering the other paths leading from that.

Good idea. Everyone, see you in a year!

Ok.