I love Bunny's personally and it seems to be a dual talk today.
Who is this little friend?
My daughter. My little assistant.
Cold baller.
Amazing.
But it's two amazing speakers and tiny low.
So today I'm going to talk about
Plaging game with us our computer, our fan with Tiny Go.
How many of you have cared about Tiny Go before?
Please raise your hand.
How many of you use Tiny Go before?
Not that many.
That's okay. Maybe that changed today.
So what are you going to see today?
I hope it's some fun to make project.
This is nothing serious.
Just get a little crazy with hardware and go.
So Tiny Go is a project to bring the
Go programming language to microcontroller.
It's a compiler using LLBM.
So you use your regular go code and we put it in a microcontroller
like the RP-2040 or maybe an Arduino or microbit,
ST micro, whatever you want.
So whole game's work.
First you have the any decision.
And then in a loop you read the input of the player.
You update the state of the game based on some
rules and then you provide feedback to the player.
And finally you terminate the game with a win, loss, or draw.
So let's start simple.
We are going to use the GoferBatch.
It has an RP-2040, 133 maya health,
and 264 kilobytes of RAM.
To make a game or any program with Tiny GoFest,
we need to import the matching package,
which is a special package that allows you to talk directly with the hardware.
You are using, in this case,
like the pins, the LED, or any other sensor.
Then for initially some phase,
we are just going to configure the button,
because we are going to use a button.
In this example, we configure it as an input.
Also, like the display, we need to start the display.
In this case, it's an SPI protocol display.
So just a very simple code.
And then once inside in our game or in our code in the loop,
we just read the state of the button, with this bait on a.get.
For example, we just continue with the code,
adding the rest of the rules of the game.
And finally, we provide feedback to the player.
For the feedback, Tiny GoFest,
we try to make all the different screen supported by Tiny GoFest,
try to use the display interface with a set of function,
like set pixel, to change the color of a single pixel in the screen,
field rectangle, like a whole rectangle in the screen,
change the color, field rectangle with buffer, in case you want to use
like complex image or different color for pixel,
and field screen just change all the screen to one single color.
On top of that, on the display interface,
we have several other package, like Tiny GoFest,
which allows you to draw different primitives,
like a triangle or a SQL circle,
and Tiny Phone that allows you to write text on the screen.
So let's start simple,
like I said with the GoFerBatch.
This will be the code we are going to use,
as I said, we are going to import the matching package,
and also the ST7789 is the driver for the display.
Oh, yeah.
I don't know what to do.
No.
If you have trouble watching in the back,
go to the fourth website, go to the GoFerBatch,
follow it on your phone.
We have technical issues.
Oh, wow, it fixed itself.
No, it's going.
The first way.
Sorry.
Thank you.
Any developers in the way?
No.
Don't let many developers in the way.
Ah, okay.
Okay, sorry.
No worries.
Again, the driver for the display,
right there.
The configuration for the SPI and the display.
itself.
Then the buttons, different buttons,
but we are going to use very, very few.
And then, oh, code is like,
check if the left right up and down button is pressed,
and then move like the X and Y variables,
and then feel our rectangle at that coordinates.
To run the code,
to compile and flash the code,
you just need to use the tiny Go command,
tiny Go flash.
Just specify your target.
In this case, this is a GoFerBatch,
and then your code.
And we have this little square,
if we press down or left,
we can move it around the screen.
Thank you.
So, now time to do more complex themes.
This is the tiny GoKip, zero, KYKBO2.
It's made by Tagatagosan.
It's a team member of Tiny Go.
He made custom keyboards.
That way, you can program it's key,
and discuss the related button,
and also adjust it.
You can move your mouse.
It works keyboard, regular one,
but since you can program it with tiny Go,
why not put games inside it?
Let's see.
For example, Flapigoffer.
Sorry.
So, how is that possible?
Well, this game specifically is written with
Koevitam.
Koevitam is a game in giant.
It was inspired in mini-tam and a bit in giant,
which is made in giant also in Go.
It offers flexibility,
like you just go once and run everywhere.
Koevitam and the tiny GoKip
is the work of Masaki Tagatagosago.
It's a tiny go for and part of the team.
And again, if we follow the same formula,
we just initialize, we set the hardware,
the screen size,
and then we start our new game.
We just read the input.
It offers several methods,
like it's K-JAS press,
or it's the K-JAS release.
It provides basic J-Win fusion for primitive,
like tiny and draw,
and also for writing text.
But also, you can embed
and sprite a little image on your code.
For example, you just, in this case,
we are embedding the Gofer PNG file image,
and then it's later sewn in the game.
And as I said,
it's just code once and run everywhere.
Let's see, like,
it's the same here.
It's just the same code really in both hardware.
Yeah.
So, what's better than one Gofer?
Two Gofer, let's go.
Wait.
In this case,
I'm going to present the game link.
The game link is this little device.
It has an RP-2014 side.
And that will allow us to communicate to different devices
over the I-Q-C protocol.
I-Q-C is a protocol to talk when integrated
through with another.
You use all the time to talk
for example, from your microprocessor to the microprocessor
of your sensor and way back.
So, we just want to connect two of those keyboards.
We are going to use another microprocessor inside the game link to do that.
For listening to the I-Q-C communication,
we configured the I-Q-C port just for listen.
And then in our code, we just wait for the event,
which the event could be like,
receive information,
or the keyboard could ask us to send it some information,
or could it send the game link some information.
The code inside the game link is very simple.
It's just one stack with capacity of 10 message.
So, one device send one or more message.
It's a store and the other device could ask if there is any new message in the stack
and retrieve it and remove it.
Okay.
Sorry, I'm connecting the thing.
In this case, we can send like,
there is nothing connected to the computer.
Both of them are running the same code.
One is going to host the game.
One is going to host the game,
and the other one is join the game.
And then you press one,
and you can play TikTok too, for example, here.
You can see it is.
And then one win and the other lose.
Okay.
This was a gift in case the previous example,
Okay.
This is like always true multiplayer,
but what about like 21 century multiplayer?
Of course.
We feel Bluetooth and even Laura is supported by Tiny Go.
You could watch any of Ron talk.
Like, go with the wires.
Go farther with the wire.
Go even farther with the wires.
Go with the wire, strikeback.
Right to know if we go without wires in a few moments in this room today.
And I know Fred of the maybe the next talk.
They were awakens.
I'm not sure.
Other things you can't make.
Tiny Go without a computer is, for example,
Tiny Go has super for Game Boy at Bance,
and even Nintendo Switch.
We can agree that it's cool, but what is even cooler is free fly zero,
which they have gone.
They have annexed as time today at the KB limb.
And they are going to make a talk tomorrow.
A free fly zero is a console.
That was wasn't forward console.
So, you have several SDK.
In this case, they have the go SDK.
With the fly fly command tools and tooling,
you code in Go using the SDK.
They use internally Tiny Go to compile it to our file,
and then the fly zero can execute the game,
and then you're happy to offer.
So, following the example, again, the formula,
that's in it in the fly fly fly fly.
SDK, we have to define a boot function,
which will run at the beginning.
We are going to define an update function,
which is our loop or back home,
and I run the function,
which is that manage how it will bring on the stream.
Unfortunately, I don't have any prototype,
because they only have prototype as the estate,
but as I said, the tooling is really good,
and they have an emulator.
So,
this will be, again, another example,
there is very, very simple in the emulator.
We just define the previous function I talk
in the boot function.
I just load an image of a gover.
I load a phone to be able to break text.
And in the, you put the function,
we just wait to put of the player,
and move to the coordinate.
And in the render function,
we just clear the string, draw the image,
and draw the text.
In this case, let me point it.
We can run the emulator.
We are going to test this one,
and then just as I move.
The cursor, it's moved.
So, it's using tiny go to compile your go code
into a version.
And then, like in the previous talk,
if you were able to watch it,
it's running the ones fill the file in the emulator.
This is one of the game running on the prototype,
as I said, what will,
they have like a growing catalog of different games.
And it has already super for multiplayer,
for batch, for electronics,
debugging, image, phone,
the tooling is super good.
The documentation is also super good.
They have a stand at first,
and in the KVL,
and they will be talked tomorrow about them.
So, you could go crazy and create your own hardware.
Tiny go, super more than 85 boards,
more than 100 of different devices,
like sensor, actuator, displays.
In this example, I saw here,
I didn't bring in with me,
but you will see some image of it working.
It's just one LED strip,
and one MacNet term,
it's tell where the MacNet is.
And then you use your imagination.
The input of the game is very simple,
just...
Oops.
And you could also go minimalistic.
You can use even your name tag for it.
This is the name tag,
much talk earlier.
It's running, go code,
it's running on an 80 tiny,
1616.
Here is the information.
8-bit microcontroller,
20 mayor health,
and only 16 kilobyte of RAM.
So, it's very small,
really small.
You need to use your imagination, okay?
We are going to assume the green LED is the hero,
and the red one is the enemy,
and you just need to reach the castle,
which is the yellow one.
In this case, the LEDs are in a matrix,
it's not an LED strip,
so it's a little bit more complicated to manage them,
but once you get everything shot out,
it's easy.
Let me flush it real quick.
Okay?
And then we have our game.
If you don't have any hardware at hand,
I suggest you buy right now a lot.
But if not,
you can use the tiny low playground.
It has several types of hardware emulation.
You can run your code,
and it will be,
you will see the visual representation.
We had a stand today,
and tomorrow too,
at Fox News,
the AEW building
between open remote and genome,
and the link for everything in the talk.
Thank you.
Wow, again, wow.