[Extension] arcade-split-screen

Do they not use microbits instead? its still makecode? I’m pretty sure eighth does it in the computer science class

Hey folks! Big update to the split screen extension today! I basically refactored the whole thing, so now it has a bunch more options.

Global Split Screen is now a Sprite

This one is a little weird to wrap your head around, but the split screen is now a Sprite, which means you can do Sprite things with it. You can access the sprite using this block:

image

Why does that matter? Well, now you can use other Sprite related blocks with it, like changing its position, setting it to be invisible, controlling which screen it renders on with the second screen extension, changing the z-index that it renders at so you can draw HUD elements above it, etc. If you’re not worried about any of that, you can ignore it! It’ll work exactly the same as it did before.

This split screen Sprite has the “Relative to Camera” and “Ghost” flags set on it automatically. Also, make sure you don’t destroy this Sprite! It will make the split screen stop working.

New Global Split Screen Blocks

We have four new blocks for the global split screen!

The first one lets you set the z-index that the split screen will capture everything below at. Again, this is mostly useful if you have HUD elements that you want to render above the split screen

The second one, as mentioned above, returns the Sprite that renders the split screen.

The third one lets you get the various properties of the split screen cameras. This is just like the camera x/y/left/right/top/bottom block in the scene category.

The last one lets you change the render size of the screen. By default, the split screen always takes up the full screen size, but with this block you can make it only take up part of the screen. If you change the size, you’ll probably want to reposition it so remember that you can move the sprite around with the blocks in the Sprites category!

New Camera View Sprites

Why do I keep saying “global” split screen? Well, that’s because there’s a new bit of functionality in the split screen extension! You can now create individual “camera view” Sprites that give you a lot more flexibility in how you split up the screen!

These sprites have all the same blocks as the global split screen, but each camera view sprite has only one camera.

You can also create as many as these as you want. Does your game need 16 individual cameras for some reason? Well, that’s now something you can accomplish:

split-screen-insanity

Code for that example is here

Of course you could also use this for a more sane purpose, like having a picture in picture view in your game. It’s up to you!

9 Likes

also, as of five seconds ago, the camera view sprites support scaling! so if you want a zoomed in camera, you can make that happen!

the global split screen does not support scaling

6 Likes

Oh jeez. This is the type of stuff that I can’t think of a use for yet, but some day I’ll be game designing and say “I need a Picture in Picture view which renders at exactly z52!” And then I will import this extension and I will be very happy.

No Larger Screen Support?

not sure what you mean, it works with large screens?

4 Likes

Oh wait it does? Didn’t Splitscreen not support larger screen sizes?

it always has! online multiplayer doesn’t

3 Likes

one idea on how to use it is a picture-in-picture view when players go off screen:

each player gets a little indicator when they go off screen that shows their sprite and immediate surroundings

5 Likes

with a little trickery you can also change the shape of the preview:

the camera view sprites do have an image and that image will contain the rendered camera view so you can mess with it if you’re careful

5 Likes

This was one of the things I was missing in Zenith Smash.
Copies code.

4 Likes

That’s all well and good but

this is so smart and would have saved me SO many lines of code on some of my projects!

3 Likes

This seems cool! How do I update the extension? Because I already have it open in my project, but I want to add all this cool stuff!

1 Like

Make a download of your project first incase it breaks, then go into JavaScript, open the Explorer in the bottom left underneath the simulator, scroll down to the bottom of the files list where all the extensions are located, and click the little reload icon next to the version number!

Then switch back to blocks and if it’s broken then you’ll have to probably make a new project with the extension and copy and paste code from the download you made.

3 Likes