The Hopscotch Webplayer

This is really cool!

4 Likes

that’s epic! definitely a super sick feature.

4 Likes


Yeah maybe I’m going overboard with this.

At least the touch targets save between page loads now
(and you can hide them by pressing esc)

3 Likes

And it’s live (no docs yet). It’s in my test project, so you can open two tabs up, create a session in one, and join from the other. For now you can mess with the prefilled commands, but later I might add a “soccer ball demo” (if you know what I mean) or something of that matter.

@TheModders

8 Likes

im not really sure how i can add and edit blocks and their code in the webplayer. @Awesome_E?

2 Likes

You mean like adding an entire block to the webplayer, right?

There’s a few steps:

  1. First, you’ll want to have a page that uses your own script instead of HS’s
  2. You need to modify certain lists in the code like this one (they usually have case statements):
  3. … then make sure they’re defined in the iterator
4 Likes

Awesome! Can’t wait for the docs!

4 Likes

in the meantime you can read the docs for keyboard support if you really want :)

4 Likes

That’s pretty cool actually. I bought a computer recently finally lol so that’d be a cool thing to test out. :)

4 Likes

How do I do that?

2 Likes

If your browser supports split screen, you can drag it from the dock to the left or right side of the screen and it should open two tabs, one on each side of the screen.

3 Likes

Umm it does support split screen but doesn’t work on itself.

2 Likes

That won’t work then :(

3 Likes

Then why did you say I can? /lh /sarc

2 Likes

There should be a null frame testing project that shows where random frames are being added by the player when they in theory shouldn’t be.

3 Likes

Aside from only being on the modded player only, there’s a lot you can do with it. However, the reads, from what I’ve tested, are pretty slow, meaning you can only continuously update a few variables per player at a time.

That means it’s good for games like racing against one another and showing positions, but the current implementation doesn’t work well for games with lots of items like coin and power up positions that need to continuously be synced between devices.

As for the way the variables get stored, there’s practically no limit. You can store numbers, strings, booleans, and even arrays and dictionaries if I’m not mistaken, and they can be stored globally or for a specific user (like game vs object variables).


I’ve also created some updated multiplayer functionality, but haven’t written docs on it yet. It’s self-hosted instead of relying on Firebase (which was meant for real-time apps but probably not multiplayer at any large capacity), the syntax is similar to the current implementation (I hope migrating won’t be that hard), and performance should be better with reads and writes.

8 Likes

I’m wondering what the server architecture would be limited to. Are you inferring that multiplayer can be P2P? Can I choose which server the multiplayer should be hosted on if I wanted to, and can it be a player hosted instance?

In terms of practicality, it seems like this would be a lot of fun for forum games… granted, mostly if your player is also fully iOS compatible.

3 Likes

Any NodeJS server + MongoDB replica set. It’s been coded already but not documented

I don’t know how peer to peer works, but this implementation uses web sockets and a server to pass data

Not currently, and this could be hosted really anywhere but would need changes to connect to new locations

It probably has more potential than that, since reads and writes, at least in theory, have a much higher limit in terms of speed

3 Likes

Very nice. :)

That sounds pretty darn consistent to work with, honestly.

The limitation I’m imagining is that vanilla clients from the app can’t connect, so you couldn’t make something at a small/medium scale (like an 8 player lobby system) due to playerbase size.

I mean, imagine a multiplayer-compatible project getting featured nominated as a seed project, but the only multiplayer is through your custom client. It simply limits the amount of everyday users that can interact with it, if you know what I mean

3 Likes

Oh I see. Perhaps I can create a shortcut that bundles the functionality of multiplayer into the app’s webplayer, but yeah it’s still not there without modification

Yeah aside from the whole rate of adoption for modding, the user base isn’t that active + interactive with stuff like it, which only drives the numbers down more. It makes sense though.

1 Like