Video summary
The video provides an in-depth look at PolyGen, the latest iteration of a series of interactive games developed by the creator for EMF events, evolving from the initial "orbs" concept in 2018 to the more advanced Polycoin and finally PolyGen in 2024. The primary motivation behind creating these devices was inspired by Ingress, aiming to build a tangible game experience that improved upon previous versions. A significant portion of the presentation focuses on the physical design challenges faced during development, particularly with the casing materials used for Polycoin which tended to melt or break apart when dropped. To solve this, the creator switched to printing cases in durable polycarbonate and PETG using a Bambu printer, ensuring that the new units remain intact even after impacts. Additionally, practical improvements were made to the audio system by moving speakers to the front of the device so they are not blocked when placed against surfaces, and the magnetic latching mechanism was refined to allow for easier access to the internal components without the case falling apart.
Internally, the PolyGen unit is a sophisticated piece of hardware designed with power efficiency as a top priority to ensure it can operate throughout entire festivals without needing frequent recharging or battery swaps. The core architecture relies on a Pig Micro controller acting as the low-power brain that manages sleep modes for both the LEDs and the RFID reader, waking up only when necessary to check for player cards or update lighting effects. Communication with the game server is handled by an ESP8285 module running over MQTT, chosen for its reliability and small size compared to other options like the ESP8266. The creator also details the power management strategy involving FETs to cut power to LED strips when not in use, allowing the device to run for up to four days under typical conditions, though heavy usage during registration events can drain batteries faster due to constant flashing and communication activity.
The software and network infrastructure behind PolyGen are built around a centralized game server that uses MQTT brokers to manage real-time data exchange between all units and a public scoreboard displayed in the Null Sector. Security is maintained by signing messages with unique secrets known only to each device and the server, ensuring that unauthorized devices cannot inject false data into the system without being rejected. The creator highlights several community-driven features and hacks, such as players monitoring unit status via web interfaces or even creating automated Arduino servos to simulate card captures. Despite some technical hurdles like running out of ROM space on the original Pig Micro chips due to component shortages, which required a rewrite of the firmware for newer chips, the system remains robust. The creator also addresses potential issues like Wi-Fi disconnections, explaining that units will eventually be marked as unowned if they do not check in within a specific timeframe, and notes that while the game is entirely online-dependent, the hardware itself has no concept of ownership until configured by the server.
Read the full video transcript
Hi. So, uh, for those of you who've been
around EMF a while, there's been a few
generations of this. So, it started with
orbs and then went on to, um, to to
Polycoin and then Polygen is the the
latest version. So, I'll kind of run
through some of those as we go. Uh but
yeah, Ingress was my inspiration and uh
and AMF and then I thought I'd create
something. So that was and this is the
the series the the orbs game in 2018,
then Polycoin uh 2022 and then from 2024
was Polygen. And um there was there was
some interesting things, lessons learned
as I went along the way. Uh the first
one was there's no that that just beeped
and had some flashy lights and nobody
really knew what was going on with them
and it kind of worked but it the basis
was there. And then so in Polycoin I
made speakers and actually have it speak
and make lots of flashy colored lights
that were more interesting. And then
Polygen was the result of um the cases
for Polycoin melting. And [laughter]
um so I left them in a tent in um MCH
and when I came back the rear
one of the empty cases the rear side of
most of the cases more resemble Pringles
than uh than than that unfortunately. So
this is like one of the last surviving
ones that's vaguely the right shape. Uh
but I learned a lot of lessons in 3D
printing to do with this as well. So,
uh, but they look I I really like the
look of these, but the, uh, things like
the speaker on the back didn't work so
well, um, because it would be sat up
against things and then no one could
hear what they were saying. So, the
speakers moved to the front in in
polygen. And the the overall design
didn't use PLA. Lesson learned. And, uh,
the new ones are imprinted mostly in
polycarbonate and some in PET G. Just
experimenting with that. And the main
thing as well is that they don't fall
apart when you drop them typically,
unless the case actually breaks. These
ones would the back would fly off, bits
would come out everywhere. It wasn't
pretty. Um, so,
uh,
there was a whole bunch of other things.
Um, I had introduced a new team as well,
so we have four teams instead of three.
And the
So, the I won't bother explaining the
whole game. Hopefully, you've all played
the game, so you've got an idea. Uh,
but this was some of the interesting
stuff I did with the these cases. Um,
but that one um these were wonderful for
the first time. Once you take them off,
they don't go back on again so easily.
So, that was a lesson learned for
keeping the backs on these. So, the
Polygen cases, and I'll go through it
and show you the how that works. But the
main thing is I used Tinkercad and I got
myself a bamboo printer which is how I
was able to print polycarbonate and that
inspired polygen. It's the same PCB. So
I took the PCB out of this cuz I didn't
want to iterate that and put it into the
into the new case and rewrote some of
the software around it. The main parts
are that um the PCB sits inside here.
There's uh there's the um NeoPixel LED
sat at the front and then all the way
around the edge is are the NeoPixels
speaker sits here behind this and then
these catches here they retain the
they retain the base of this. So there
is a a safety screw that I've removed
for speed. Uh but to actually open the
case up you you use magnets.
So, a magnet there and there. Uh, and
it's actually two P coins sat inside
there.
So, so when you open that up, just
unhook that. And you can see that the
wonders of two P coins holding it, they
are magnetized by that. And they just
hook onto these two bits here to keep
them in place. And then you got access
to the PCB through there. So to to
remove the
to remove this, the easiest way is to
remove the catches entirely from from
the case.
And then this this piece will just
rather difficultly slide off.
So you can then see inside. So you've
got the the three cells. They're all in
parallel. So it's a sort of 3.7 volt.
You've got an MP3 player there that is
just a DF robot 299. It's got a micro SD
card and it plays plays the files
through there and then two different
NeoPixel runs. And what it does is a lot
of the architecture of this is all about
power management. I needed to keep the
power usage low so they could run for a
whole festival without me having to
recharge anything, swap batteries out.
So what it does is it actually powers
down any LED strip. It's not actively
driving. So, it it turns the power off
to it via a FET. And the I'm not going
to pull this out because they're a pain
to get back in. Uh,
but I'll I'll show you the uh
uh the underside of the board. Uh, so
kind of talk you through it. You got the
a Pig Micro. So, it's a Pig Micro as the
brains of the operation. And the reason
it's there is because it's very
lowowered. It can go into a very low
powered sleep mode. and it just doesn't
use much power. And it can wake up, turn
on the RFID reader, see if there's a
card there, then go back to sleep. And
it can do the same with the LEDs. It can
update the LEDs and then then sleep. And
what it does is when it needs to talk to
u the game server, it uses this, which
is an ESP 8285. Now, everyone goes 8266.
No, 8.285. It's like the a tiny version
of the uh 8266.
And it's just it's smaller. It's more
reliable because it's all on DI EROM.
And then at the very bottom, you got the
power. So that's the power regulator
taking it from the whatever the cells
are giving out to 3.3 volts. And
obviously the RFID reader, which is a
terrible knockoff thing from sort of
online from somewhere. And that's that's
essentially all the components there.
And
to to to program it up, uh you got a
whole load of pads there. So I I just
put this pogo pin. So it's got pogo pins
on one side and I can just hold that on
there and program up the different
components of the board using that. So
it's a it's a nice way to just not have
to solder extra connectors on and and
worry about them.
The uh
these this is always the challenge when
you're making something like this.
You're being pulled in so many different
directions. You want to make it secure.
you've only got a limited amount of time
and you got a limited budget and you
need the power to work as well. So all
those things it's a compromise. So a lot
of this stuff is is all about power, all
about keeping the component cost down so
I could afford to do make 36 of them as
I did. So um yeah, there definitely some
challenges with that.
Uh I talked you through this already, so
I'll skip that. Did it in Kyad. Uh the
the schematics are online if you want to
have a look and it's running microython
on the ESP and it's running I think
something called pig pig micro uh pig
basic on on the pig micro and but I hit
the hardware quite hard. So a lot of
what the pig micro does is interrupt
driven. So if you've done
microcontroller development, it
effectively it can do lots of things
simultaneously because it only needs to
do go and do it when it gets told
something's ready to receive the next
bite. So it can actually natively drive
the the the pixel strips talk to both
modules all simultaneously and it
doesn't need to to be particularly
highowered. However, I did hit one
problem which is at the end of last camp
I ran out of ROM space in the Pig Micro.
I literally had no more space because
these were the pig micros were at the
height of the component shortage. So I
just had to get whatever I could lay my
hands on and I I ran out of space. So
actually the what's changed is that it's
entirely different pig micro different
architecture and I had to rewrite a load
of stuff to make it work but couldn't
add any features yet. But it's now got
loads of ROM space. So next time I've
got the opportunity to add something.
I showed you that one.
And obviously, you know, we we've got
the hidden features, uh, which hopefully
some of you saw, which, uh, you know,
uh, the EMF cam bonus, if you, uh,
player, if you came back from last time,
you'd have got a bonus. Uh, the, um,
there's a command mode, which
this will boot up. I'll talk about other
things. Um, if you used a payment card,
you probably got something along the
lines of author um, Visa debit card
accepted, authorizing donation to
Palibius Biotech. Please wait. Just
kidding. Um, so a number of those and I
will report how many people used the
payment card uh, of some sort or other
uh during the the event. Uh, the capture
the flag you can ignore. This is the
wrong presentation for that. It wasn't
active this year.
And hopefully you saw the scoreboard
that was up in null sector. Uh now I
haven't really gone too much into sort
of how things communicate. Oh, there we
go.
>> I can do this now. This is the command
mode. So
assuming this
>> command mode.
>> There we go. So this is how I program it
up.
>> Battery voltage.
>> And so I can go through
>> power off. So I that's how I turn it off
is is is that using the the control
token and the way I load config in is
actually save it onto uh an RFID card so
I can program it with new Wi-Fi details.
So, if I need to change so what server
it's talking to, what the what the Wi-Fi
SSID is, then I can just upload it into
there and it will save it and uh I don't
have to open the case up to reprogram
it, which was a big problem with the
orbs game because I had to do that a
lot. Um, so yeah, the um the way this uh
all communicates is over MQTT. So the
there's a Raspberry Pi that's running a
Mosquito and has a Python client to the
Mosquito broker and then these all sub
sort of send messages back to the game
server via MQTT and it responds with
messages. The messages are all signed.
So there's a shared there secrets known
by both parties that the that's unique
to each device. So the game server knows
how what how to how to it's not
encrypted. the message is a clear text,
but what it does is it it calculates a
hash with some hidden with some stuff
that is not in the message that it knows
to add back in. So that way it the
messages effectively are authenticated
to a degree and if somebody starts
sticking stuff into the MQTT broker that
it shouldn't, then uh I'll get lots of
alerts that somebody's uh playing funny
playing games with it. Um but yeah, most
of it is is simple MQTT. This scoreboard
is written using Pygame and it uses uh
again MQTT. If you connect to
MQTT.gen.polybe.io,
you will get the scoreboard feed. So
anything displayed on here, you you'll
have full visibility of and actually you
can see a little bit more like um if
you're trying to find some of the units
and you you can see all of the names of
all the units on there um where they
might not appear anywhere else. So
those uh yeah, if you want to It's quite
interesting. Some people have hooked
onto the MQTT feed and made the lights
of their villages change to the color of
the Polygen unit in their village.
>> So, um, and there's there's been some
excellent like little hacks I've seen.
There was somebody created an entire web
page that monitored it and so he could
see exactly which units had changed
teams. He could go take them. Actually,
he didn't he didn't go it. He sent his
girlfriend to go take them.
um the the games uh website where you
can set your player name. So this um
this is using a thing called metabase to
to draw the um the teams uh scores and
your individual things. This is all
JavaScript and it talks over websockets
on MQTT
to uh communicate setting your player
name and uh you'll have hopefully you've
seen what random name the game assigned
to you. It's going to be some either
obscure or not so obscure sci-fi
character name and they appear in square
brackets if they're defaulted.
So these are all of the different things
used in in making this game. And um
the the a couple of bits broke this time
unfortunately because uh my game server
lost its storage.
um it would boot up and then say I
haven't got a disc anymore and then not
re then would not reboot. So I had to
rebuild it which meant that my pushover
notification stopped working. But
everything else is pretty much there
exactly as I described.
Uh oh yeah, one of the hacks. So this
was at Fried Camp and uh this
12-year-old kid, he went around the camp
and he got himself an Arduino, got
himself a servo and some batteries and
programmed it up. So every 30 seconds he
would just drop his card down in front
of the reader. [laughter]
Love that. That was brilliant. Um
so um
that's the core of of it. But then I'm
I'm kind of assuming that people might
have some questions uh and want to
actually have a look in these units and
and see some of them. So I I kind of
I'll say let's do a couple of questions
and then I'll maybe I could just pass
this around to people and you can have a
look
that this way so you can all be able to
Cool. So, yeah. Anybody got any
questions?
>> You mentioned signing then, but do you
have any issues with terminals?
>> No, because they have to be registered
at both sides. So, if it started
receiving messages from a unit, it
doesn't recognize it will it won't
respond to it. So, yeah, it's
>> shouldn't be a problem.
Yeah. So, um I don't think I've got a
link on the presentation, but if you go
to uh PE here we go. Go to that website.
It's on the back of every unit. Then
there there there's all the sort of very
rough notes and a link to the GitHub
that's got a lot of the stuff on it. Uh
a lot of that stuff needs updating a
little bit because of the new pig micro
and so on. So I've got to update it with
that source code. But
>> is there anything you would change?
>> Yeah, I mean my case design was not
based on was based on need rather than
anything else. So I had to
I would I I was because I didn't want to
change the PCB. I designed the case
around the side of the PCB that I'd made
which has issues. So, I I've kind of got
to um rethink some of that. So, if I do
another version, then I'd be designing
both with both in mind. And and uh some
of the things I've done there, like I'
I've deliberately um tried to make it as
rainproof as possible. It's not perfect,
but it's pretty good. Uh you you may
notice there's a drainage hole at the
bottom. So, and the speakers waterproof.
and the uh yeah I got yeah I I and
there's little things like when I
designed the PCB I didn't present out
all of the IO pins that I could have
done and I kind of regret not just
having an empty header of IO pins so I
could have added something extra um
things like that. So there's little bits
that I would do, but mostly it's all
about redesigning the whole thing as
more of a cohesive single product
instead of one where I've had to. But
part of the the reason for the exact
size is because they fit perfectly into
a really useful box.
>> So
what happens when they lose Wi-Fi? Does
that happen often right now?
>> Right now quite a long time. Yeah. Um,
so if they what happens is they check in
about every every 3 minutes roughly. Um,
and if the game server doesn't see them
for about sort of 10 15 minutes, then it
boots the unit off. So it basically
clears who owns it and says you no
longer own this unit. So what you'll see
is when the Wi-Fi goes down and then
comes back up, uh, if it's been long
enough, then all the units will turn
white because when they next check in,
they go, I'm not owned by anyone. So
they they'll flick to white because the
game servers decided they're they're not
participating.
>> No, it's all done online. So they have
to have line of sight of the of the game
server. So it sends a message to the
game server via MQTT and the game server
will look up and tell it this this like
this this player card you just gave me
is on this team and it will then go,
okay, I've now been captured by this.
And
>> cool.
Wi-Fi is back. Hey.
>> Okay.
>> So, that's the orbs game. That was the
very first version of this. And uh that
one would have had an RFID reader, but
all the ones take all the ones from
there are now in the Polygen units
because they still worked. So,
>> what have you learned about
game players? What have you
>> about the players?
>> Yeah. So, I imagine you've seen quite a
few rounds of
>> I mean there there's been some brilliant
stuff over over the years I've run this.
So, I think the you you sometimes see
people who set their alarm clocks for
funny times to get up and then do a
circuit and then go back to bed for a
few hours and then do another circuit.
Um I've we've had sticker campaigns. So
one particular team started um uh like
leaving like nasty stickers about the
other team like they um the this other
team farts a lot and things like that.
So we had some some some friendly
rivalry that was quite amusing. Uh and
and uh yeah there was at one particular
event two kids actually had a fight over
it. Um which didn't go well for the kid
who started the fight because the other
kid was friends with one of the security
guards. So he just did the circuit all
night keeping it. [laughter] So his team
won. So it's kind of interesting the
interactions you get and uh there's
sometimes you see players and all they
seem to do is is be moving between units
and it's not always the most efficient
way of winning the game. Sometimes it
is, but it's Yeah.
>> Is there like a theoretical ceiling for
the number of devices or players? I've I
mean the number of players kind of is a
factor of the um you need enough units
to make it playable as you bring more
players in. So the reason why I ended up
with 36 units is because I was going to
a bigger event with more players. So I I
needed to upscale. Um and then
I don't think there's a massive
limitation because they're not they're
not heavy duty. there you if you think
about it they're only when somebody taps
their card is it talking to the game
server so the workload on the game
server is fairly light uh it's more down
to um sort of running the other systems
like the scoreboard and generating all
of that so I actually put that on
different Raspberry Pi so the main one's
a Raspberry Pi that runs just the game
and then a separate Raspberry Pi just to
run the scoreboard to kind of keep it as
uh separate as possible
I found it interesting
with the stage and stuff and like the
branding on these books. How how were
you involved?
Oh, so uh the the Palibius biotech
branding that was something invented uh
by the Null Sector team and when I I'd
done orbs that was it located in Null
Sector and then they uh they when we're
coming back in 2022 they were like well
we're doing this null sector Palibius
Biotech theme do you want to be part of
it and I was like yeah I can do that so
that's how we ended up with the the
branding kind of brought in and they
they quite like the idea of of taking
null sector and bringing it across the
whole site. So there's not a huge amount
of tie up, just the branding is there to
kind of keep it keep it all linked.
>> Yeah. So um keep in mind 2022 Laura
modules were what 15 20 quid each which
when you multiply that by 30 something
the cost grows. So like you had a one
pound part then now multiply that by 36.
It it's it's not viable. Um so I had to
keep my my unit cost down. So Laura was
definitely not on the table costwise
when I first looked at this. Um now
they're down to what £3 pound50 or
something I think. So it's now getting
in the realms of financially viable.
Then now the challenge would be how do
you do it with the power management?
Because if you stick a 60 milliamp
constant draw for running the Laura
module in receive mode the whole time,
you now got a a power challenge. So,
um it's something I'm thinking about.
I'd love to do how I can make it
function as part of the game within the
constraints of Laura, not basically
completely blitzing the bandwidth
available in Laura. Um I've I've got to
figure those things out.
So yeah,
>> how long would the battery last for?
>> Depends on the number of captures. So
the number of interactions, so uh when I
did, uh the busiest event I did uh was
uh 39 C3 and one unit ran out of battery
during that whole event and that was the
unit that everybody registered at pretty
much because it was right by where the
tokens were. So that the registration
process is the absolute killer when it
comes to the battery life because all
the lights are flashing and it's talking
the whole time and even that with those
three batteries I just had to do one
change and that was after I think
2 or 3 days everything else lasted the
whole event. So yeah they can easily run
for 4 days in typical use.
>> You get a notification if the battery
fails as opposed to if they just drop
off the network.
>> Yeah. So if they drop off the network,
the notification is I haven't seen this
unit for a while. But they all report in
battery status as part of their
check-in. And what they will do is uh
when it drops below a certain threshold,
I get battery is low. And then if it
drops below the next threshold, I'll get
I'm turning myself off. My battery is
now too low. So that uh it does
thresholds. And I publish, if you go on
the website, you can see the the voltage
history for all the previous events uh
across the the battery cells. So you can
see what they've been doing.
>> Yeah.
>> Yeah. So the units themselves have no
concept of what volume they should be at
other than when they check in, they get
a config from the game server. So every
time they're polling in to say, I'm I'm
here. This is my voltage. They'll be
told, "Right, you're now volume such and
such." Even if it's the same volume, it
it just tells it every time. And so when
it looks on the schedule and goes, "Oh,
it's after 11:00 p.m. We're going to
lower your volume." And I can dial
individual units up and down as well.
They've all got their own unique config.
So I can make one unit much quieter.
>> Yeah.
>> Yeah. You can you can dial it up and
down and make it really flexible. Um,
and I've only had one request to dial
down so far. So
>> what was the URL for?
Um, so the the map there's not a map
online. There's a screen in the null
sector that you can see that that on.
Although the map is not up at the moment
is the screen's up. The scoreboard's up,
but the map isn't. Um, I spent my time
rebuilding the server rather than doing
the map. So, [snorts] uh, yeah. Anybody
else?
Um, right.
>> No, that is still missing. And there is
a dead database entry number nine rest
in peace. I can see it last check-in
date was 2024.
>> So that connected to a network would
contact your game server. Can it come
across?
>> Yeah. Could could while the event's
running. I mean when is the event's not
running the game server is not online.
So
>> would have to
have to set up network for it to
connect.
>> Yes. Yeah. Have to set up and then
>> yeah, emf2024-
open I think is the SSI. So,
>> um
it's MQTT.gen.polybe.io.
>> Um, cool. Uh, now you
you will probably all want the unique
capture if the system's up and running.
Um,
there we I should have put that up a
while ago.
>> Got all my all my details. So, what
we'll do, we'll get that online and then
you can all uh all capture it and get
your unique capture that only people
here can get.
Assuming that's it for everyone.
Questions? Cool. Amazing.