OK, OK, how's the sound?
Do you have an in sound?
Hey, welcome everyone.
I'm Graham.
And we make the first, we pass the Blippower at GameConsons of World.
But no spoilers, you will see it, and we go a bit through history of the game console.
And fun fact, it started on the previous first game.
So it started here at now, it comes here, and maybe it will inspire
some of you to make your new projects this way, pass them to the end.
Oh, we'll get to it. But let's start, do we have Mike for people?
Is that I can use? Is that I can give thousands?
Okay, we'll make it easier.
So who knows what pass them please?
A trick question, right? And what pass them to the bottom?
Who can say it in the mic?
Okay, let's, Frank, give it a try.
It's like a JVM for the web browser, but not only the web browser,
it could also run without a browser.
That's perfect. That's the answer, because
some people say that the first thing about what pass them is the name.
It's not as simple, and it's not only for web.
And when I started to go into the pass, simply,
all of you, it's just web without JavaScript.
That's it. But that was enough to get me hooked.
Because you can take normal human programming language,
compile it into binary executable.
And now you have front end without touching JavaScript, and it's wonderful.
But indeed, the pass them is much, much, much,
oh, I have a clicker.
The pass them is much, much more than just Z.
It's a part of programming.
It has lots of features that make it a clip applicable everywhere.
It's a part of lots of programming languages.
C++, Z, Rust, Go.
And the best one of them is actually C because there are lots of
entrepreneurs in C. We have Python running and browser.
We have Lua, we have operating systems.
Windows 95, running and browser.
We have Doom, running and browser.
It's amazing technology.
It's universal glue that allows you to take any application
and bring it anywhere.
It's very, very fast.
It's slower than if you would write a nice application in C
and optimize service.
It probably cannot do good drivers in my pass them,
but it's designed in a way to be very close
to how actual processor works.
It has amazing observability features.
It's a virtual machine.
And you know how many instructions are executed.
Which functions are called at any point?
And you can limit, you can prevent applications going
into an infinite loop.
You can see what are Z doing, create now.
How they are doing it.
And with observability, it's wonderful.
It's just wonderful.
And I will show you examples how they use it.
It has amazing security features and desolations.
Desolations, you cannot everything
that a pass-ample application does, your environment controls it.
You know, which files it access, which functions.
It cannot just get random value from anywhere.
It's full control from you as an environment writer.
And there are lots of projects that bring you
a good outside of just web.
So the biggest initiative is the VAC, the pass-ample system
interface.
It describes names and signatures of functions,
so how the pass-ample application works.
If it needs access, something from the environment,
it declares list of imports.
And with simple, with our names of functions,
it can call and their signatures.
And VAC describes the state of this functions,
the application can call, and the environment needs to provide
for application to make fully, fully compatible
post-explications.
So what does it mean?
You can access, using VAC, you can access
environment variables, files, in files system, random values,
and so on and so forth.
And it's working.
And of course, again, the same applies here.
The environment can provide fake values.
If we have an application in the pass-ample,
and we want to test it, and that it uses, for instance, time,
we can provide it fake time.
We can pull it in any point in time.
And there are so many applications for it,
billions that I can just make examples out of my head.
We will find more and more, as we explore, with my exact knowledge.
And in the previous fast-diam, Ron, here is Ron,
say hi to Ron.
Hi, Ron.
Ron is one of the main contributors in tiny gotium.
And the tiny go is compiler for go for small places.
So go is pretty small language.
You can read the whole specification for the language
in an evening court.
And they wrote alternative compiler for go,
which I was here to write go application,
and compile it into very, very small places.
You will see some examples from Ron.
I'm pretty sure about it.
But there are applications, go applications,
written with the compiler to stay in go,
running in keyboards, in drones.
You can buy from them, if you go to their stand,
in a double built-in, you can buy from IK as a creator
of tiny go.
Irjans of this size, the drone go on it.
And last fast-diam was asked, OK, what if we take
pure go of some interpreter, compile it with tiny go,
and run it on embedded systems?
And what we end up with, I just want a good run correction.
So we got by zero, which is pure go on interpreter,
for awesome.
I think there were already a few talks about it earlier.
And we made mechanoid, which is with framework for writing
applications in go, host applications in go,
so that you can utilize full power of the possible
what I mean, you can make, for instance, home automation system,
write it in go, compile it with tiny go, run it on Raspberry Pi,
or even some fixed smaller, like a speed source, too.
And let people write extensions for it in any program
in language using the power of the possible.
And run will show you.
So the previous conference, he was running a drone,
the first drone in the world, controlled by the possible.
And you will see more drones.
I'm not that brave as run to get moving objects,
but all his presentation is in my own objects.
And what we end up with is this thing.
This is the smallest game console in the world.
You can see it on this screen next to the other coin.
And here, there is a call saying hello.
It doesn't look like much, but it runs the possible.
And this is what we did.
And the next thing, and this was a big moment
of realization for me, that if we can run the possible,
in the smallest game console, in the world,
we can run it anywhere.
And the next thing, so I wanted to do something interesting.
There is framework called Wasom4.
It is fantasy game console.
What is fantasy game console is?
A few people.
So it started with project called Pika8.
A guy made this fantasy game console, that's me.
Fantasy means that the game console never existed.
There is just a multimeter for your computer for it.
But it's kind of framework for making games,
but it has limitations, specifically in post limitations,
to make games feel retro.
So you have only a bit of RAM.
You have only a bit of colors.
You have specific smoke, screen resolution,
so I play Game Boy Advance, and it's very pixelated.
And it caught attention of many people, many game developers.
People started to make lots of fun games for it.
And Wasom4 is the same thing.
But you can write games for it.
Again, the name programming code, which is a person who
has a password, and they compare it into a password.
So they provide zero and host functions for drawing,
triangle, square, sprite, playing sound.
And it runs in browser.
So this is browser environment.
And what I decided to do, I decided to take rest.
So I switched from goal to rest, because I wanted
zero and some reason, I pass on the interpreter.
I was showed to you for rest.
And because I wanted to save every byte of performance
for the actual game.
And what I ended up, and I got was me.
Wasme is the pass on the interpreter for rest,
designed for constraint environments.
It is designed to run on such a very, very small.
And what I learned at the top is this, this is pay batch.
Pay batch from other fruits.
It has some, like, 100 tits of kilobytes of RAM.
Again, it's very small.
At the trans, I ran out of juice, but we have a photo.
It always happens with live-domas.
So always have a backup.
This is game written for web for vasomfor.
It was never designed to run here.
But since this is the pass, and since I
control the whole environment, I can run it here.
It runs just perfectly.
And the next thing I say, OK, if we take our own hardware,
what if we make hardware designed for a new pass?
What if I not try to copy, like, vasomfor tries to mimic the API?
The API of actual game consoles of all-teral,
like, game-buy advance.
There is lots of direct memory manipulation stuff.
What if I understand vasomfor, work,
have vasomba pass on the works, make it native to a pass on the API.
It's designed to mimic the pass on the games.
So for the chip, for the hardware, we took vis-Bit's full-fink.
It's pizzer's toy's free.
And the cool thing about it is very small.
It's actually the dev board.
Zack's show-fink is this small chip.
And it's very, very small, like, my thumbnail.
And it's very cheap.
You can buy one for four euros.
And it has Wi-Fi on board.
And it will get to Z.
And we took it as hardware.
Then you can, well, skip it.
There is good ecosystem for writing applications
in Rust for ESP.
And we made FireFlyZero.
I will show your photo.
So we have two prototypes.
We have stand here in the same building.
Find us, we're just around the corner, right?
And the first floor.
And we made two prototypes here.
And you see why are with people having so much fun?
Because it has multi-player.
And everything is fun when you do it together.
And this is why we took ESP.
Because ESP, 32, has Wi-Fi on board.
And we just finished writing this physical product.
We only have two.
And there are the stand.
This way, I'm just going, if I'm waiting here.
So please come down to us and give it a try.
And I will show you how beautiful and how easy
it is to make multi-player games for FireFly.
And it's actually a thing.
It actually happened.
We have it.
It works.
And we will be allowed to take starter this year.
We will be mass-producing them.
And of course, since I'm at first there,
it's open source.
Everything is open source.
Software, hardware, case, developer tools, SDKs, everything.
You can make your own FireFly or you can fork it
and make something fun with it.
We don't mind.
And this is how it looks naked without case.
And the cool thing.
So let me show you.
So we have, first of all, we have emulator.
You can already run, and again, the power of the possible.
How if emulator is possible?
We don't emulate here, it's pure source at all here.
But since it's the same interpreter for the possible here
and on the device, how your application works here,
it will exactly the same way it will work on the device.
It's beautiful.
And we have lots of games.
As you can see, so this is naked.
This is written in go, 300 lines of go.
Again, it's very easy to write games for it.
And let me launch a two-quarter so it.
And I will show you something.
So how to start multiplayer?
And again, the same on the actual device.
You press start multiplayer.
They discover each other.
You can feel them.
And now we have two snakes.
And we can have four, eight.
As many as performance will be enough.
And see, I move on here and it moves on the other screen as well.
Beautiful.
How it works?
Since, again, it's very possible.
We control inputs.
We, if when application asks for random values,
we give it to it.
When it asks for buttons, we give it to it.
If we take two devices and run on them,
exactly the same application and exactly the same initial state.
And then in both of them, we give the same inputs.
So when they ask for a random input, we synchronize it
and we give it to both applications.
When they ask for input, we say, this is input from the device one.
This is input for the device two on both of them.
The transition is the same state.
And this is how much player works.
And this is how it's the easiest game console in the world
for writing multiple player.
For your application, just looks like several inputs.
You don't care about latency.
You don't care about synchronizing state about devices.
You don't care about any of those stuff.
We take care of that on the environment level.
For you, just read a few buttons.
And synchronize it because it's very fast.
It's changing through the air.
We have air in the small sphere.
Inputs, it's like 16 bytes of data, nothing.
And this is an example of the code for a small sphere.
When I wanted to make a listening game,
a small player from single player, I changed for lines of code.
I say, hey, I made loop.
And now I just draw first next in the loop.
That's it.
And let me show you how you can make your own decision.
It's very, very simple.
So we have two code, Firefly CLI.
And it takes care of all your needs for writing your own application.
Install your applications.
You can install, export, build applications.
And there is a comment called new.
That's close with a numerator.
Firefly, you say language, which you want to use.
We already saw a contrast, go C, C++.
We will support more, ZIG, Python,
Lua, JavaScript, for all of that we have
prototype, so we know that it will work.
And you specify the name.
It says project created.
We go here.
We say Firefly CLI build.
I will make a new fire system.
So that we have clean start.
And now we do Firefly emulator.
We specify the VizFire system that I just created.
And we have it.
This is your first application.
It just draws triangle.
I'll show you the source code.
This is the source code.
You have several callbacks.
In boot, you initialize your application.
In update, you update the state.
In render your draw stuff.
So I clear screen with the side color.
And I draw a triangle.
And that's how you make your own application.
Few seconds, and you already have your first step.
And of course, you can build on top of that.
You will build on top of that.
You need to build on top of that.
But again, 300 lines of code and you have mouse player snake.
We have an workstation framework for Python.
Again, since everything is open source and since it's
rust, we can embed it into Python applications.
And from Python, you can say, this is my application.
Start it run on update cycle, get a segment of the screen,
and check that this segment matches this pattern.
Let's say it.
And this is, yeah, I just show it to you, right?
There are some challenges.
I will briefly go through, so it's hard
to work with complex types.
There is just interstit 2 and 64.
Float 34 and 64 that's it.
OK, whereas the strings were bytes, were lists,
were structs.
Well, you need to define how you pass it around.
And we don't pass much of that around.
So first of all, we designed API in a way that you don't need to pass tracks around.
So we think, in advance, for instance, there is no function to read configuration file
all at once from the runtime, but you can read name of application.
It would just be binary string and zero.
There is no observability in allocator, because allocator is part of the guest environment.
It's just some code that runs here in the pass environment.
We don't know how it works.
We only know how many pages of memory are allocated.
And again, I want to have good observability.
Let me actually show it to you.
So we have here application running.
And what I can do is I can say Firefly, CLI, Firefly, CLI, Monitor.
I promised to show your observability.
And from the running emulator, it collects information about the number of instructions executed per second.
In each callback, that we ever call, amount of memory allocated.
If the game lacks, behind how much CPU, how many resources it has, it's the beginning of the pass assembly.
But looking into memory is hard.
It's hard to run enterprise languages.
So what happens is we have this environment in Rust.
It runs the pass assembly interpreter.
In the inside of it, we run the pass assembly interpreter for Python.
It runs the actual Python application.
It's lots of layers, lots of glue.
Again, it's a post of work and hopefully it will work.
We have prototypes for it.
But it can get pretty messy.
So you need to be very mindful about performance here.
Multiplayer was a challenge.
But we are managing pretty well.
And working with limited resources is hard.
So we have these pitchers to freeze.
There is just 400 kilobytes of RAM, actual RAM.
We have 8 megabytes of the first RAM, which is slower, but we provide the application if it really needs it.
But working with the resources is required as to find a healthy, draw stuff on the screen.
OK, let's see.
Can we avoid allocations here and there?
It's all about saving every small resource of it.
And being myself a Python developer for 10 years, I didn't get used to think about these things.
But yeah, conclusions.
Awesome is great.
I didn't talk about Rust, but I have live-hate relations with it.
I cannot imagine myself writing with all complex systems in traffic like this.
In traffic like C, with many other locations and all the stuff.
It will be crazy.
But every day when I write something in Rust, I fight with Borough Chaker and I have the idea how to make it work.
But hey, now it works.
And yeah, I'm glad that it's playing.
And so we have booth downstairs.
We have website.
This year we will have Kickstarter.
We have all socials.
And I'm very happy to talk to all of you about WebAssembly.
So you can ask questions now and you can just come to me and ask more questions later.
Thank you.
Let's run the minutes of questions.
So I can imagine how you do when reading on the guest visit the two.
Let's talk about this before.
How you do when reading on the computer?
Rendering.
Yeah.
Like I'm using SDL also.
So the question, how we render?
There is library for WebAssembly called Embedded Graphics.
It's great.
It's designed to save memory for you.
And there are a few tricks we do.
First of all, the actual game.
It can use on the same screen at the same time
on the 16 bytes of RAM.
So each pixel is 4 bytes.
16 colors.
Sorry, it can use on the 16 colors.
Each pixel is 4 bytes.
And the screen itself has the same size as Game Boy Advance.
So it's very pixel.
So the whole frame buffer that we store is 32 kilobytes of 32 kilobytes.
So it's 16 color of 16 bytes.
16 colors and 4 bits.
Yes.
But the game can change it between different screens.
Game can change it as we render.
Why do you buy it?
And then what we also do is we render it on this.
We have very cool screen.
We have 16 wires, bars and there.
This is why we have to use pixels.
We just ran out of pins on the first one.
And all the 16 bits they read from DMA,
they image that we want to render.
And then it renders it.
Yes.
It's parallel of 16 bits.
I ate stuff.
More questions.
Yes.
Can you say something more about how you do the synchronization of this report when
you multiply it?
Yes.
So how synchronization of input works.