Dear viewer, these subtitles were generated by a machine via the service Trint and therefore are (very) buggy. If you are capable, please help us to create good quality subtitles: https://c3subtitles.de/talk/2173 Thanks!
Hello again.
On the remote Congress,
another day in the Hexham Stream,
the following talk will be with David
Nicolai, the main developer of
work at Ventrell the Little World.
The whole Congress is happening in
some May watching about inside
the stream, and some may become
around in the world.
And David will tell us some details
about at Ventrell how to hack it
to a halt to make unexpected things
inside and
have a lot of fun and the talk.
And there will be a Q&A later
on in the room again.
You will
have the link in the
end of the talk. Thank you.
Hi, everybody.
I'm really happy to be here with you
today as we will be talking
on how we can Huk walk
adventure for fun and profit,
so I'm pretty sure you all know what
work adventure is about because it
is a virtual universe that is
taking place,
whether US history world is taking
place right now.
So the little characters
moving into the virtual universe is based
on what convention?
So today we're going to see
how what convention was billed
as an open platform and what it means.
It means that we can try generating
dynamic maps, but also we can
try scripting maps and
cryptic maps sometimes has limitations,
so we're going to see how we can hack
around those limitations to open more
possibilities.
Cool.
A quick note about me.
My name is David nÂ°.
I'm the dad of
work, and I'm sure I started the project
like one year and a half ago during
the French lockdown,
and I'm
solidly the developer.
So what does it mean
for working as I'm sure to be an open
platform?
Well, apart from having the code on
GitHub,
the look at should've been designing
maps for walk adventure for
us this free world.
You had to submit the maps
and they had to be validated because
art history wanted to have a coherent
experience.
But the fact is that
when you're doing a short
walk adventure mean
you don't have this acceptance
and you need to validate anything.
And actually, if you look at the URL
of a map, it looks like that.
Here you've got what
what looks like a URL
inside you are right?
And that, well, it's
this you are really here is actually
the URL of the map that
is going to be loaded by what convention?
So how does it work?
There is a cover of there is a browser
running walk adventure, and
they both load the up
from any web server anywhere
in the world. So if you want to design
them up, you take time that this
is the map editor.
It generates a JSON file
and this JSON file, you can put it in
any web server.
And the only thing is that the web server
here must, of course,
properly set.
This is really important
because otherwise the browser will
not be able to do and if such a request
to the server.
But as soon as those are set,
you can really put your map anywhere.
One of the things is that
you can actually use GitHub
because it has a service called guitar
pages that acts as
a free web server.
So if you don't have a web server or
Raspberry Pi at home, you can
just get the pages. And since it's on
GitHub, you can also use
git workflows like making pull requests
and stuff like that to work
as a team on your map.
But this is really static
files, and since you
can host your map anywhere and the
request will be made, you could also
generate your map dynamically.
And this is where the fun is, actually.
So you can take any web server,
Node.js, HP,
Python, whatever and
generate a file.
So in order to generate this file,
the first thing you have to know is,
well, how to generate it
and what is the JSON format for this
file? But hopefully this is
well explained in the
documentation of
Tile.
So sure, I put a link to the
documentation. It's quite
self-explanatory.
You've got layers, you've got
the tiles, you've got tile sets.
It's actually kind
of quite easy to use.
And once you understood that
based on file format, what can you do
with it? Well, this is where
the fun part is, and you have to figure
it out, actually.
But for instance, you could try to
generate a map that is based
that is changing, whether it's raining
or the weather outside the Senate,
you could generate a map
from OpenStreetMap data.
You could make a map that
contains an art collection based
on and if you've got, I don't know,
really, it's up to you to find
a clever hack, actually.
But there is a few things you need
to know since.
What show is loading them up once?
Well, if the map is modified after
it has been loaded, what kind of
control will not notice since the
map is uploaded that none of those are
whatsoever?
So if there are any changes, you will
need to refresh your page
so that the map is redundant.
And also, this means
that you could try to present
different maps to different players,
and they would set different
maps and still be moving
on to parallel
universe.
You can actually take advantage of that
if you want, for instance, to open
a door for some users and close it for
us.
But yes, these are kind of limitations.
Still, you can do pretty amazing things.
And this year I've got an open
map the most that has been
developed by Jonathan Angel, which
is a really, really cool hacker.
The guy is absolutely awesome
and, well, let me show you.
Sarah, I'm connecting.
And oh, OK, so I've
got my little Pacman character.
Well, if I move to.
In a place
where you can see that all this data
is actually fetched from
from OpenStreetMap, and if you have
a look at what is really, really fun,
I've got a latitude and longitude
parameter here.
And finally, title's a little bit.
And if I refresh the page.
Dynamically switch data
from another place, so it's running on
his Raspberry Pi at home, this
map, so it's a bit slow, but hey,
look, I've got another
place and schedule desert base
where you can actually put entries
and exits a bit everywhere.
So yeah, it's a really, really nice
hack.
And the I was pretty amazed when
I saw that.
Yeah.
I've been thinking about
putting entries and exits
just before
you saw that from one point I could go
to another map and in what can ensure
we do that by actually putting
a property which we call exit euro
inside the map? So on this
ledger here, when I work here, I
will go here.
And this actually is, if
you think about it, pretty much looking
like an hypertext link
on a webpage and
even more.
But we've got what we call
the zones that
we defined using stuff your property
and as the name of the ledger.
Here it is down to this test.
And if I go on the web page
and I'm adding Dash
Dunzo stuff here, I'm I'm
actually entering the page
at the very position of the ledger,
which is kind of fun because
if you think about it.
Well, what kind of map
are JSON files that can be hosted
anywhere on the web, just like
Edge similar webpages?
And is it an untruth in what
conventional map?
They are my mapping hypertext
links and anchors on the web.
And so that leads me to
think of Walken's onshore not
only as a platform,
but rather as a browser.
I see it as a browser of maps
that could be anywhere on the web.
A bit like a web browser
enables you to navigate
its similar web pages.
And this was actually the state of
work in Hunter in December 2020
when we did the previews of
history.
And it wasn't really like that.
The fact is that
since last year, a lot of things happened
and the first of things that happened
is that we had a lot
of good contributions thanks to the
Chaos Computer Club, because it
provided us a lot of visibility.
A lot of people started hacking around
making pull requests on the main
repository and
basically it, yeah, it
blew up.
We had a ton of new features.
People provided us with zones
where you could they sound some music?
Oh, animations and maps.
Images of components got some
looks cool and actually
been implemented at all, but
by the community at large and
some of it, some some guy
came and said, Look,
I've got this excellent
pull request and
it allows you to play animations
when you get next to near an object
and the CGI animation can optionally play
backwards. And I was like, Whoa.
And the funny thing is that
the rest of the community was like, Oh,
yes, yes, yes, this is a really, really
good idea.
Actually, what this was going to do
was like when you woke up
on the grass, the grass can move.
So it's cool effect
and it wasn't that cool.
But for me, it was also kind
of a problem because,
well, as a maintainer
of an open source solution, if I was
accepting too much things, I would have
to maintain them and especially because
I started hosting a walk adventure
software as a service solution online.
I could not afford to do any breaking
changes because my users,
if I change the format of the maps, they
won't be happy, I thought.
So basically,
you should think about it.
The needs that the developers were
expressing was they wanted to be able
to create cool stuff was what kind of.
And I had a need to restrict
a bit
the number of
pull requests I was accepting.
Otherwise it would get
difficult.
So how how did with
the you remember this
comparison between what conventional
and the web browser?
Well, there is something with a web.
Oh, it's like
actually, you can modify the JavaScript
with Adam and in the walk, as
I'm sure that we could not do
at all, and this was a real problem.
So what I wanted
actually to do was to open the ability
here for people
to add scripts in to
the map, to be able to build cool stuff.
And with scripting
that could be really creative
without having to add new properties
all the time. OK.
But in order to do scripting,
I had an issue that I have
a big need to isolate
isolate as the context is
basically if someone is providing a map
and if I'm running a
script from the map in Sidewalk
Adventure, well,
I'm running JavaScript
into my webpage and it could definitely
be accessed across
South Scripting Issue,
which is not good.
So I need to protect myself against that.
So how did we do?
Well, we used iPhones.
Because when you run
inside the nighttime, it's isolated from
the mainland, right?
So you should think about
it.
You've got the browser here.
There is a map and on the map
I'm hiding a very, very small.
I found it's one pixel by one pixel
transparent. Nobody can see it, but it's
here, and the iPhone can contain
JavaScript code that is run.
And the fact is
JavaScript.
The iPhone can communicate
with the browser using what we call
the first message API, which is a native
API that is available in
any browser, and it's a communication
communication mechanism between
iPhones.
So
you should look at it. It's really is it.
You can send messages in windows.
The first message you put any JSON
message here and
you want to receive a message on the
other in the other frame, you just
other. It's not on the message isn't.
And you get that message back.
And since this is our JSON messages,
well, there
you can build a format and check the
format, and the communication is
clear and
well-defined, which is important
when you want to do something that is
secure.
But I still had the problem.
The item I was quitting
could access zadam of the
parental element because it
was all in the same domain.
OK, my iPhone is treated on the fly
by my application, so it
is all in the same domain, which means
that because of the same origin
policy,
the ultram could access
as a parent, as a parent, trim,
insert a script tag and so
basically will
open an excess
flow in my application.
So I had to protect myself from that.
And the solution to that, it's
little known that the A-frame
you can use an attribute such is called
some books and
some books attribute.
It lets you decide what a nation
can do or not as soon
as you put the sandbox attribute family
is really restricted and then you open
what it is allowed to do.
So I'm allowing to run
scripts because I want to allow
JavaScript.
But is justice the
friend is losing its origin?
OK. It does not have any domain anymore,
which means that if it does not have any
domain, well,
the same origin applies again.
I cannot accept the apparently from and
I'm good to go.
And this is critical.
So what you can remember from this
is that you should use the first message
API and entrance that the some.
You can actually run into your
application set particle.
So particle the code that is coming from
someone else in a sexual way
and without the code risking
to
have too many impacts
are on your
application.
So what we did after was hiding the
complexity of the window, that's the
first message behind a flip
from the API, and the result
is this
is a sample script.
I've got this W
object that is while
a global object, and this year I'm
listening when I'm entering the zone,
which is then a clock which is here.
And when this happened, I'm opening a pop
up that this is the time.
So, OK, so it's a small example of what
it's possible to do with this scripting
API.
So yeah, it's pretty cool.
And there are already many
things you can do. You can read the map,
you can show and highlight.
Yes, it literally just what the title
on the looked at and said
a lot of stuff.
And it's all
still a lot of things that are missing
and that we are adding every day.
And so community at large is helping
us.
But there is one thing I want to stress
out is that because the script
is executed in the browser,
some changes that are applied are
applied only locally and especially
if you edit a layer issue at the
or something like that.
By default, this is not shared
with other players.
So we need to add
a communication mechanism
between my player and
other players in order
to dispatch messages
and so that people can see the same
map and to do this
well. When we added
officials at the school valuables,
so valuable thought was stuff like
that live on the server
and that in a browser
when you use a w a
state object,
anything that you set here will be shared
with with
other browsers. What happens actually, is
that when you call this
the food that equals the bar, a
message is sent Zappa's message
API to the browser workers
unsure when this addresses to the server,
which will dispatch the message to other
pages.
Which will send the message back to the
other eye, friends and hey,
Siri, are states assured, shared and we
have the same values
in both places.
And additionally, you can even
listen to changes using unavoidable
change here, which allows you to
fire a callback
when available is changed.
So with this, we can share a state
and display.
For instance, if I've got the door, it
can be open or closed, depending
on the state of the variable, which will
actually show or hide a.
We have a lot of things to add in
the scripting API.
We need still to be able to track other
players
really, really a lot of things to do.
And but the cool thing is that the
community understood that and
that most of the pull request received
from the community are now made to
change the scripting
API and to allow everybody to
want to have fun and to build cool
stuff with it.
Still, there
are some limitations, as I
told you, there are some books
is, well, often getting in the way
because there are some books.
Ephraim does not have an origin,
so it cannot make and
calls because when I do an exceptional
call, I need an origin and I
can't do that anymore.
And this is really a problem because
often when you script them up, you want
to be able to connect to something else.
So is it really possible?
Well, I'll show you how you can
hack around this limitation.
And the first trick is actually using
web sockets because surprisingly
enough, I was not aware of that.
But web sockets are not
bound to the same origin policy
as anywhere
in any webpage.
If you open the web socket, you can
connect to absolutely anywhere, which is
pretty cool.
So it means that from the scripting API
here, if I open the web socket,
I can connect to any server here.
So a server I hold
and it was just there to get data,
whatever, but I can do this
on the web socket instead of doing this
with Accenture.
The second trick, which is actually made
it easier, is to use embedded
iPhones.
Since a few months. You can create old
friends and put them inside maps,
and those
items actually
buys those iPhones, actually.
Well.
They are posted on the website,
but they are not in the same
website as what adventure is.
Which means that because of the same
origin policy, so are not in the same
domain. They cannot access the foreign
frame and don't access
apparent friend.
I don't have to put
the same books attributes on this iPhone,
and if I don't have to put the sandbox
attributes, you keep your own origin and
you can do an actual request
really easily.
So my advice is actually, if
you are building a script
with walk alone, rather than using the
native script feature, you
put a really, really small I friend,
you hide it in size and up.
You put a script inside the atrium
and you will be able to get to make
much more sense with the native
solution, which is kind of
interesting.
OK, quickly move.
The first one is done by
Jonathan.
Again, it's a minesweeper.
I would never have expected someone to do
something like that, but well,
as you can see this Typekit
space probe.
I can sit here.
Well, I can play a minesweeper and I can,
of course, blue on the mind,
which is kind of fun, and this has been
completely done with the scripting API
and I designed that to open and close
doors and suddenly I've got a full game
in it and all I find is actually
pretty, pretty cool.
And the other remote is a wet one,
which is done by Chuck Wood
and Russell.
And
you can play the video at this point.
And well, as you can see,
well, it's a backgammon club
where you can eat
bugs and you can.
It's a multiplayer game.
And if you if a
ghost is catching you, well, you left.
Yeah. And this has
been done well.
Also completed with the scripting API and
a lot of cool hacks to
overcome the shortcomings of the
scripting attack.
So, yeah, so tomorrow.
But well, what are we going to
do?
Well, I very much would like to make
what content shows the ultimate sandbox,
so I'll try to keep working on this API
and opening more possibilities.
And if you want to
to play it with me.
Well, you're welcome.
Everything is on GitHub, and
I would be really, really
happy to see what amazing hacks
you can come up with.
So that's it.
Well, I hope you enjoyed
the.
I'd be really I would be really happy to
to to speak with you about it on the US
ROG. If you're looking
at a replay of the video.
I'm also in my virtual office, usually
at work and functions that are remote.
And if you want to come and talk,
I'm usually there so well, don't
hesitate.
So actually very much for watching, and
that's OK.
Bye bye.
Yes, thank you, David, for this
interesting talk about
book adventure.
Oh, a lot of
people, we are creating the world
we are inside this Congress,
walking around, experience interesting
places or working
on that all the time.
And now we have some advanced
information.
We can make this place even better
if you need another virtual event
of all, let people take place
over the internet.
Oh, you can join the Q&A if
you have further questions on this
on events dot
Hexham dot org
slash awesome don
slash ADA.
So please
contact us in our Q&A.
You can also use a QR code
to get inside, and
we will change over here right now.
Thank you very much.