Vidscreens scripts having issues

Howdy! I am working on a small tool to make it easier to make games for vidscreens and running into some issues.

We were able to get the breakout example and my code working, but not reliably. Also, it seems like when we reload it stops working and does not work again. Does anyone know what the deal is with vidscreens? Is there any in world I can check out to see how they work?

Here’s the tool, it’s a vidscreen emulator! Also included are a bunch of helper functions to make it easier to work with, like drawing squares and such…

Here’s where it is working, this was the only time I ever saw it work…

1 Like

Heya this is awesome, is the script on your emulator the one I should be testing with? Can you post a link to your parcel where the vidscreen is in world so I can debug? I think it’s probably just bugs with the control system on vidscreens, I’m pretty sure we can fix it for you.

Thank you! The script in my demo should work but we’ve had the problem with breakout stopping working also.

Currently breakout is working, my game is not. When i peaked under the hood it looked like my game is set up differently (not in onclick), not sure if that has anything to do with it.

There is currently a bit of a race condition when saving scripts causing the parcelScript object to not reload accurately, I’m gonna try to fix that today. Not sure if that’s currently affecting you

That could be it! Wessel describes it as almost a random occurrence. We can’t seem to get a reliable way to make it work. Possibly it breaks all vidscreens in that same parcel? Maybe there is a long delay before it starts working? Not sure, but I hope your fix does it.

BTW, more about the tool I made. It’s pretty much done for now and fully compatible emulator for vidscreens. So you can use this to write vidscreen code and check that it works easily. There is also a stand alone version that does not have a text area and executes the code directly.

The other half of the tool is the really useful funtions for writing onto the vidscreen. Things like setting hsl color with alpha. Drawing lines, squares, and even ability to draw numbers. I can add a simple pixel font if there is interest.

Can you create a repo for your draw tools and we’ll link to it from the wiki? A pixel font would be amazing too :slight_smile: Do you want us to opensource anything around vidscreens that would make your life easier?

edit: this is ben on a secret alt account

Here’s the github repo.

I also moved just the draw tools to a separate js file, if you want to link to those.

A new release was pushed to address the scripting instance not reloading properly, let me know if it helps!
Also, now a little icon will tell if the parcel scripting is being reloaded or not.
cc @predictcrypto.eth

1 Like

Awesome, thanks, we will give it a shot!

I think we figured out the issue. It was mostly caused by just slow but sometimes fast loading that was making it seem like the vidscreen was broken. Even worse sometimes it seems like the scripts never load and I just need to restart. Also something about the scripts didn’t like how I was using a const variable at the top.

Working pretty awesome now! Code written in my emulator should just drop in and work! Here’s my game running the world…