# Autonomous Worlds Self Led Session | Devcon Bogotá

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2023-10-09
- Duration: 2:40:28
- Topics: Science & Technology
- Watch: https://streameth.org/watch/yt-cWrSpTMpx4E
- YouTube: https://www.youtube.com/watch?v=cWrSpTMpx4E

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.
https://archive.devcon.org/archive/watch/6/autonomous-worlds-self-led-session/

A session for those interested in the latest developments in Autonomous Worlds and fully on-chain games, including demos of cutting-edge projects, a panel with Optimism co-founder Kevin Ho and Dark Forest creator gubsheep, and an introduction to MUD — the open-source engine for building Autonomous Worlds.
More info here: https://0xparc.notion.site/Autonomous-Worlds-SLS-612ff18a99f54594806776971b5a8ec6

Speaker(s): Justin Glibert, Remy, Andy, Lethe, Arthur Baer, GVN, Flynn Calcutt, Fraser, Omar Mezenner
Skill level: Intermediate
Track: Developer Infrastructure
Keywords: Autonomous,Worlds

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 6 was held in Bogotá, Colombia on Oct 11 - 14, 2022.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

foreign [Music] round Applause for uh Justin who leads up thank you who leads up the autonomous world's wing of zero X Park and also uh leads lattice and that's enough intros I think all right hey everybody um got stuck in traffic but here I am um so yeah my name is Justin I'm co-founder of zurich's Park uh and today we have a lovely selfless session about autonomous worlds so before I kind of give it away to the people who are going to go through demos and talks and panels today I want to give a little bit of um context about okay what is what is your Explorer what is autonomous worlds why are you folks here today um so kind of like the story of xerx Park is really simple there were a bunch of people working on this on-chin game called Dark Forest and I happen to go to Mexico after a Twitter DM and live with them for three months and we're like okay let's let's start something together and so myself and the subset of the people there created this a foundation called Xerox Park Remy joined us like a week in and then a bunch of Michael is here too he works with us so we have a couple of like awesome people trying to essentially Advance the plot so what we mean by Advanced applaud is doing things that push the industry forward in a way that is basically kind of like nonlinear step function so how usually I would say the way you kind of like make things move forward is by running conspiracies so you bring people together you kind of try to instigate a scene and you make sure that everybody feels like the work they're doing matters but also that they're onto something that people are not aware of um so the first three wings of zorrock spark when it started was applied cryptography so we funded a bunch of people and coordinated a lot of learning groups around ZK and stuff like that um we had I haven't worked on Dark Forest so they were shipping new dog first rounds um Andy who is here was working with Ivan as well just basically grinding the game out for like six seven eight months and they did very cool stuff uh and we had two people so Alvarez and I are working on lattice so for a long time um it was just like nine months of research and soul searching our goal was to advance the plot of on-chain gaming so how do we get more people to be able to build those large evm applications how do we figure out the design patterns that allow for those things to become way more interesting that they are right now um and like our two outputs after that research was a blog post trying to Define um what we mean by autonomous worlds and a piece of technology called Mud so that's that mud is a is a game engine for on-chain games um and shortly after that we built two kind of like cool products that we're gonna show you today during the demos um so what we mean by autonomous words basically is any large Unchained system where autonomy um and sovereignty is important for emergence to happen so kind of like the way I talk about it is I think ethereum mainnet is the best MMO out there but it only caters to homoeconomicus so people are obsessed with like money and competition and um one thing I'm like really I really care about is the fact that I want I would like Society to be a bit more playful so how do we create basically systems for homologous instead of homo economicus um and and the way we Define it almost autonomous words is are systems that have autonomy formalized rules and emergence so if you think about ethereum mainnet it has those those properties but ethereum mainnet is like a very kind of like non-steomorphic alien place to most of us the thing that is interesting with ethereum mainnet is it's multimodality I can interact with that MMO by doing a swap on unit Swap and coexist with Mev Bots and a lot of horrible stuff that happens there nobody has any idea about so it's it's a pretty great system but how do we create more things like that that feel slightly more human and are slightly more pro-social because ethereum mainnet I think I mean we're all here together because of ethereal mainnet to some extent but I I would argue that we can build systems that get people to make more friends and build more relationships and the reason why I think autonomous Horrors are quite important is because just like a lot of people make fun of nfts but the one thing that is interesting with NFC is that their on-chain values like most tokens out there actually have references to off-chain value and I think that's interesting is nnfc is valuable for the sake of it right and kind of like if you keep building those systems that are more and more complex and have more and more like emerging into them it's like real on-chain value real Unchained drama real launching history and we think that this is going to unlock a lot of applications that first will need that like trustless Oracle to those Data before becoming more useful as an example to like off-chain stuff so as an example identity makes way more sense for autonomous words at first because you don't need this ugly kind of like meet space cyberspace Bridge you can refer to things that happen unchanged that can be verified you can refer to real relationships that have been like that we've reached consensus over in the evm so it's kind of like a way to bootstrap a bigger ecosystem when it comes to like ethereum technology and like pushing the envelopers and basically um and my belief is I think autonomous words a shot of being the biggest usage of gas in the tractor of attention in ethereum of the next cycle of technology so basically the technology we have right now caters to hey how do we get defying nfts to work right like roller companies today they're a go-to-market strategy is take the stuff that works on ethereum minute right now make it cheaper what happens if we push the envelope further right like what happens if we live in the future and we unlock new affordances so yeah I think that if you want to build autonomous boards today you need to live in the future which basically means you need to kind of like cut corners or give up some form of security or whatever but you need to project yourself to a place where as an example you have a trillion gas per second right like what does the world look like when you have a trillion gas per second I think that right now um a lot of like applications ideas are kind of like driven by scarcity of on-chain computation um so people do super crazy stuff with like scaling ZK fhe MPC and stuff like that but I think that one thing that is going to be quite interesting is what happens when we level up from an Apple II computer to an IBM Mainframe that is Byzantine fault tolerant we're going to have quite interesting applications but today if you want to do that you have to cut Corners um a future with on-chain physics so what happens when we can kind of like simulate rules that have conservation laws that can be verified on chain right like can we go towards something that looks like a digital Planet you know like kind of like Mars but it's digital and it has always been there nobody can shut it down and people can go there and do stuff like what what I think they learned would be more interesting if we get there um I think we also need to live in a world where we have multi-modal interactions so right now when you think about video games they're mostly like they have one modality so if you play fortnite you can you play fortnite the client and that's it you can talk about it with your friends on Discord but that's all you can do I think the one thing that is interesting when you build systems of rules that don't necessarily have goals is that you have this multi-modality that come in where people can interact with those set of rules in various different ways to go back to the ethereum mainnet as like the best MMO right now it's multimodal I can coexist with the Mev Bots the unit swap developers and the client developers were just like different types of people that interact with this system so yeah like let's try to live in the future and pretend that we have the design patterns we need to get that multi-modality um so kind of like what happened after we um instigated this little like autonomous World wing of Xerox Park we got a bunch of people that showed up and we started funding them so um dear friend lares have been there since the beginning but we started funding DF Dao we've been doing a really good job on kind of like extending dark for us and trying to make it more playful and simpler for normal people um nalin built ex gratia which is basically kind of like 2D DNS for smart contracts you can deploy smart contracts on the grid and interact with them so we started having a bunch of little experiments um and then we kind of grew further so we brought more and more people to um London where we're running an autonomous World residency and we started doing essentially this thing where hey let's try to create a scene together and build things for each other like how do we create interdependence amongst this ecosystem there's a lot of cool stuff that is coming out um a bunch of people are going to talk about what they've been working on today so I'm not going to spoil anything but yeah solid team and really the thing we're trying to do right now is how do we instigate a seniors a seniors is like if you add genius to Scene It Gets genius Brian Enoch came up with that term so cenus is basically like the the like the intelligence of a whole group of people which is more often than not uh greater than some of its parts because no single company or group can create an entire industry and if they do most of more often than not they suck up all the oxygen in the room and it becomes very boring so how do we coordinate in a way that is like basically positive sum and I Know This this term is kind of a meme today but I think it's really important um so yeah what are we doing right now how are we actually advancing the plot of autonomous works well through toolings so um where is going to talk about mud today other people are going to talk about like maybe other things but through tooling um better apply cryptography better design patterns better scaling coordination and funding we're trying to essentially bring this model to a place where there's not just one cool project out there that like satisfies this definition of autonomous horse but many um so yeah we're just starting to advance the plot um and the agenda today is you're going to see demos some talks a panel and lighting talks um there would be a lunch break in the middle and yeah enjoy folks alvarius with opcraft so I'm just going to hand it off to him cool thank you all right I'm going to show you op craft which is a little game that we've developed over the last couple of weeks using mud um use using mud because we use mud it was possible to implement this game in a couple of weeks and the best demo is actually to just go to opcraft.mod.dev if you have your laptop here and try it out yourself and this is a this is a world that is proceedly generated and infinite and everything happens on chain um so if I if I go here and mine a block then that is a transaction that is going to be sent on chain and then here you see it got executed successfully and so now I have this item in my inventory I can mine some more blocks and I can of course also place blocks and then the last thing I can do is craft stuff but I need both hands so I'll just put this here so in order to craft stuff I first need I first need the right ingredients of course so I'm gonna go over I'm gonna go I'm gonna go over here to the wool tree and mine a little wool block and then I can [Music] all right I can go over here to the wood block I I just mind a little rule block and now I can open my inventory and place the wall block here place a little flower here oh there we go and you can create a diet flower there's a bunch of other recipes in this world this has nothing to do with Minecraft by the way so the recipes are not the same as in Minecraft in case you're wondering um but yeah feel free to check it out it's on opcraft.mount.dev and we're very excited to see what you come up with all right hello um I am kushaba I work at lattice making video games on chain um I was previously working at dark forest and this is a demo of an on-chain RTS we call skystrife which will be launched soon um and this is this is a fully on chain game each time you move a unit or attack something it is a is a transaction and as you can see I'm battling my co-worker right now it's not doing anything there we go okay so this is built using mud um I feel like I've been Shilling mud all week and I just want to explain that even if they fired me tomorrow and told me I could never work on mud ever again that I would still do it and see them in court like that's how good this game engine is um and I coming from Dark Forest like Dark Forest is a monolithic code base it's an amazing code base like it uses it's the first usage of ZK in a video game but it's not extendable it's very difficult to add new features um every time you add Like A New Concept of an entity in that game it requires changes throughout the entire stack and that is that became frustrating for me as a game developer like you want to be pushing content out to your users like you want it to be able to add content really really easily by just making a solid foundation and then all the content and here's the foundation and I think that's the beauty of of mud like for the first like this game has been in development for three months the first month was basically making the game um all the on-chain functionality was done within the first month and the last two months was just polish like making a good client making new units like game design play testing so that to me is the the power of this engine like the power of ECS in general it's like if you if you take these like limiting constraints of defining everything as a component and you make your game with that you're kind of free yourself up to have a much more powerful development experience and just to Showcase like what this game is composed of like we actually have a Unity style sidebar here where I could say oh let me check out this uh Rider here here are all the components that this Rider is composed of and like the most generic component you can you can think of is position right it has an X and Y position so these two components here position and movable anything with these components can move right if I add a dragon if I add a Golem if I add a villager if I want them to move I just add position and movable I don't need my move system to know what a villager is it doesn't care all it cares about is that this is movable it has a position and there's nothing in my way and yeah just to go through like kind of the complexity of this game um I've been amazed at how not limited I've been in my game design ideas like the only limiting factor right now is probably the fact that the the blockchain does not have a tick function right like if I wanted to make an NPC that walked around yeah that's pretty weird because someone is going to need to tick that NPC but other than that like I've been able to make all my game design dreams come true with this uh with this engine and it looks like I'm getting attacked right now yeah this little chain icon means the the transaction is getting submitted when I'm attacking or moving this is basically it is fully real time but we have this concept of a of a turn so every 60 seconds each unit regenerates its action points and those action points are used to do anything in the game and that's kind of just a limiting factor for Bots right because since it's a non-chained game it's client agnostic you could write a smart contract to play this game um if it was completely unlocked you could make any transactions you wanted at any time Bots would dominate right they would just be filling up blocks with all their their movements and moving perfectly predicting everyone yeah so if you join the Discord I'm running like play tests pretty frequently um it's a pretty competitive game right now if you've played Starcraft before you'll feel at home um you should probably have a mouse it gets pretty intense if you want to play but yeah this is what I've been doing and I hope this inspires you all to make your own uh on-chain games thank you hey everybody my name is Tony and I'm one of the founders of the Dark Forest Dao we are a community of players who started playing Dark Forest last summer and got so inspired by playing this first fully on chain MMO RTS game that we decided to start building on it ourselves so what we're seeing right now is a live game of Dark Forest between valorum and Jim Jim um in this game you control planets and you're trying to send energy between them to achieve specific objectives this game has had a long history of iteration and development and as kushaba mentioned it is kind of a dinosaur and some of the underlying architecture but even with that being said it's still really really fun to play and so at DF Dow one of the things we've done is added some new ways for players to interact with this Dark Forest universe um one of the first things we did was make a single player game called the Grand Prix which is a speed run on top of the Dark Forest universe so players try to get from point A to point B as fast as possible but we missed some of the large-scale Warfare that was super fun with the traditional MMO Dark Forest and so for this conference we put together a new game mode that we're calling the race or the Quest for the antimatter Cube which is this new artifact that Nerfs planets that it's on so it makes it harder to move when you have this artifact in the game so right now we're seeing a battle for this cube in the center of the universe and I'm not sure which player this is but their goal is to try to send this Cube to one of their extraction points which is one of these planets right here called a space-time rip so can we get a cube move from our players real quick in case you didn't know this game is also fully on chain the smart contracts are running right now live on the gnosis optimism blockchain um we're seeing real-time transactions taking place and the client is fully open source which has enabled people like us to build and modify further so this is Dark Forest um can we get a show of hand through here has played Dark Forest before I'm just curious okay so we got some some fans in the audience awesome um yeah okay yeah we're seeing the cube moving um okay okay cool well that's a sign um yeah so this is the Dark Forest anti-matter Cube Edition um if you're missing some epic Warfare stay tuned follow us on Twitter and maybe we'll have something that is large scale and involves the cube in the future no we're gonna have Arvin gvn on stage for the talk Urban given work on Moving Castle it's a very interesting if we can say so project mixing identity gaming on-chan stuff um yeah um I met them in Berlin a while ago thought they were very weird and now they're here so thanks for coming folks and on to you then thank you uh yeah we need a computer thank you for introducing us it's the third time we've been called weird during this conference which uh I don't know yeah thank you we need a computer um I think so I think we like to uh insult each other okay while going yeah let's make sure you check ah beautiful okay I am since yesterday I I don't get many possibilities to brag about this the world champion of Sky strife I won the tournament yesterday and uh I I think uh this is a good moment for you to all to appreciate that yes thank you very much thank you oh yeah look clapping here oh yeah oh thank you thank you thank you very much yeah I don't know if I was the only one actually playing with that kind of intensity but uh I loved it should we do an intro before we can swap around the order of the slides a little bit [Music] okay I am Arthur hi everyone um I have a background in among other things the blockchain space I also um co-founded a space in Berlin which is called trust which is an online community kind of a physical workspace we do a lot of lectures and events and um we've been talking to the autonomous world's lattice and zero zerox Park people for a bit and it felt compelling enough to kind of come back into the space I would say uh for for exploring the potentials of this uh I am gvn I have a background in cinema script writing storytelling um over the past six years I transitioned to like real-time rendering engine and video games um yeah Erasmus there the the man in the shirt uh wave Rasmus is also part of the team great okay so what we're going to talk about is clearly this um this is about autonomous worlds and decentralized narratives um I don't have any notes no which is interesting but we can roll with it we already did this part and so me and G band started working together by writing this piece which seems to have resonated with a bunch of people which basically tried to start poking at the idea of what are the visual and like representational metaphors the decentralization decentralized organizations can have and how can they come together in game worlds to maybe have different types of interactions that was the basic premise of the piece and through that we started kind of thinking about game modes kind of ways for different organizations to come together using games uh according to this simple logic where you have a world you have a governance input from from two kind of communities and you can structure games that way and so what we built first was an instance of an Unreal Engine World game that could plug into twitch so that two different Discord communities that we worked with could um kind of control the game through the twitch chat and we also additionally built like an identity layer that would merge their tweet or like they would like connect their twitch identity with their Discord identities and would give them like persistent uh assets like schemes or just like Rewards or any type of values throughout the streams yeah this is how it manifests yeah the stream can look like this uh this is the first one um in the in the first one we we kind of try to like simply um see how how can we have like individual player represented and what kind of game modes uh could these um habilitate and so the first the first task we did was like kind of like a Pachinko like game in which you would through the chat you would control a character the character would fall down this Labyrinth eventually if you were lucky enough you would make it into like a cave room where the skin that you have randomly generated would lock in and you would have it into your persistently in persistent database so you could play with it in every game it's funny to see that um although like the very simple mechanics that we tried they were already like and like quite some lore uh coming up like you know people started like spamming the chat obviously and they like clocked the the entrance and then all at once they fell down so yeah it was kind of funny to see um it's also worth mentioning that we saw this initial infrastructure as a way prototype kind of large scale game modes for communities that involved Collective governance mechanisms so we always saw it as like almost like interface experiments or on-chain Logics but this way of building it just allowed us to prototype very quickly right so this was another another game mode in which all the players would control an individual character and of course when we had like around 250 con like players uh per session and it's obviously a mess when like 250 people try to write left right or like move move a character randomly it's it's very funny but also very complex and obviously we needed some governance mechanics to like um make this a bit more efficient a bit more playable yeah in this case it was just everyone had to chant at the same time and the character would move which is maybe the most brute like yeah way of doing it so in the in the next stream we kind of like refined some of these mechanics this was like a game mode in which uh the community would um create their their Avatar representing them so all together there there were like basically two um scale of governance one was like the individual scale so every player could control the camera movements and the pieces that were swapping so this was like a modular modular character they were building piece by piece and the second one was like more like a collective effort to lock the the piece in place for example so they all have to type at the same time fill up a bar and if there was consensus the pieces would be locked in and they would move to the next part um this was the last stream we made which was the most complex because both Community came together to play against each other there was also like that character in the back it's ARB with the most streaming background about the game state with a motion capture rig and um yeah and here we had like again like different governance model but we divided into like uh turns let's say so the first one was like Anarchy mode in which everything that you would write would trigger an action so there has been cases where like after collecting a lot of points one idiot in the chat would spend them for the dumbest action uh and they were like we we it was it was fun we also had another mode it was more like a democracy mode in which they again they had to like like reach a threshold before the action would be triggered and we we tested like many of these modes in this in stream just to see like what were the affordances of each governance model what was interesting with the whole process I would say is that if you kind of make governance part of gameplay the failures of governance create the most fun experiences I would say I think there's a very different design space and then like what we may be used to in the blockchain space more generally where it's very frustrating um so this is a realistic portrait of us after four months of development we made six games in total uh produce more than 150 modular 3D assets we had custom soundtrack we had like yeah like motion capture rigs we had collaborate with more of eight artists for the production of all these Assets in a decentralized manner and we also work with the community themselves to generate um the lore and like how the world would look like what kind of assets should be produced um and it was I don't do it it's extremely stressful but live streaming as a format although like fun is also this combination of trying to build many mini games in a short time while not being able to test them on any not on the scale that you actually want to before and then doing everything in a live stream format is a horrible idea don't do it yeah you just have to embrace fail I mean one thing we learn is like how to turn failure into like lore I think that's actually a very like I think it became like a like a core mechanic of the the the next things we are producing but yeah but we did learn some things there were some like uh inherent limitations in these formats um yeah yeah you can go okay so the first one was uh that although we built like these persistent identity for the players the worlds themselves would not be persistent between the streams so it was basically like kill the world every time and like uh restart the unreal instance um and um yeah and yeah another another problem was also exactly that although we collaborated with uh the communities to develop all the World building of these games in the end we were the sole owners and the Soul gods of these worlds uh they didn't really have access to restructure the rules of the games and uh the third one was what we call group emergence so we basically we were designing tools for existing communities but we were more interested in pivoting into like an environment from which the community could grow from within um so we decided the only way to go beyond this limitation was to produce another game uh we called it for now like a tragic comic NPC survival Sim and yeah we decided that it should be on chain you may ask why so here's a good graph explaining it so if we if we take these uh these are like all work in progress so don't take them too seriously but take them seriously so on the left side of this screen of the player agency graph we have like worlds that are built from Gods from within like a room there is an inaccessible to players the world that is produced is basically a dead World once it's created It's Never Gonna Change um yeah some examples are for example Disney movies or the Bible uh the only way you can the players the only way players uh or viewers or users deal with this uh or engage with these worlds is through consumption or through fan fiction if they really want to change something the second uh it's let's say like similar process but thanks to like mostly like real-time rendering engine there is now the ability to change the world itself so the gods are still producing the world but the world this time is alive um it can be through the interaction with the players it's kept it's it's changing and a good example of these like World of Warcraft or Twitter the players though still don't have access to the horror functioning of the world they are still outside the play The Gods room the third one is um I think Dark Forest and um yeah I mean I wouldn't say dog I mean yeah dark fourth probably I'm we we don't know what to put there really I would say I I think like you you explain oh I think you should expect I always make me do the hard work uh so the third one let's say that this time the players are in the same room as the gods so potentially they have access to the chain changing the world itself uh the the world itself has agency over its over set itself 200 times is that it I think that's good there's more yeah you said you should say like it's perfect ah yes right it's it's very perfect no I mean this is like definitely the model that we are interested in and it seems like it's solving a lot of solutions so we yeah we thought it was definitely that's the way to go everything is going to be smooth but of course no it's not smooth uh we we did when we started developing the game we did um find some some interesting question we need to answer especially when we produce well especially producing like uh like an open ended narrative game um so for for now there's gonna be more I'm sure but for now we have three questions that we are trying to answer yeah there are three problems that have arised from the process of trying to build an autonomous World especially under the assumption of like player agency which is a paradox in itself somehow um and we've outlined three problems and kind of our proposing our at least our solutions to it um or poking at solutions to it the first is the input complexity problem which is that if Dark Forest and Xerox Monaco in our opinion are maybe the best kind of examples of what onshine gaming can be because they allow creative permissionless input to solve problems we don't really make all players cards we make solidity that's Gods which I mean good for all of you that are solidity death I am not one um so this is like an interesting problem to poke around with but what's nice is that there are games that actually have creative input through Visual editors as an interesting game mode and we think that there is a lot to learn from here okay on the left and Opus Magnum on the right by electronics are both systems that fairly imitate fairly complex like construction models through a visual editor and we think that leaning into this kind of domain could allow grid lowering the barrier to entry or creative inputs to more casual gamers yeah that's the first problem the second problem is the rule definition problem if we want a world with full agency and we want players to define the rules of the world itself how do you who establishes the initial rules and why do people care like why why do I care about a world which has no narrative why do I care about the world uh where I can change the rules arbitrarily and there's a paradox if anyone can change the rules no one can change establish anything because everything is up in constant kind of flux right so we are designing this in the way that you start with a single agent that you can program similar to early artificial life games like technosphere or as they're called ecosystem simulations and then over time as you kind of scale up uh in like organizational size or in group size or in governance you get more and more agency over the world so the game itself is the governance over the world and by winning the game or going further in the game you get more and more governance over the world that's a way for us to kind of structure a linear progression of agency setting up the rule set initially and then allowing players to explore as they kind of experience the world explore it and a bit more and more agency over time this mirrors kind of the progressive decentralization thesis that was popular many years ago in the space but we think it's a good fit for potentially building on-ching games and we also think that in terms of narrative there will be the need for a strong establishing narrative that is connected through the rule set I mean if we look at something like um Twilight uh it's very clear that that like if a narrative is evocative enough you can't actually prevent people from participating in it it's impossible like it like even if we have like a closed world like Twilight people spend thousands of hours writing fan fiction about it and participate in that world because they feel so strongly about the narrative so it's super important to have a foundational narrative but how do we make that narrative open well our approaches that we separate the narrative and the mechanisms of the world into interface layer and on-chain layer so that anyone later can build their own narrative window into the world while us being able to still kind of provide a strong narrative angle into the world in the in the first establishment of the game okay this is a tough one and also the most exciting one to us it's we're kind of presenting it as a problem but it's it's more of an interesting narrative um kind of angle which is that if you have a world that anyone can change how do you cope with the possibility of them ending the world at some point and Ultima Online the famous example of the ecosystem collapse where they established this great ecosystem they went a lot of planning into it and then very quickly the place has killed all the animals right and the the game devs panicked re-reverted and kind of set protections around the animals what they should have done is just said yeah they killed all the animals now this is a world without animals you know you accept the kind of Horrors that the players do to the world as a lore and you base your narrative around it and there are games that do this really well both Dwarf Fortress and rimworld really lean into this kind of logic well Fortress even frames itself as a narrative generator where the death of a colony is not a a fail state but a tragic narrative or something like that because I don't have the notes but um yeah so we we are going to really Embrace this that the narrative comes from uh the player actions themselves right and as a as a quick note since we use the world three body problem which we absolutely do not copy from the famous uh sci-fi book uh it's it's interesting in that book there's you know scientists are playing a game and like where they have to solve this very complex problem to keep the game to keep the world of the game alive and they [ __ ] up and every time the world is like Civilization number X died after this and this and these and this player managed to invent this and that and I think that's a really nice approach like this idea that the world is going to end and that is going to build the next iteration of it um okay so back to the game so back to the game uh so that's uh again like our definition um but what does it practically means well we kind of already uh explain it a bit but what we imagine this game to be is basically that you will control an NPC maybe you can turn the slide yeah uh you will start with an NPC that you will be able to program and then like you can program a lot of like some actions that this NPC is going to do in the world and then you're gonna troll the NPC in the world and see what happens to it and obviously uh there are many many things that could go wrong um so the the the main the the beginning of the game is basically going to be about survival it's on the individual level you control one NPC and you will try to survive in this world there's resources you can Farm um and you know stay alive it's some sort of um rust like environment and then as you proceed with the with the game you will be able to create more and more complex operations that you can do and more and more complex social structures and this will allow you to unlock different type of gameplays and eventually uh if you spend enough time in the game or if you are good enough for the game you will be able to reach the the world scale and potentially basically take over the role of game developer um yeah I mean at this point this is a very ambitious project we're aware of that so we're going to start in the first part down here our first prototype is down here and we're gonna see and fail probably a bit and then learn from that and build out in this direction but we think that this Arc and this logic is very promising in kind of thinking about what on-chain games can be as a kind of casual experience that has performs be the medium for how you get agency over the world itself and our first wireframe this is a horrible sketch but it's not horrible because Rasmus media is great okay but he told us to absolutely not show it and that is why it's on the screen I mean but we felt like it would be good to show something that kind of points towards what an early prototype could look like and here you basically have an NPC uh you have a certain amount of resources and you can basically sequence a behavior by a drag and dropping operation from the right side if you want to write your own operations that interact with the resource logic of the world you can do that we also want to have something similar to the dark force plugin logic that then plastic operations kind of repopulate in the uh the front end of other players and on the right side you kind of every time you come back there is a log there is a narrative that has been generated when your character is interactive your NPC has interacted with the world independently and that might be you know it is Diet because it didn't find food or it has you know yeah whatever it is is that it basically it yeah yeah so we end up where we started um we hope this has been a somewhat interesting exploration of some of the tensions of agency within the idea of autonomous worlds uh kind kind of are poking at some of the solutions that we find have potential for this and our goal is to have a prototype by December January uh um yeah that you all can hey Lynn thank you round two of the aw self-led sessions uh if you were here with us in the morning thanks for coming back to the afternoon if you're just joining us welcome uh we're gonna kick it off with our panel discussion uh I'm really quickly going to introduce our two moderators our co-moderators we have ayush and Xerox Hank they are going to give a quick little opening remarks introduce you to our panel and then we're gonna get started so let's give a round of applause for our co-hosts today's panel is called frontiers of autonomous worlds now the frontier of autonomous worlds maybe three years ago didn't really exist Until Dark Forest happened and it was largely the same for a couple of years until now when there's been a huge explosion in what we can do with these Technologies and so we want to ask a lot of questions about what is coming forward and how can we predict what's coming next yeah the frontier is looking bright and I think we're all excited to see what's coming um but it's also somewhat unknown a lot of this technology is really nascent and it's unclear what it's going to look like in even two or three years let alone five or ten so we really want to push you guys today uncover your long-term Visions as well as what's just been going on recently so why don't we start by introducing everybody let's start with gupsheep and then work our way down hey folks I'm gub sheep I work with Xerox Park I spent a lot of time from 2019 to 2021 building out a game called Dark Forest with a handful of friends some of whom are at Devcon as well and these days I mostly think about applied ZK r d with zero X part groups hello I'm Kevin uh part of the founding team of optimism building the optimism Collective uh nowadays I spend most of my time thinking about how to build the next version of optimism made net which is called bedrock and then how we extend that to the op stack to empower autonomous worlds hello everyone I'm alvarios and together with Justin I started lattice 18 months ago approximately we started building a specific on-chain game at first but then ran into a bunch of very general like very general problems and so we decided to build a key missing piece of infrastructure a game engine for autonomous Worlds at the beginning of this year approximately and that was my main focus since then cool hey my name is Justin um approximately like two years ago I ended up in Mexico with good cheap working on Dark Forest and then from that we kind of like started zurich's Park together with another friend um I was working on chain game with this gentleman uh it was really hard we gave up we started again we gave up again and then we were like okay we have to solve some like fundamental problems first so we we hid in the cave for a long time we built a team we wrote essays we wrote mud and now we're out of arcade with cool stuff awesome so maybe to start understanding what the frontier is it would be good to go all the way back to the beginning to 2019 when the frontier was dark forest and I guess what lessons can we learn from that era that could possibly be used now to understand what's going on I think maybe kick things I can kick things off and I'm actually curious to toss it over to folks because I think that uh honestly like the the three of you on stage right now have been thinking much more deeply about this um back in 2019 um and I mentioned this a little bit in a talk I gave earlier this week uh I think that the idea of like a fully on-chain game that was more than like an nft collectible game didn't necessarily seem like it was like technologically feasible or like worth exploring um and I think the takeaway from this probably shouldn't I mean like there's one ticket which was like oh you know like in retrospect like this makes sense as an area of exploration and we should pursue it but I think that the like slightly more interesting thing to think about is like what kinds of things three years out from now like let's say it's 2025 and we're having this panel and we're like asking about like mud in 2022 what things can we try today that seem like unreasonable or like purely just like intellectual Explorations that we don't know where they're gonna go we don't know if they're going to be feasible um I think just like keeping them within the spirit of like exploration and plays is really important maybe on like a you know more concrete note uh one of the things that has been one of the biggest takeaways for me in the last couple of years is this idea of like emergence I guess like this idea of like you build the substrate for them the community to build itself and I'm actually curious to hear about like I mean you know I'm sure that there's a lot of really interesting stuff going on optimism that's like unpredictable and even in the first couple weeks of mud being live I'm I'm very curious to hear I mean I feel like from 2020 2021 like I remember we spent a lot of time talking about like can Dark Forest run on an optimistic Willow and at the time it was just too expensive like we kept like brainstorming we're like oh can we make it work other ways that we can like like oh we'd have to like spin up a brand new chain and we were still like we're still working optimism mainnet and getting it to a point where like it was production ready and I feel like we're finally at a stage now where the way we've constructed optimism mainnet can be easily repurposed to spin up not just like one game chain for dark force but just like hundreds or thousands of chains uh very very easily so I'm excited that like I feel like we're finally at a place where like can we run Dark Forest on a roll up and the answer is gonna be yes very very very soon hi um yeah I mean when like I mean you folks had were working had been working on doctors for two years when we started doing stuff it was also very hard um I think the main thing that people are missing is not necessarily the tools in the technology but the mental models um I think that when you kind of like so again you come from D5 like hyper optimization um surfaces for auditability and then try to build something like Dark Forest where what you do is like you make one step forward but you still kind of like keep the infrastructure you've seen before so like the doc first contracts look like D5 contracts the difference is that they're not gas efficient and not audited and like way more crazy um and like fast forward to now I think that from the perspective of like the ethereum protocol and and solidity not much changed but something like mud where are we okay sat down and decided to give up all constraints and like think about a novel architecture that's actually one of the things that like pushes the envelope forward and it's interesting how it's all of those different dimensions and like you need to get all of your cards right in order to be able to like create a product that is like a step function advancement compared to the things before so I think that right now what we're seeing is better toolings better models and better scaling Solutions will probably like bring us to like kind of like a different era so continuing on just thinking about what has already come what are the lessons that we could learn from things like Dark Forest some of the really new uh Builds on top of mud like skystrife the new game and opcraft which is kind of like the tech demo game are there any properties of those uh worlds that we could see carrying forward as these worlds get more complicated and get more interesting and More Alive um so I think that one thing that so one thing I like to say is that like ethereum mainnet is the best MMO right now but it only caters to like a very specific type of control and what we realize is that I mean what everybody's realizing is you can have a very simple set of rules plus like some observability into the system and autonomy and then you get crazy emergent behaviors to happen like things like Mev is a it's an emergent property of like a public block market and so yeah like I'm curious what you think gupshi but from Dark Forest the thing that was interesting is like focusing on making a game of like the simplest possible like layer of rules and then leaving obvious space for the community to build things and like like forming the emergence from there I guess yeah actually I can talk a little bit about some of the like design decisions that went into the like initial versions of dark force I still have all these like old spreadsheets with like you know a bunch of uh formulas that eventually made their way into the dark force smart contracts um I think that a various and Justin have been talking a lot about this idea of digital physics and though we didn't really have like a great like term for this at the time I think that actually captures very well like the intuition behind what we felt might make for a viable on-chain game because the chain is such an adversarial environment you know like Justin said ethereum is this massive MMO where pretty much like anything goes it's like you know Anarchy out there um what we the way that we tried to design dark force from the beginning was well there was a few principles for example one was scale and variants uh which is kind of another way of saying like civil resistance so because you have uh like you because you have this world where you can't like we don't want to like kyc or something every player coming onto Dark Forest it should be the case that like you know having three accounts playing Dark Forest should not give you more of an advantage than having one account that's playing at 3x the scale so if you've played Dark Forest you'll notice that like you know there's this continual geometric progression where you start off at like a level zero planet and then every planet level up on the hierarchy gets four times more rare but also like approximately four times more like strong or powerful um and this is something then that like gives the game almost this like sense of physics around like what is the maximum like rate of resource harvesting that you can get like what is the maximum speed of light was also another question here that we try to tune around like basically the maximum speed of movement in the game is another thing that we tried to tune around the relative Planet sizings uh and like what are the scales that different players are going to be playing at so I think thinking about things from like this really like grounded like first principles physics level which is kind of uh you know like argue I know that like some folks in in game in like traditional game design might like want to you know really push back against that but at least for getting something on the board that was that was I think a good choice for us because usually you have a good player promise you're like I want the players to feel this way and you reverse engineering the rules from the player promise and here it's more like hey here's a world that is kinda okay like itself regulates and we don't promise you anything uh and and I think I remember there is a someone who texted me on Discord back when one of the dark first run was running saying that that was the coolest thing they had ever done on the internet because most everything was emergent essentially yeah for sure yeah and I mean that's kind of also the one of the base principles we put into opcraft where it's if in case you haven't seen it yet it's like an on-chain voxel game that kind of looks like Minecraft but it's not really Minecraft um and that's exactly the thing you have to keep in mind like if you think of this as Minecraft then it's just a shitty Minecraft because it doesn't have the same features it doesn't have like the same um basically people can just send transactions directly and there's some things that are not enforced in the physics but instead we wanted to make the physics very simple such that other things can be built on top of that like speaking of this emergent behavior and yeah that's we just launched that basically soft launched it on Wednesday and we're very curious to see what people actually come up with yeah I'm really also curious to see what people come up with one thing I'm wondering about is this digital physics idea is so cool and new and what is stopping people right now from experimenting and building on top of these Primitives yeah I mean I think a big thing up till now has really just been the tooling um and this is where I think like you know mud and the particular infrastructure that Kevin mentioned for being able to like launch uh game specific plasma chains is so important every single feature that we added to Dark Forest was really like we were fighting an uphill battle like we would have to thread like I mean you know Andy spent a lot the last like you know like first six months of this year it was just like it would take a month to add in this feature of like spaceships which should be this really simple thing if you're working with like Unity or Unreal Engine here you've got to go through you've got to like wire this through like the contracts the ZK snarks like the interface to the client the various different like open source packages um there was no game engine and so every single feature was was just this like ad hoc thing that you were you know writing like over like 5 000 lines of code to like introduce like a new item into the game so I think it's just you know one of these barriers is just developer experience yeah I mean that's exactly what we went through when we started working on a launching game uh beginning of last year and we basically spent like five months or something building the the core physics and then uh we play tested for the first couple of times and we realized it's actually not that fun and so we wanted to add some content but then adding content would have meant refactoring the entire code base and like editing like hundreds of files to just add one new type of entity and that's exactly why and like with which in mind we we built mod and now with mods and he was able to build the first version of SkyDrive in like two weeks and was able to play test then and then continuously iterate over it to make it much more fun yeah I think like you know just add on to that like one of the crazy things when I look at the difference between something like skystripe and Dark Forest is the level of um complexity in the amount of content dark force essentially has like five types of entities in it total there's like planets there's I guess like two types of resources energy and silver and then there's spaceships I guess there might be four four types of entities really in Dark Forest and Sky stripe there's like you know over a dozen units like a bunch of different kinds of buildings like multiple dozen like kinds of relations or interactions that you can have between these things foreign I kind of want to start pushing you guys a little bit um obviously uh we call them the autonomous worlds game engine and autonomy is a huge part of it um kind of on the other end of the spectrum we have this company called meta which is kind of building like uber centralized worlds and so I'm curious and I'm sure other people out there are curious as well really why is autonomy so important for these worlds what does it bring that Zuckerberg will never bring to the table yeah so one way I think about this is um there's this book called emissary's guide to worlding and it kind of like looks at okay so if you want to build a world that is alive and they Define aliveness as the inverse of the time that the Creator needs to put into the world to keep making it cool right like as an example ethereum actually Bitcoin is maximally alive because um a Satoshi is not contributing anymore ethereum is not maximally alive yet we still have like some of the creators that have a lot of power like still pushing for stuff and one thing that is interesting with autonomy is that you unlock actually like a total different kind of relationship with the thing than with something that is not autonomous um so maybe one way to think about it is if a word is autonomous essentially it like it's gonna bring essentially different kind of affordances and people are going to relate with them in a different ways um so to kind of like compare it with meta basically if you want to build autonomous system that lasts for a long time you need to essentially give up the mask of director you can't say hey I have I know what is best for this world therefore I will bring the thing that it needs to remain interesting because that is essentially like shutting down pluralism you have a single group of people that think they know what's best and then you end up with like Marvel movies and you end up with like all of those like things that are like maximally dead basically in terms of like from that perspective um on the other side if you build a system that one has claims to autonomy and two has rules in such a way that like there is no difference between the people that add the content and the people that experience the world like this reality is a great example like I do not need to get a certificate from God to build a house I just build my house and nobody needs to tell me hey you can do that um but at the same time the fact that we all have to comply to the same kind of like lower level rules means that we can live together um I think that one thing that is really crazy with all of those like metaverses like Roblox blah blah where like people can create different experiences is that they're really lonely they feel like theme parks you move from one place to another and essentially they're dead right so I think that yeah that's kind of how it could come but also it's a bit like a mystical answer so maybe not the best but I'm also curious what other people think and I think even you also think about autonomy a lot right from the perspective of building those things that need to be like live on their own for sure yeah I feel like autonomy is actually really important like also layer down in terms of like building the actual chains in the infrastructure so I think like a couple years ago when gupsheep and I were talking about like can we run a dark Forest chain it was like Well we'd probably have to spin up a new chain with different parameters you'd probably have to like maybe we'd have to swap out the data availability layer and we were such a small team at the time I was like oh my God we need to hire like two more devops people we're gonna need to like have a brand new product like this would be so much effort um but I think the big realization we had is like right now a lot of a lot of blockchain companies are like currently they're trying to like build the the the infrastructure for like app chains for you know app specific chains but you have to go to them and like ask them to go spin it up for you like you should be like hey like X or Y company can you please spin up a chain with these parameters for me and then you probably have to pay them a bunch of money and like you also don't have autonomy over like the infrastructure that you're building on top of I think one of the big realizations I think lattice really opened us up to was like without us even like talking to you guys you guys already had like forked bedrock and we're running your own chains and like because we have an MIT license because we designed it in this modular way where it's like maximally simple you guys were already like autonomously taking this infrastructure and spinning it up for your use case yeah despite like like you guys spun up a Tesla before we had a test net running for Bedrock like I don't know how you did it you guys are insane um but yeah I think what we've realized is like if we design the the the software stack for these chains in a way that is massively modular and maximally simple that like any chain could just go and like any any app can go and like take this infra and and spin it up in their own way have full autonomy decide what their gas limit is decide what their data availability layer is decide what their proof is you know decide what their VM is um I feel like that unlocks just like that will unlock just this I don't know Cambrian explosion of just like apps that cannot exist on chains that you know that currently exists and like it it removes the barrier of entry from like needing to go create a partnership with one of these blockchain companies to spin up a chain for you and like you can just go you can just like go do it yourself you know um I want to also give maybe another angle on why I think autonomy is important uh just from like some empirical observations that we saw with like the dark force Community one cool thing that autonomy does is that uh like when you see an autonomous system uh that autonomy is almost a credible claim to the system's longevity so like what does that mean well concretely you know dark force would run in these like super ad hoc rounds that would be like you know every couple of months we've just like dropped like a week-long dark Forest round and we'd have these like fantastic periods and bursts of activity like during the week of the round and like the week right after but then you know afterwards there wasn't really any like credible commitment that was made by like the core Dev team or the system that this world would continue running and being alive and being interesting and so we had a bunch of these players who were kind of like stuck in this weird middle Zone where they're like I'm like interested to build more stuff on this but I'm just like not sure if it's worth it because I have no idea if the next round's gonna be like six months out a year out if it's even going to be like the same thing when or if Dark Forest will even continue at all whereas when I look at like you know the third party developer environments of games like Eve online or RuneScape which are also not entirely autonomous worlds but have a sufficient amount of like player ground up bottom-up uh activity um you sort of know like RuneScape is going to be around in 2.5 years so you like spending a weekend or like committing the next three months of weekends that you have to committing to like the Rune light open source client is like a worthwhile Endeavor for you because it actually is being woven into this like fabric that's going to continue onwards yeah and just uh one more one more thought to add is basically if you want to have a world that's interesting enough for people to believe in then um it's of course much more like much much easier to create that if there's many people contributing to it right like if there's only Facebook building this like metaverse then it sounds kind of boring and it's the way I think about it is like the um like the parallel between um a plant economy and a free market where an applied economy somebody controls everything and usually it's not the best outcome whereas in a free market everybody can contribute to it and then the outcome is usually much better and much more interesting so while the autonomous worlds are very interesting it seems that current infrastructure like the L1 mainnet is not really possible to run these autonomous worlds on and so if we really want to unlock like the infrastructure layer that can support these autonomous worlds like what are the changes that need to be made and what are the technologies that we can look forward to for say a 100 000 person MMO or even bigger um I think like the first step is like making it incredibly easy to spin up your own chain right and I think like we definitely vastly underestimate like what it means to spin up a chain like there's so many components external to the chain itself that people now just assume is part of a chain like a chain is not actually live until you have a good block Explorer you can't actually like like if you give someone an RPC endpoint for like a node it's like oh yeah here's a chain like nobody's gonna know what to do with it and people are like oh well where's the Explorer like that's this is a very fundamental piece of like what makes a chain a chain today I think there's all sorts of all sorts of other pieces of infrastructure like that like having having an amm having like gnosis safe like I think we would start to expect that like any autonomous world would you know it would it would be really helpful for the builders in that world to know that they have these basic Primitives that they're used to in the ethereum L1 MMO um and as I think like the vision with the op stack and like we're not there yet is like literally just being able to to instantly spin up a chain that has all these components right you spin up a chain it automatically has a hosted block Explorer it has a hosted bridge where you can like Bridge tokens in nfts in and out it has an amm already launched with the front end it has you know gnosis safe and maybe even like tenderly maybe even it's it comes with like you know a few extra info providers like infuria or Alchemy yeah exactly um so I feel like that's what we need to be able to enable like thousands of chains and like the scale that you guys need for like these autonomous worlds will require like thousands of chains you know yeah so that's step one yeah step two you have to go even more djin and basically I think that right now kind of like the assumption is hey we need like Atomic composibility between everything like every contract should be able to call another contract like within the same synchronous call but I think that kind of like that assumption breaks down if you think about embodiment like in this universe I cannot actually like impact Alpha Centauri right now I have to wait a couple minutes even if you like travel at the speed of light so if you bring embodiment in some form of like um essentially like I mean it's like a symmetries it's like you have like a maximum speed limit you can start shorting things geographically and a car give a talk about this about the super chain if you if you have a shared set of sequencers then you just have a single block delay when you pass from one to another and so there's this great talk from like the guest team lead about the limit of physics and Geth like you can't go faster than a billion gas per second for too long because otherwise you're literally gonna hit the limits of computers because of the data structures what you can do is you can have many of these running in parallel and true you break composability between them but if you make everything embodied it doesn't actually matter so the other kind of like interesting side effects from this is markets are going to become extremely efficient because there is no such thing as a global market and I think that that's going to be quite fun and interesting it's going to level up the MAV game uh like yeah it's gonna be insane like the map the methods of the future are going to be the industrialists of autonomous Wars they're going to build trains and stuff like that just like move resources fast and and do Arbitrage so I think it's kind of interesting if you go away from the use cases of like extremely efficient D5 markets and like really composable like nft Primitives everything goes right it's this this it's kind of like this new scene that unlocks a design space and ideas that people left on the floor and like didn't bother picking them up anymore because they didn't cater to like the existing market so I'm pretty excited to just be able to do like stuff that wasn't done before because nobody needed it so one note on the composability is that so far we've only talked about games existing in their individual silos but it seems that if everything's built on a shared infrastructure then there might be interoperability between these games I'm curious what you guys think that looks like in the future and how the things that you're building might enable that so this is again one of the like key principles that we've put into maths is like interoperability between all the different games if if you build mods and I'm later after like later to later today I'm going to give a talk about muds in case you're not familiar with it but in just a few sentences there's components and there's systems that are registered on the central world and there can be multiple games actually on the same world or multiple layers of augmented reality basically on the same world and then the clients decide which components and which systems they want to interact with and that's kind of already one like level of interoperability like different games within the same game right but then at the same time different worlds are also interoperable with each other because they're all use the same like way of storing the data so the way you query your own world is exactly the way the same way you could query any other world um yeah and basically you can read from anything and you can only write to the things that that you have access to and yeah what people will come up with it I don't know we're just here to build the infrastructure and to enable people um but yeah I'm very curious super quick note for this so I think that like interoperability like the naive way of think about it makes no sense like what does it mean to bring a Lamborghini in order World of Warcraft like that's just like super dumb like the only thing that actually can go like from one place to another context-free is identity money and reputation because those things are actually like truly General enough like from our like kind of like subjective experience that we can bring them to other places um yeah as Alvarez said I think like interoperability within the same world is going to be quite important the same way like in this world like you can drive and you play tennis and those are like completely different rules and like kind of like shared hallucination we have on top of the world and that works but like let's see we have the Multiverse and like I bring my Lambo to like a place that has like four dimension like what does that even mean so I think that this thesis of interoperability between like different games actually it's like a bit silly to me but things within the same world where like some core team brings very low level rules that don't even include things like capitalism and competition and stuff like that and you have other people that brings that I think that's the thing that I'm actually really excited about and that's what was that's what we're already seeing with your main net right we have interoperability between the things that have the same kind of like platonic class you know like money or like Identity or stuff like that if you go beyond that it's just very silly in my opinion I mean you know I think that's a great point and it makes me think about like um you know for example the the phrase or like the term nft is used to refer to like a bunch of different classes of things um one thing that it is used to refer to like specifically is you know digital art ownership rights for whatever definition of ownership you might care about another might be like you know a representation of a position on some you know decentralized exchange or Marketplace or anything else and like you you end up with like a lot of problems when you like try to like mix these classes and you have to be like very intentional and deliberate about like exactly like what terminology and what mental model you're building around like what is an you know an nft yeah I mean ultimately it's just a claim to ownership right and ownership doesn't interpret that well yeah so Justin you just said that there are only really a few things that need to be interoperable um and I kind of want to ask about that on the canonical side as well how much do we really need to rely on a blockchain for let's say in Dark Forest every time you do anything it goes straight onto the main net of that blockchain so and I think we've seen with OP crafts that you can actually maybe start to move a little bit further away from blockchain to other decentralized Technologies in order to get functionality that isn't necessarily intrinsic to the like who wins the game so how much can we stray from blockchain in order to kind of unlock some of these interesting features um versus how much do we really need to be always canonical and immutable yeah before letting my friends answer just little context nopecraft so people are gonna understand the question in opcraft um breaking a block dropping about crafting something inventories all of those are verified on evm but one thing that the chain is not aware of is where you are so this was like a we did this on purpose we had a version of opcraft where position was on chain and like you could do things only in the trunk around you you had to provide like some form of like a star proof that you were moving according to the right way anyway the reason we didn't do this is because it was like a social experiment and so what what Xerox Hank is referring to is that um when you play opicov you can see other players go around and run around but that is actually not going through the chain it's going through a peer-to-peer layer um so yeah we have like those kind of like two different kind of hardness in like George Stark term um and yeah I mean I'm sure you two thought about this so I mean even Kevin today the thing that is crazy is like if you look at like open C there's a lot of things that is actually just like derived state from what is actually on chain and like the kind of like the design principle of all of those apps is like put the least amount of things on chain possible which breaks composability but like like brings scaling says number smart contracts can't buy nfts and open c um and so you're you always have this kind of like trade-off like when can humans participate when can like autonomous agents participate yeah I mean um so to put it simply a blockchain is basically just a consensus engine right so if you wanna if it's important that one transaction is like if the order of the accents for example is important or if the physics are somehow enforced in the in the game rules um then of course it would have to be on a blockchain and even if we didn't have blockchain and we wanted to build something to enable that kind of stuff then probably we would end up at a blockchain in the end um and yeah for p-craft some of the things that just make it nicer for people like you see where other people are you see them moving around you see where they look and what lock they have in the hand stuff like that it's it's not relevant for the game or like for the physics and that's why we decided to not put it on a chain but rather on a like signed message relayer oh yeah actually so we had a really early experiment with this um in dark force as well where like if you owned a planet um you could like put a little like Emoji flag on top of it uh and that was not something that was stored on chain it was actually like our I mean we could have put it on chain it actually might have been slightly simpler too um but we ended up we designed a pathway for that to end up being stored on a web server the same web server that also stores the mapping between like addresses and Twitter handles and the reason there was we wanted to start opening up the pathway to have like these auxiliary gameplay elements uh that did not like even if people were adversarially oriented towards those gameplay elements the underlying game mechanics themselves would still function and the idea of you know who is like winning the game or who has x amount of resources that stuff is really important to come to consensus on but if for example like the you know Twitter uh address mapping goes is down or like the Emoji you know Planet mapping goes down like that's not a huge deal but it actually does add another layer of of interestingness to the game because people can use those as communication channels yeah actually one one more thought to add on that is also in opcraft we have the like a linking between the address and Twitter and now we wanted to also show that in the game but we didn't have it on chain yet and then we thought about how to do it and we could have written a like custom like integration with the server that's already storing the like um Twitter username to address mapping but it turned out that it was actually easier and much more straightforward to put it on chain and put it in mud and then we could use the like infrastructure that was already there to just like use it yeah in the client with like it was just so much easier that we ended up doing it anyway even though it's not relevant for the physics it is a centralized Oracle they just say like this is that um I also think we might want to we might have to to add Nuance to the term like on chain right like as it becomes easier to spin up like all these different chains like you can have an incredibly decent chain that just like hosts data in an AWS server and like has a thousand X ethereum's throughput and you can also have like a chain that's as secure as optimism as a mainnet um and so like onshine can mean very different things so maybe like player position is less critical and goes in one of these you know hyper D gen chains and like sure maybe like you lose some data along the way or it's really hard to run a node that like actually um you know calculates everyone's everyone's position but like I feel like you can have like secure unchain you know gameplay transactions like insecure on-chain transactions and like with the super chain I feel like there will be this this design space of like okay like maybe this user travels to this planet and now they're in this DJ and chain and like they can send a crazy amount of transactions and it's super insecure but they they opt into it and they know they're in the wild west here but then they like fly back to this other chain where now they're they're in a safe place where they hold all their money and like you know this is this is the secure the secure Planet you know still better than meta server even if it's like super dgn but yeah that's a good point I have one more thing to add on this um this is another example actually of a thing that uh I know like folks thinking about blockchain infrastructure uh have talked about a lot previously which are even if you don't have a consensus engine there's actually still a fair amount of security that you have through the use it like through the correct usage of cryptographic Primitives so for example like one thing that uh you know despite the fact that um the Dark Forest admin server stores and provides sort of as an optional service it's like Twitter to address mapping um we still like attach to all of those uh key value pairs a signature from the ethereum account that this is indeed their Twitter handle and a verified tweet that tweets out that signature so that you know linking can go both ways and we can't forge that like we can't convince you that this address is connected to this Twitter account if they haven't done that signature so there's still a cryptographic guarantee there I think the thing that um you know blockchains really provide is is data availability at the end of the day and that's you know sort of what we've realized over the last couple of years so again like you need to distinguish between all these different Notions of security there's like you know questions about like correctness and forgeability there's also questions around like data availability and censorship and these are all like different dimensions and so it's not just a one-dimensional trade-off curve either it's multi-dimensional that is interesting to think about like as New cryptographic Primitives emerge new on-chain gaming or autonomous World ideas also emerge in a similar way as new infrastructure emerges our new chain Primitives emerge we'll see new things that are able to happen so I'm curious like over the next five or ten years what are like certain new ideas or Primitives that you're excited to see happen and how might those change how autonomous worlds operate yeah I can start on this one so me and Justin did a little like lightning talk kind of thing in the hacker basement a couple of days ago where we speculated about um how some New Primitives might enable new mechanics uh I'm personally pretty interested in how like uh Primitives like fully homomorphic encryption or multi-party computation or witness encryption these things that are like you know even stronger cryptographic Primitives than what we have today that are still sort of at the academic level um but hopefully going to productionalize over time what that might unlock so to give an example um a lot of folks here might be familiar with this idea that ZK enables you to now put hidden States into games and this is a powerful primitive because previously you might not have been able to play to build like a card game where people's cards were private on chain but now it's DK you can um one thing that you still can't do though in terms of incomplete information games is you can't have games where there's interactions between mutually distrusting parties who are trying to compute jointly over like mutually private State okay so what does that mean like maybe you know I have an attack coming from like a secret unit on my side and I'm attacking you know Kevin who has like a secret Defender and we want to figure out what's the overall like net impact of this attack on Kevin's Health well we can't do that right now because I want to keep my attacking forces private Kevin wants to keep his like defending like special defense you know stats or power or whatever private so that's still something that's not possible with ZK but with MPC it might it might become possible I'm hyped about a million TPS um by dropping a bunch of stuff and cutting corners and like doing zoom zoom I think it's going to be really interesting one thing I wanted to add to the last question one 10 seconds is that even a centralized evm server is extremely interesting because the evm is a computer that is made for like Atomic composibility and also observability into the system itself and like even if you were to build World of Warcraft today on a centralized evm that would be like pretty [ __ ] sick um so this is where I like to go back to Kevin's Point like even if maybe we should say omnivm of evm instead of on-chain off chain but I mean this spectrum is going to be milked in so many directions because there's just a lot of stuff to do there I guess a real real quick last note is like I feel like we live in a world now where like erc20 tokens are obviously a very established primitive in blockchains and I feel like there's all sorts of surrounding infrastructure around them and I want to live in a world where like a blockchain itself is that same type of primitive so one thing I was thinking on the way over here is like just like how in uniswap there's like a token list and like that that defines like what are the list of like safe tokens that you want to trade like and you can have different levels of token lists that like coin gecko has a token list that has like maybe more risky tokens than the unit swap token list you can have like a chain list and it's like these are the chains that you're safe you feel safe interacting with and like maybe you can have like a more a more risky more or like a more risk tolerant chain list where like okay I'm cool going to a place where like data availability is off chain like that could be you know that could be something that you parameterize and I think like I'm excited for like there to be all the surrounding infrastructure that exists currently for erc20s that's primitive so like you know maybe the coin gecko maybe there's like a coin gecko for J chains that lists you know what's their security what's their current gas usage per second you know um I'm excited for for that future yeah can I actually pose a question here as well to the to the rest of the panelists because I feel like we've been throwing around a lot of terms but some of them have been um like imprecisely defined at least where this conversation has been going so uh we're talking about this world of like a lot of different chains but as people have noted chains means a lot of different things for example I think a thing that y'all are not meaning when you say this world with a bunch of different chains many of which have different security guarantees is like oh a world where we're like you know bridging between like Solana and avax and like you know the multi-chain future is one where like you know you take your soul and you go on to like EOS and then you like Bridge your nft to finance like that that's like not really like the vibe that I get here so can you distinguish between these two Notions of what multi-chain here means yeah I guess a quick note on here is like you should totally go if you have not watched Carl's talk or kelvin's talks on like the super chain or the op stack that'll go into way more detail um but I think the vision here is that you could have many chains that are all spun up using the same the same set of apis like the same set of modules so they they might use different modules they might use a different proof system or they might use a different data availability layer but they all use the same apis and if they're all built using the same shared language the same stack you can easily do things like have them share a sequencer set which would allow you to do things like if the sequencer set is honest that you can have Atomic composability between these chains so rather than living in this world where like you have many different chains that are designed in their own different monolithic way you can have all these different chains that are all designed in the same modular way and can all interoperate you know in in ways where like as an end user maybe I don't know what chain I'm on all the time maybe I just know that I'm on chains that are in the list of chains that I've like agreed you know I know that all the chains with have data availability on ethereum or something and like as an end user it feels like a single chain that I'm interacting with but under the hood there's actually many different chains and you might actually just like if you're running a node you're just running a node for one of those chains you know yeah I guess the main difference between data and something like even like Cosmos that has like IBC and instant finality is that Cosmos has different validator sets depending on the different chain so you can have like lower security zones higher security zones I think the thing that is really interesting is like even if we've Roll-Ups with like different data availability or different different improved layers as long as the old kind of like ultimately settle down in your minute you have this amazing thing where like if if something reorgs everything or yours at least like if the layer one reworks everything reorgs and you ultimately use ethereum and as like a global clock and that I think is going to unlock way more than just like this super janky thing with right now or yeah we can move money across but the bridge gets under collaterized and stuff like that like that is going to be needed if you want to send Rich messages across um so yeah roll ups for the win all right I think we're running out of time I'm gonna I'm gonna throw one more question out there um so it's really early it's 20 22. and I want to look forward far into the future into the world where autonomous worlds are just a part of our daily life and everybody's interacting on autonomous worlds and I guess what is the the ultimate vision and the ultimate promise that autonomous worlds can bring to people um it's a scary question I don't want to go first sure um so personally the way I think about it also when I think about like the metabus is not that stuff that's currently happening in the real world would move there but rather that it's like just a very interesting thing to experience just like we like we experience regular games right now or like movies or other things like other kinds of Worlds that we currently experience that's autonomous worlds on steroids basically um so that's the way I think about it so in in what was the question like what's the promise that autonomous World brings to people like what what value will it create for all of us I think it's just gonna be more fun yeah no no but it's true I actually think that playfulness is super important here like Society is inherently playful and I think that's something like as we go towards like our algorithmic dopamine future right now where like things are becoming more and more boring and like scary I think that bringing some like autonomous chaos to the internet is going to be quite interesting and I think I think that's crazy with crypto is that because we have this much dollars at Stakes it automatically creates like crazy emergent properties like meth would not exist if like the tvlo theorem was like a thousand dollars like nobody would care um and so I think that if we go towards playfulness and emergence and just interesting new affordances on the internet like you shouldn't put your social life on the internet you should like unlock things you didn't have before right um people play Eve online because they can control like Galactic corporations not because they want to like I don't know be a mailman so um I mean that there are games where you can be a mailman to be fair so uh but yeah new affordance is a thing I'm personally excited about like just accelerating the the amount of like talent that is building on the evm like so many people that I know got started programming by like you know playing Minecraft and trying to build plugins or like trying to hack whatever game or build Bots whatever game they're building and I feel like all if all that is being done on the evm like you're just gonna have so many like young so much young talent that like they want to win this game so badly that they're gonna like become the best solidity programmer in the world and like build some crazy indexing service and like run their own node and like you know spin up infrastructure that like companies like Alchemy already have but like they're just gonna do it in their basement because like they want to be the most competitive player I feel like that's going to be super sick don't underestimate the kids you want to bring the kids to your technology basically yeah maybe um my answer to this is gonna be super like frou-frou like I'm gonna Zoom way out I'm gonna ask here like well you know what is the purpose of life all right um and I say this kind of sardonically uh but really what I want to get at here is like there's all sorts of games that we play in real life that we take very very seriously um that like you know for example like global global Capital markets are a game you know like going to a university to get a degree is like playing a game uh and in all of these cases like you know somehow I think that there's this bias towards like calling certain kinds of constructed games real and other kinds of constructed games like fake or something and like one argument that people try to make is that like oh you know like in the real category of things like participating in like you know Global Capital markets or like uh you know the academic system well you need to do that to like you know survive it eventually boils down to like food or like you know owning property or like having a house over your head or having more like material possessions but I mean if you really look at it like okay first of all there's a lot of games that we play that are quite circular you know everybody's like probably had the experience of being in some like weird like social bubble where for some reason a certain kind of action uh that you go through the motions of is like encouraged or discouraged for reasons that aren't actually grounded the second thing is like you know even for the games where you're gonna claim uh they have grounding and ultimately like survival or something there's a lot of extra fluff around those things like you actually don't need that much to continue like existing as a human being so like a lot of the interesting like I think you know a lot of the uh like what it means to be a human and participate in society is basically to like be an agent in like increasingly complex games and some of these games live in the physical world increasingly we're finding like a lot of these games live in the digital world and actually are quite interesting whether those are games like Eve online or whether those are games like running B2B SAS companies that you know like provide infrastructure like create value for like other B2B SAS companies um and I think that like you know this is kind of like maybe this all sounds like kind of nihilistic but like you know I think that there's a very optimistic Viewpoint around uh what this digital future holds because with these increasingly composable and interoperable uh like substrates for like all this sort of emergent complexity we're going to be able to keep finding new and more interesting games to play with each other um and and to me that's what's exciting about autonomous worlds and even though these things are just like tiny little seeds right now um who knows like we might find ourselves taking seriously just as much as our like online social and financial interactions as we do our IRL one I mean like this crowd is like really great for that argument because everybody is here because you play one of the weirdest game ever like most of you are paid in like fake money or like fake money that could turn into like fake dollars and then like it's it's pretty insane that an entire industry spun around like again ethereum in it as like the most interesting MMO right now and I think that like yeah nobody better than you folks to get that I think all right thank you everybody for joining and thanks to God sheep Kevin alvarius and Justin for having a great panel and thanks to ayush for being a great co-moderator as well um I think we're going to take a break now actually I don't think we have time to take a break I think we're jumping right into some really interesting lightning talks so stay tuned we will take a oh sorry guys we will take a mini break in the sense that we have to get our lightning talk Folks up here and get some stuff on screen uh but let's just have another round of applause for everybody on stage awesome wide-ranging talk uh I don't know if that's what you guys expected when you were coming to a autonomous worlds panel but uh it's certainly delivered thank you guys can I grab everyone who's doing a lightning talk to to come up to the stage and then we'll kind of get you guys sorted and uh probably about three or four minutes everybody and then and then we'll start with the next piece of programming and then they published this is also like really big to read but basically they output is Saint called a state route which kind of you could think about this it's like it gets rid of all the intermediate state of the game because at the end of the game we don't really care about individual player stats and stuff we just care about like maybe the prizes so one player has like 100 die 20 die at cat um and anybody can come along to the smart contract and say like okay here's what I think the final state is and then the validity proof will say yes like I approve um and yeah and then that gets set so it's kind of like anybody can like permissionlessly finalize this game but it's all validated by the zpo proof um and then the reason that the state route is like a root it's like a Merkel route is so that at the end of the game like users can come along and withdraw a prize or upgrade their cart or whatever like that but because it's just a single commitment on chain it's all like very gas efficient and yeah this is uh what the game might look like so you need to deploy the contract players take various actions the game gets Frozen at a certain time and then somebody comes along and settles up the game and then everyone can like watch other tokens and I don't know quite prove that they've won the game or something and yeah and the idea here is that everybody's just like simulating the game locally but we use the blockchain as like a source of Truth for actions um and I think this might start becoming clear like this whole like hallucination clickbait title um yeah hallucinations what do I mean by that um basically like because we're using a we're not like validating player actions during the game that data just like doesn't mean anything on the blockchain it doesn't actually like update the blockchain state immediately but because we know the game rules we like understand what that information means um Google brains um but so does the proof the proof also encodes and enforces these rows for us um so like someone comes along and tries to submit a different action the code will kind of interpret that action within the rules of the game and then say like yes or no like is that valid so like the player on the right is like trying to do something that isn't a valid move within the game and then the proof is like retroactively saying no you can't do that um you cannot blow up the whole world but you could write a proof that like makes that about action if you want to um yeah so as I say the validity proof is like retroactively enforcing the rules enforcing the history of our game and basically making our shared hallucination real um and I think like thinking about games in this way is super efficient because we just all just like believe the same rules and we all just play the game without disagree like without having to check each other and then the proof will just like sort things out after um and actually like what do you think about it this system is actually technically as you can roll up um it's not like the zika role that they're used to it's kind of like a fully decentralized roll-up without a sequencer no offense if like the optimism people are still here I think their system is probably better um yeah players are just committing action start little chain uh yeah I don't do I put much time left okay I'll go through this but very quickly so basically there's this problem of like World forwarding games um so basically like you want to do things like you want to have like things move over time like water and maybe this would be like open Craft 2.0 um like crops growing over time realistic physics uh AI which is actually same images the living castles talk um yeah but the problem is it turns out it's actually super hard to do this in the evm you have like different approaches like eager and lazy World forwarding but they're all basically working around the same problem which is that the evm is like fundamentally an interrupt-based system things only happen on the blockchain when players submit actions to update a state but if you think about the real world or you think about traditional games they okay and they all like have this idea of a tick and the EPM just does not tick um and it turns out that the gamers want ticks it's actually really helpful for games if they just like progress naturally and you have NPCs and AI that just evolve over the course of the game and basically the evm almost did tick to decide even an alarm up code but it turns out there's like fundamental problems with this that make it really difficult to actually implement this on a blockchain um and like if we did have that it'd be really cool um but the problem is is that like you only have so much processing on a blockchain so it's like who who gets to tick basically um and the only thing you can do is just build a chain and like enshrine the most important updates you want to happen every block like directly into the protocol and actually a Xerox Hank and Laramie did a really cool experiment with this where they modified Geth to like take over their little Game of Life uh game like every block I think um and yeah like somebody needs to do this like there's so much fun you can help with like building just Roll-Ups that aren't evm compatible and do their own thing um and with our rollup it'd be pretty simple you would basically just rather than like looping over every event um but they've literate proof would instead do is like look over every block and then if there's certain actions in that block it will apply them but it will also do different things like growing crops updating NPCs projectiles uh and yeah so basically I built like a first prototype of this kind of rollup system it actually has nothing to do with games it just does payments but I've never built a world before so it was kind of nice to start simple uh that's the link for it there and there is also a client that will sync you with the rollup too um and yeah like next steps for me is like I really want to keep thinking about this probably make a game that actually does this and kind of like build these ideas out and formalize them into something that's like more of a protocol more of a standard and do this pretentious thing of like making it easy for you guys to spin up ZK Roll-Ups they're evanescent and only lasts for a certain amount of time when you want to simulate really complicated High compute games that are like maybe more like web tokens you could say to employ that and yeah um let's all hallucinate digital worlds together [Applause] one more round of applause uh for Fraser [Applause] when all of these folks uh signed up to uh get some accommodations and work on games in London we didn't tell them they had to also present at Devcon so thanks for putting all this stuff together and uh we'll just let Flynn get his AV set up and let me know when you're ready and we'll kick it off howdy all right so this is a talk called Thomas World Discovery and it's by it's by me so if I can go through all right so a little bit about me uh I'm Flynn I'm 23 and I'm from Australia over there uh I only properly got into the kind of blockchain space about halfway through last year so that means I'm still a cryptographic baby uh since the start of the year I was working at a cryptocurrency Exchange in Australia called coinja uh no longer and since about mid-september I've been participating in the autonomous worlds residency in London and so far it's been absolutely incredible I want to say a huge thank you to the loudest guys and the Xerox bar Guys Without You guys I wouldn't I wouldn't be here today uh at The Residency so far I've been working on a prototype for a new game that does some cool things with ZK mechanics and uh information asymmetry but it's not ready to show off yet so I won't be talking about that today uh so what will I be talking about well Thomas World Discovery um so for a while I've been pretty interested in the prospects of a discoverable world within a blockchain context uh so what do I mean by a discoverable world yes what do I mean uh well players did not initially know the entire state of the world they have to perform actions to incrementally gain knowledge of that world over time um to know what's out there you have to go out and see it in the traditional server authoritarian authoritative model or the god server model I'll be calling it um you simply store the whole map on the server as well as the player's positions and um when a player moves to a new section of the map you simply send in the data for it the player cannot see the entire map they can only see the pieces that the server sends them as they move through the world uh so what do I want I want to achieve this property of discoverability without the need for a persistent centralized information holder I think the idea of going out and exploring a virtual world where not only you don't know what's out there but nobody knows what's out there is pretty compelling I think that's a true digital Frontier uh so Dark Forest Dark Forest already does this [Music] um in order to see the contents of a specific chunk of the map you have to mine it using hash power um pretty cool uh I have much respect for the dark forest team and what they've done there are two aspects that I contend with one map Discovery Is Random Access uh meaning that you can choose which parts of the map that you want to mine entirely independently of the positions of the planets that you actually control and two the rate of discovery is based on something entirely external to the game world uh your hash power sorry what I want is a system that is locality dependent you can only discover the world in your immediate surroundings um and the rate at which you can discover the world let's say it's the right the the rate is bounded by or determined by uh the rules of the game word entirely and not influenced by anything external uh so how do we go about achieving that well let's try it attempt number one let's say we have a tail-based world where the contents of each tile is procedurally generated using power noise with multiple levels of noise for better generation variety however yeah so we've got that however instead of the seed being fed to the pollen noise algorithm for a specific tile between being deterministic the seed is taken from a random Oracle and is only determined when a player reaches that tile for the very first time and so it's like players are venturing out into a constantly full venturing out forth and so we're constantly shifting worlds it only solidifies when they get there um so this approach preserves locality of Discovery as the players can only discover titles that they are physically moving on to um and it also ensures that the rate of discovery is not dependent on anything external to the game world as the rate at which you can move through the world is determined by the rules of the world a natural extension to this is that rather than simply discovering the tile that you're moving on to you would discover all tiles are kind of radius around your current position and that way you get kind of like a circle of vision and you trace out a path over time which is important because you want to know if the next title you're about to move on to is going to be Lava or land you can't do that with just a single child at a time um the this random seed uh for each tile would then be saved onto a mapping from positions to seeds you can see that there in the code um such that subsequent players reaching a tile would find that same seed um which ensures that yeah that same seed rather than getting a new seed from the Oracle this ensures that world permanence is preserved um although I do think there is something interesting in intentionally breaking well permanence you know kind of Shifting Sands crumbling castles um oops too far so uh preserving preserving World permanence in this system also means that all discovery is public because the seeds are published on chain a discovery for one player as a discovery for all players um all right so this is pretty cool but what I really want is private Discovery I want to be able to go on an adventure into Uncharted Territory discover a dungeon uh that no one else has seen before now only I know about its existence then I could go and tell my friends about it and we could go loot it together or I could sell this information to someone else if I could publish it for the world to see regardless at the point of discovery that information has value I think that's cool um is this even possible though is it possible to privately discover information about a world that's publicly hosted on a blockchain is that published is that is that possible enter witness encryption uh so I first heard about witness encryption from a video that Justin Drake did on combating muv specifically in relation to encrypted mentals uh so how does witness encryption even work well I'll quote JD directly uh with witness encryption you can encrypt message such that in order to decrypt the message you need to provide a witness proving that some statement is true and then this could uh sorry and this could be any statement in other words you can encrypt the message if you give it some snark basically a short proof that some statement is valid um underneath that right there is the that's the title of the YouTube video I highly recommend checking out it's great um so this is literal Witchcraft and sounds too good to be true my general understanding is that currently uh practical implementations of General witness encryption uh far from being feasible but my hope is that um over time the same thing happened to ZK technology will happen to witness encryption over the next couple years it'll become dramatically more feasible um all right so how does this relate to well Discovery Well let's say that we have a world that consists of a set of interconnected rooms uh dungeon of sorts uh a world architect privately creates the set of rooms and their contents publishes the data describing the set of rooms and how they're connected um and also for each room publishes a locked tone they then cease to exist that was their final contribution to humanity so what is this locked term well it's the data that describes the contents of the associated room or acquiring a proof to decrypt its contents so it's witness encrypted with each term requiring a different proof this proof verifies that one there exists a valid path that actually leads to the room and two and this is where it gets a bit wacky that the player actually committed to taking that path on Shane otherwise they'd be able to generate a proof uh going to every single room figure out which rooms hold the best contents and then only commit to taking that particular path between those particular rooms on chain um so that's where you need the actual proof of on-chain commitment as well uh in this example uh in order to find out what's inside room C you could have to show that there is an actual valid path from A to B to C and that you have committed to taking that path on chain so how would you achieve uh poor C or proof of on-chain commitment um well you would start with proof of consensus where you verify the attestations of the current value set for a particular block hash which is something that I'm pretty sure succinct Labs is working on currently and then using that block hash would use proof of storage slot which is a term that I originally heard from Fraser uh which is essentially just a medical proof that the commitment to the path exists on chain based on that block hash um I'd like to think that there's some simpler Construction you could build on top of the consensus logic that's easy to verify it still gives you the same guarantees as like full proof of consensus um but who knows so what are some drawbacks to this system well cool sorry about that um well it requires the initial World architect the Divine Creator to bring the world into existence it's better than the god server model because they're no longer required after that initial publish and so the world can continue without them but they don't if they don't cease to exist then they can exert undue influence uh based on the fact that they know the contents of all the rooms kind of like the toxic waste that's created during a trusted setup they're just less deadly in this case also after the initial creation of the world um it essentially remains static and finite and so there is a long-term uh there's less long-term dynamism in the discovery as well as players will eventually uh just because players will eventually discover the whole thing you could have the world architect um continually add new pieces to the world but then you're essentially back to the gods ever model because they have to continually exist um so can we do better synthesis we take the incremental tile Discovery system from the first attempt and we inject witness encryption well what does that look like you still fetch the tow generation Siege from the random Oracle when discovering a new tile but now instead of publishing that c directly you publish a witness encryption of the seed or acquiring a proof of valid path and proof of one chain commitment in order for it to be decrypted boom you've both achieved private Discovery and preserved well permanence without the need for persistent centralized information holder or pre-definition of the world however although Word World Discovery is private your position would still be public since you have to update the position to witness encrypted tile seed mapping that you see at the top there oh also did I forget to mention uh whoops wait one too far yeah I forgot to mention uh that when publishing the witness encrypted dial seed uh you would also have to publish a ZK proof um showing that you actually did the witness encryption correctly uh yeah so this is pretty clearly worked out beyond belief uh and it's very far from being practical or even remotely practical but maybe one day it will be uh that would be that would be pretty cool all right so we're already at this level of ludicrousness uh can we can we go further of course we can I'm a morphing I uh homomorphically encrypted World Generation system running on chain uh where you feed it your encrypted position and gives you back the encrypted World data for that position uh as well as updating its internal state and when I say this uh when I say on chain what I really mean is probably across a series of recursive ZK proofs in order to minimize Unchained compute cost but maybe we'll eventually get to that point where on all on-chain computation is done that way so the distinction will actually break down um while you're at it oh yeah I should do this yeah cool that's that's what uh while you're at it you may as well put the entirety of the world logic into this homomorphic system meaning that the rules of how the players interact with the world and each other then um yeah so that's the rules that you put into there and then funnily enough that means that we're effectively back at the god server model but now it's running entirely on chain autonomously and we can have confidence in its robustness um so that's that part with the system we can now have private discovery of the world while maintaining privacy of your position theoretically you should also be able to do something that seems natively difficult to achieve when positions are kept private player Discovery how do two players know that they've run into each other when their positions are private when they don't know each other's positions and private play Discovery the ability for player a to discover player B without player B discovering player a and while you're at it uh homomorphically encrypts my Consciousness and put me on chain that way I can live forever uh that's the end of the talk thank you very much hey there I am leithy from Asphodel where one of the teams working at the autonomous worlds residency we are working on I guess it would be best described as an autonomous on-chain MMO but I'm not going to be talking about that today what I want to talk about and touch on here is I guess what I think is the I guess what I think of is the most key emerging aspect of these systems which is the economies now when you create an autonomous world you create us and almost always there will be a system of resource production and consumption so to use opcraft as an example You Can Mine Blocks you can place blogs you can craft blocks you can do a few other things like staking uh diamonds in order to claim chunks in the world and that's a very specific set of predefined affordances so that autonomous economy is the emergent system that evolves from that set of affordances that are placed in the game so what this means is when we design an autonomous World we're designing the fundamentals of an economy of a human social system that can potentially go far beyond the game we build and as Builders we Define those fundamentals we Define how each of those points works so we can Define the rules by which players are bound how do they move how do they harvest resources we can Define the degree to which the world rewards cooperation versus antagonism so do you need to work together can you mug people is there an in-game five dollar wrench attack where you can take someone else's resources and how do those resources work where are they available what's their supply how are they collected and when you put all these things together you get the seeds of a more complex social system so we Define the rules but not the game users can build on top of these things they can play on top of these things and the really unique aspect about autonomous worlds that I think makes these emerging social aspects far more powerful than a traditional computer game is that players and Community can build on top of those rules so they can literally add small contracts so again using opcraft as an example there's nothing stopping devs building defy on top of Minecraft in this system there's nothing stopping them creating nft marketplaces that allow people to resell blocks there's nothing stopping them deploying new smart contracts that expand the game functionality that might add new creatures new things you can do there's nothing stopping them creating in-game dials and much more I'm sure there'll be visualization Services explorers knowledge Services it's pretty much impossible to predict what people will build and when we put all this together we get a complex economic system predefined parameters rules of interaction and human beings as independent agents within it and we do have a fairly big one of those in this world it's called capitalism and this means when we're designing autonomous worlds we have a pretty much unprecedented opportunity to design economies so fine-tune rules of human interaction to fine-tune The Primitives and then see what evolves from them and the potential for that evolution goes beyond anything we've seen in gaming or Virtual Worlds before not only do players socialize and play in the ways that they wish they can expand the technology they could potentially build extra games on top of the original game that might usage resources or interact with it in one way or another and so we find ourselves in a situation where rather uniquely we can define a human economy and the fundamentals of it in a way that hasn't really been possible in most systems some D5 protocols may work in this manner but games worlds it hasn't really been possible in this manner before Eve online is a pretty good example of probably the closest thing in a traditional video game but it's not decentralized it's not autonomous and it's still controlled by certain centralized aspects that CCP specifically and so now we find ourselves we can build real world economic simulations we can forget about everything and we can build Crazy creative stuff that's pretty much unprecedented and over the next few years I think we're going to see potentially tens or even hundreds of different models evolving on top of these autonomous worlds so what kind of things what might these look like what might we do so we can go simulationist we can try within autonomous world to mimic real world economic mechanisms we can say the resources are scarce trade is constrained in certain ways and we can attempt to really replicate the real world now some genres this works naturally RPGs management games strategy games in all of these examples simulationist economies can make sense but they also have um potential uses Beyond fun so consider in 10 years time when the autonomous World space is more mature economists could use these sort of mechanisms to essentially prototype and research new macroeconomic models this is something that's currently pretty much impossible you can't a B test tax rates but with sufficiently Advanced autonomous worlds it starts to become impossible to do this it starts to become possible to do those kind of things starts to become possible to do social experiments academic experiments and in general to simulate real-life economies in a particularly detailed way and we can also go in the exact opposite direction so we can go experimental we can do things a good if anyone's heard of Reddit r slash place which is a kind of collaborative process of placing pixels on a screen together this in a way is almost like a kind of proto-autonomous world independent users interact with the world they build things together they have a very specific affordance which is they can place one pixel every 15 minutes and so this world evolves together as a collaborative artistic piece placed on Reddit they do this I think every year or so now and it becomes a huge thing people compete thousands and thousands of people come and place pixels together there's no reason you couldn't do this kind of thing on chain using autonomous World check you could do it in 3D too you could do a Minecraft version wearing a finite number of blocks are available everyone builds together and they create something new and again that then that's not really what we think of as traditional economy but it is defined by economic rules and we could also we can combine this with the simulationism we can do simulation with a few elements off again that can be an economic experiment or it can be it can be for entertainment it can be for art and of course since this is crypto I feel obliged to add we can do competitive autonomous economies so we can create antagonistic PVP systems where in-game resources have established liquidity with external markets and what I mean here really is creating something that's a kind of viciously competitive PVP space so in some way you bring in funds from on-chain and you essentially bet them on playing the game you put money in so you can steal a lot of money by the people's money they put money in so they can steal your money this becomes a kind of hyper aggressive uh competitive game now this the interesting thing about this the model that most closely resembles this type of autonomous world is actually a type of D5 product called Perpetual futures so I'm not going to try and explain this right now perhaps are infamously difficult to grasp but the point is with perps there's no underlying asset people trade based on market prices entirely based on collateral on each side so if the price goes up some people pay some other people the price goes down some people pay some other people it's a game it's a collateralized game it's not actually a financial product at all and many people don't realize this but perps which are essentially a completely PVP economic simulation they're responsible for some disgusting proportion of exchange volume people love them like massive massive amounts of money in crypto trading essentially go through what is a collateralized paper trading game it is a video game and so we can do the same kind of thing here and we can make it more fun we can make it competitive we can make it aggressively PVP we can add these kind of elements to a shooter or an RPG or an MMO and again you might combine this with the simulationist aspects so you get a simulationist game in this way is also more viciously competitive this is I guess a trap for homoeconomicus is kind of like the perfect simulation for someone's more competitive we can also as mentioned go experimental go more homo ludens and do things in a more creative fun and exciting and of course we can merge the two of them there are hundreds of permutations of how you might use these different models together to create autonomous world economies so this is pretty much a completely untouched field no one has really worked with this before only a handful of MMOs Eve online and a few others have touched on this but they're not autonomous they're not decentralized and they're not composable so we take all the economic Firepower of those games and we vastly magnify it and expect to see interesting developments here over the next few years I think just to close off fundamentally pretty much all autonomous worlds are going to revolve economies because by definition an economy is just a social system of human interaction so really the point of my talk here is that every autonomous world can also be seen as an autonomous economy to some degree I suppose you could really try to Stamp Out the economic aspects if you wanted but in almost every case these kind of economic developments are going to be fundamental to every autonomous world and I'm sure plenty of you in the audience I hope you've got some coax wearing in your brains now but what could be done with this because the potential in my opinion is huge and yeah I'll close off that yes so uh I will jump right into things a quick intro for who I am and my co-founder who actually just flew out this morning my name is Omar I don't have a super cool like Xerox name I do have a sweet tooth so that's why it's marzipan um some of you might have read uh my blog post about Dark Forest the Genesis of sort of the on-chain space um it's on mirror please buy it it's my only source of Revenue right now um but uh me and my co-founder basically spent the past three months uh building a game called Magic galacticots uh I'll talk a little bit about the game uh you can actually play a version of it today it's launched on optimism girly uh you can't play it on mobile though and um it's uh essentially inspired by other on-chain or rather not on chain other Auto Battlers so games like team fight tactics uh Hearthstone Battlegrounds um except it is running fully on chain so one of the other cool things is that you know since we're just a two-person team we did things like we used Dolly too to generate all the card art that's why uh it's about cats in space dolly two is very good at that sort of abstract thing so use the tools that exist uh don't don't fight them uh yeah inspired by games like Battlegrounds on the left or if you've ever played the indie game inscription excellent game very simple card game highly recommend it uh super quick just overview of like how or rather what we learned uh basically like building a game is hard uh prototyping is really important and specifically if you're going to build on chain uh you really have to understand the constraints of well like the on-chain back end as a as a design pattern so we'll be diving a little bit into that uh so basically a rough overview of how we built our game so it took place over the course of the summer about three-ish months um we had a playable version after about a month we basically forked the Dark Forest code base we tossed out almost all of their contracts and almost all the game client but we kept a lot of their tooling so for example we built on top of the diamond standard and so it was really useful to sort of just have a an example of what that looked like um go ahead and yeah just a super quick overview of the code just to like ground what this actually looks like from a developer experience perspective most of the time that we spent was spent on the front end not the solidity back end uh again we used the Dark Forest code base so we had some really nice tooling made by people like Blaine bubblets uh to make building on top of the diamond standard super easy uh hard hat was amazing uh just coming from the web 2 world which is sort of like my previous job um like the development experience of hard hat kind of makes the like ethereum ecosystem just feel like you're building on a serverless back end which is yeah nice a super quick overview of the actual game design if you're not familiar with games like Battlegrounds basically uh cards can be played into slots uh players take turns consecutively and once all players have ended their turn the battle takes place uh and then it's the next turn so players for example don't select which card attacks which card like in vanilla Hearthstone uh that is sort of just uh dictated by the the rules of the Auto Battle engine cool uh okay so what was hard to actually build um again you you might have gotten a hint of this based on the lines of code or how much time we spent uh on the front end but the front end is by far the hardest part which actually doesn't really have anything to do with the on-chain aspect um just building multiplayer games in general is hard uh most uh most game devs will probably Echo this if you talk to them and they've built like any sort of multiplayer game distributed systems are hard games have the additional constraint of trying to bundle client State and back in state so if you take a really naive approach like we did where we just pull the back end uh you start running into issues where a player will try to queue up actions and then the back and pull will overwrite it so it's not as simple as you know just pull the back end bro it's it's actually a little bit more nuanced than that um okay and so building this stuff was hard uh but there's a large body of just multiplayer Game Dev Vlogs that you can pull from uh the actual hardest parts were just designing a game which isn't that surprising because that's also the hardest part of building a game in general uh so the simplest thing that I would just Echo uh throughout this talk is just try to design the simplest gameplay loop as possible so we took a lot of inspiration from the games that I mentioned but we also just basically ripped off a lot of their gameplay patterns and that was a really bad idea because most of the players that we talked to even if they liked games in that genre they hadn't played every single game in that genre and so they didn't know what things like sacrifice meant because they hadn't all played Magic the Gathering or inscription for example uh so we ended up spending a lot of time removing elements of the game from our first play test rather than adding features um and then of course you know blockchains come with latency limitations and I'll talk a little bit about those but uh another big thing was just you know make it super simple for players to actually interact with the game so since the game is on chain every single action is a transaction we ended up making all actions batched client-side introduced multiplayer bugs but players were fine with the bugs if it meant they didn't have to click approve on metamask every single time so this is just an interlude maybe like hammering in that point of really focusing in on a simple gameplay Loop there's this game that I love called dicey dungeons it was released in 2019 but it actually emerged from like just like a seven day game Jam so on the left hand side that's the game Jam image and on the right hand side that's like the final game image so the core of the game was you know prototyped in the span of a week and then of course it was fleshed out over the next year but uh the guy who did this Terry Kavanaugh he's like an indie game developer he has a great Game Dev blog I recommend it cool so understanding on-chain constraints um basically when we launched our first game we we didn't know what chain to launch it on it was built on the evm but there's a lot of evm chains so we actually ended up launching on five chains and we had two design goals one we didn't want it to be more than five cents a day to play that was basically just it wasn't pulled out of thin air that was actually benchmarked from the state of normal multiplayer games if you look at a game like team fight tactics on mobile they only make about 40 cents per average uh user per day so you can't spend more than that because even if you're one of the world's most successful games you just can't expect players to pay more uh pay more than that so we ended up benchmarking on a bunch of chains the tldr is there was no Goldilocks chain uh so we ended up launching on a test net and that just means that playing the game is free we also have a drip so that you don't have to go through like testnet weird like faucet stuff um but it also has like reasonable latency for at least like a an auto battler which is mostly pattern-based and then the last thing that was hard to design is multiplayer even though you do get multiplayer for free on chain uh it turns out that matchmaking and things like that are hard I think actually the DF Dow team echoed that in one of their talks in the hackerspace earlier in the conference so we ended up building a PVE mode because it was just way easier for players to play test at their own pace and also for us um cool so yeah just super simple takeaways uh start as simple as you can play test as early as you can um definitely use a principal design uh like architecture for building your game that'll just make the game client really easy to build we basically just had a spaghetti game game client uh that's why they're still multiplayer big bugs so shout out to things like mud that are standardizing that approach and then they have like super nice like phaser plugins um yeah definitely like put a little bit of thought into picking your chain but honestly like you can just ship it like the benchmarking was basically done over the span of an hour like it's not hard once you have the game built that's the beauty of like the evm being interoperable you just write like a hard hat script that deploys to a chain ID um and then lastly yeah definitely consider on-chain limitations like tested in in hard hat but at the end of the day the the simplest thing that you can do is just minimize on-chain actions um even if the game is fully Unchained that doesn't mean that every single thing has to be an independent transaction uh and that's it [Applause] we live in a world of essentially this is the web 2 world it's a beautiful web 2 world where everything is closed Source you can't really have access to building anything everything is designed to for consumers people who just want to sit back eat their popcorn and consume information and this is okay people get by on it but I'm more interested in pushing forward into the what we can do when we give people power a new foe appeared in 2007 called the blockchain and I think that the blockchain could enable one of many interesting properties of games that I call Dynamic Canon and I describe it as a fluid ever-changing Universal rule set in a game decided by the players of that game which has enforced computationally so before I continue I just want to make it clear that content is not the same as Canon necessarily I The View content as the things that appear within a game so user generated content is me creating LOL or valorem in this case creating lull in opcraft but creating new canon in a game is adding mental health into Minecraft and so if you don't have any friends you start to get really sad and it just creates some new emergent properties I think that the blockchain is the best medium for this Dynamic Canon to occur and let's look at why so I think that there's two blockers at the moment to creating Dynamic Canon the first one is universality which is the reach that a rule chains will create so if I create a new rule how many people and how fast will that spread throughout the entire community and the other one is access so can I go in and make these changes on the ground level to the rule set video games are really good for universality a game developer can enact a new rule patch it into the game require everyone to download that patch before they continue and there you go however obviously an MMO people don't really have access to it right I can't go into the server and make some changes to the rules and do something cool with myself because it's all hidden on the other side we have analog games like board games and video games or not video games board games and sports and other real world games where it's really easy for me to just tweak a dungeon Dungeons and Dragons rule but it's impossible for me or it's really hard for me to share that with the entire game Community really quickly and cheaply I guess the internet is helping with that but it's still a drawback and in the middle the blockchain is that going to help us I think it might and this is because on-chain games before both universality and access when I make an update to a blockchain game that update immediately and instantly becomes accessible for everybody who has access to it a good example of this was in the last Dark Forest round an unnamed developer left a huge bug in the code and it created a massive Point imbalance fortunately the uh the dev team could pretty easily go in redeploy and upgrade and fix that tweak also blockchains allow for Access since the game exists on a public substrate the public blockchain and anybody can write a smart contract to exist alongside that rule set now anybody can have access to making and creating new rules in on-chain games another thing that really excites me is that player consumers become player Builders so because the back-end smart contracts are exposed we allow for radical client customizations since we've untethered that client to the back end we've allowed for Unstoppable botting or transaction automation automation and we've allowed for alternative modes of play so two people can interact with the exact same world in different ways and that's what we call conviviality for these reasons on-chain gamers are more and more starting to look like on chain Builders which is not really something you see in web 2 games so now let's dive into how I could make a new rule in a video game and make that rule canonical for everybody in the entire ecosystem it kind of works via natural selection let's say I'm playing opcraft which is a on-chain game and I hate the fact that you have to I don't know you can only craft four different things at the moment and I really want to add some cool new crafting recipes to make the game better so I can easily create it and deploy it to something like the mud ecosystem which you'll find out why very shortly anybody can play the game with those new rules and if everyone loves it then we can agree by consensus to incorporate it into the official canonical rule set but if everyone hates it then no one will use it and it will naturally get filtered out of the um of the universe so over time we get closer and closer to this new rule set that becomes enshrined by the players of the game themselves which is an interesting property that has in the past been very difficult due to these issues of universality and access so now we could move to a place where playing games we are playing games that are autonomous there's no single person who can put their name to making that game there's no single owner and there's no single designer however we also need to keep design in mind as we do this because just building on top of a blockchain isn't enough first of all Builders have to embrace permissionlessness it's still possible to create wild garden games by using things like non-upgradeability and restricting access um and so try to keep code simple and ungated and easy to build on top of to allow these emergent factors to take place make rule changes accessible scratch is the classic example of making code accessible to people the uh the moving castles guys touched on a couple of other games that do this really well or you could use this thing called Mud which you'll find about shortly make new rules discoverable this is also a difficult challenge but one that's pretty necessary you have to figure out a way to let people experiment with new rules that people have created and share their findings so that everyone can narrow down to something that's really compelling and really fun and finally you have to let people disagree and fight people don't like a new rule half the people don't like a new rule half that people like a rule someone's gotta win Something's Gotta happen it's just like the evm right um people have to be able to resolve these conflicts their consensus has to be reached and if it doesn't you got to allow people to Fork off and make their own games or else it's not really a truly autonomous world slash game and so me and my friends Tony and David um part of DF Dao we're looking to explore this in our next project we're trying to create a substrate that allows players to create their own games and their own rules as player Builders and we're calling it for now project Ugg but that name is only temporary thank you [Applause] okay uh last but not least and and thank you guys for for hanging out and uh and staying later than we have previously anticipated um and on that note I'm going to get off the stage really quickly so if we get a round of applause for all various who's going to do mud an engine for on-chain games cool all right my talk is split into two parts the first part is going to be modern Theory and then in the second part I'm gonna go over a little case study of something we've built with much which is opcraft and show you how we build it basically so to get started what is Mutt mud is an engine for autonomous walls or an engine for Unchained games that we have been developing at lattice and as I mentioned earlier during the panel we started out building a specific game and then ran into all these very general problems um that didn't have anything to do with the game design or the the actual game that we wanted to implement but rather were just caused by the fact that there was no engine that we could build upon and so at some point we decided to build this key missing piece of architecture ourselves and that became much and the goal with mud is to basically solve all the hard problems of building on-chain games so what are the hard problems of building onshine games they basically fall into three different categories the first one is how to keep your contract and client state in sync without having to manually like call the RPC node all the time pulling content and stuff like that then the second one is how to architecture your game in a way that makes adding content very easy without having to refactor the entire game and the entire networking stack and then the last part is if you care about impact of your game Beyond just your individual game then how to make your game interoperable with other things that are built on chain and before I go into explaining how much solves all of these prob these problems let me quickly go over how people have approached these challenges before normally or the most common approach is per entity type on the contract you create one type of struct that then stores the data for that type of entity and then of course on the client you have to duplicate that struct in an interface or something so that you can represent the state on the client as well and then you implement custom getter functions for each of your custom structs to load the state initially and then you implement your game logic modifying these custom structs and every time you modify one of these custom structs you have to emit a custom event and then that custom event has to be handled on the client to update the state on the client and that already sounds pretty pretty annoying obviously but it gets even more annoying when you want to add new content because then you have to add new structs and have to add you have to modify your entire network stack to incorporate this new struct the events the getter functions the handling of the events Etc and then on the interoperability side basically all we have are existing standards like erc20 721 Etc and that were not made for games and that are very limited in what they can express so this is why we built Matt to solve all of these General problems such that you as game developers can take care of making a game that's actually fun which is also hard all right so this is for the why we build mods now onto how like how much solves all of these problems mud is built around a pattern called entity component systems which is a very popular pattern in traditional game design or game development and if you're not familiar with it I'm going to give you a super quick crash course in ECS in ECS we have entities and entities are basically just a numeric ID in our case it's a un256 and then you have components that are the data store for these entities so you can have different types of components and they basically are a fancy mapping from The Entity ID to the component value in this component and they don't contain any logic the logic is introduced in the systems systems are logic that edits or that modifies component values but it doesn't care about the type of entity because there is no type of entity in ECS but rather an entity is just the collection of different components so our move system for example doesn't care about whether it moves a donkey or a dog all it cares about is that the entity that it's currently moving has the position component that has should and if you think about that it's kind of like ethereum already Works in a way today where you can think of entities or like addresses as entities and then token contracts as kind of like a combination of component and system attached to them and if you wanted to model that in pure ECS you would just create a balanced component that stores the data for that address and then a transfer system that modifies the component value all right and now if we have ECS statesync becomes much simpler in maths we have a central contract called the world contract and every time you create a new con a new component that component gets automatically registered on the world contract and then every time a um the the component value updates that update also gets registered on the world contract and then the world contracts emits uh like one single stream of events that the client can listen to and then use that stream of events to duplicate this the state on the client but the great thing is Matt handles all of that for you you don't have to worry about any of that all you have to do is create a component contract and give it some ID and then create a component on the client and give it the same ID and if there's two components with the same ID then mud automatically syncs their state and because this is a very general approach we can also provide you with generic indexes that just make it faster to load state from the client or make it make the RPC load on the on the RPC node lower and you don't have to write any custom sub graphs or anything for that now to the fun part of adding content like I said in ECS an entity is just a collection of different components with values so as an example our fighter here is in reality just the collection of the health component the attack component and the movable component and now we want to add more strong units we can just modify those component values and suddenly we have a dragon or we can recombine existing components in a new way like removing the movable component and suddenly we have a defense tower and all of that for all of that we didn't have to write any new code and then if we add a new component we double the amount of entities that we now can represent with the components we have as an example if we add a healing component suddenly we can represent a healing Shrine and a Healer and a healing potion with those existing components and that one new component that we added now to interoperability in theory everything that you build on chain is already kind of interoperable with everything else you just have to write a custom integration for it but if you have to write a custom integration for every other game out there then of course that doesn't scale and it becomes like tiring quite quickly so in other words interoperability needs interfaces to scale and you can think of muds as an interface for unchain games in the way that when you read from your own world it's exactly the same as if you would read from another world and if you think of erc721 as an interface of for ownership you can think of mud basically as an interface for anything because all the data is stored in a standardized way and you can access it through standardized queries like in this case has value or like in this case this is a query that gives you all the movable entities movable attack entities owned by this address and this is the standardized way how you can get any data out of any other world out there and the best thing about mud is that it's completely raw agnostic in fact over the last couple of weeks we've built two games that you've already seen if you were here the entire day one of them is skystrive which is an unchain RTS where the goal is to build your army and then defeat your opponents and steal the loot from the center of the island and escape with it as the first person and it consists of 39 components 22 systems and zero networking code because mud handles all of that for you and then we build op craft which is an Unchained voxel game that only consists of eight components seven systems and again zero networking code because Matt handles all of that for you and those two games are completely different games completely different genres but they build on the exact same architecture and can share the same Tooling in in Skys drive a Golem consists of these five components and in Grass sorry inbox sorry NLP craft a grass block consists of just two components position and item but it's the same basic principles that you build on top of so as a summary if you use math you don't have to worry about State sync because mutt handles all of that for you you don't have to worry about adding content every time you add a new component you double the amount of entities that you can represent with your components and you don't have to worry about interoperability because all the machines all the worlds built on top of Mind are by default interoperable with each other and but that's all the problems of building onshine games are solved except from building a game that's actually fun all right now to the second part modern practice now let me go over a little case study of a game that we've been working on over the last couple of weeks or p-craft you can actually check it out at opcraft.dev if you want to and it like I said it only consists of eight components and seven systems so I'm actually gonna go over every single component right now in every single system and explain you how it works um I'm just gonna go very quickly over the components and then explain them further when I explain the systems so at first we have the item component which is attached to item entities and basically tells you which type of block um that that entity is then we have the item prototype component which is a slightly more advanced concept that I will go over in just a second and we have the recipe component and the occurrence component which are both attached to the item prototype entity and then we have the own by component which tells you who owns a specific block and it's attached to the the item entity itself then we have the position component which stores the position of a certain block and it's also attached to the item itself and then we have two more components the stake component and the claim component which are used for our chunk protection system I'm also going to go over that in just a second so now to the systems we have the Mind system it's obviously very very Central in this game it acts on a couple of components and basically what it does is it checks whether there actually is so you send a coordinate to the contract and a type of entity and then what the system does is it checks whether there actually is a block of that type at that position and if so it removes the position component and instead adds the own buy component to that entity then we have the build system which is basically the inverse of the Mind system and it checks whether you own the block that you're currently trying to place and then removes the own by component and instead puts the position component on it then we have the craft system which acts again on a couple of components it checks whether the entities that you sent to it are all owned by you and then if the hash of those entities corresponds to the hash of a known recipe and if so it creates a new block and gives it to you and finally oh not finally but then we have the stake and claim system those are two systems but they work very closely together with the stake system you can stake diamonds in a chunk and then with the claim system you can claim the chunk for you if you have the highest stake in the chunk and then somebody else can comments take more and claim this Chunk from you then we have the transverse system which is very trivial it just transfers it changes the own by component transfers the block from your inventory to somebody else's inventory and now finally we have the occurrence system which is not really a system because it doesn't act on any components it just basically is a pure function but we still use the system pattern in order to take advantage of the entire amount infrastructure and with that you basically have an overview over the entire architecture of opcraft you could have totally done that yourself it was not hard um and now with two uh now I want to talk about two little things that I find that I found interesting um when building opcraft the first one is data versus code and the second one is on-chain terrain generation for the first part data versus code I just mentioned when you want to add new content you can modify component values or you can add new components but every time you add a new component you basically also have to add a new system because otherwise there's no logic that handles this component right adding in adding a new system is basically adding new physics to this world and um whereas adding like recombining components that you already have is just adding new content to the world and you kind of want to optimize for only adding content to It or Not only but you want to optimize for adding content to the world because it's easier to do than deploying a new system that then could have bugs and so on so one example in opcraft is the item component we could have gone the easy way and just start like create a block type enum and then store that value inside of the item component in order to represent what type of item or what type of block this item is and then in our mind system in build system Etc we would have had to hard code those this block enum and then check the occurrence of that block enum and check the recipe Etc what we did instead is create an item prototype component and then create item prototype entities and then in the item component we can just point to those item prototype entities instead of a hard-coded value and to this item prototype entity now we can add components that are basically shared by all the grass entities as an example and there are two components that we add to those item prototype entities that are one the occurrence component which includes the function selector to a function that then tells you whether this block actually occurs at this position and this is used in the mind system and then we have the recipe recipe component which is also attached to a certain item prototype components item prototype entities and it stores the hash of the entity types that you need to burn in essentially in order to create one of these components and now what that allows us to do is after the main systems have been deployed we can just add new component values by creating a new block like item prototype entity and attach a new recipe or occurrence component to it and suddenly we have a new type of block that is still handled by all the existing existing systems and the second part that I found really interesting when working on on opcraft is the on-chain terrain generation here are a couple of couple of images of the beautiful untrained terrain that we're generating in case you haven't seen it in the real game yet and basically I just told you that all the blocks in opcraft are represented as entities with components attached to them that is not completely true because if you want to have an infinite procedurally generated world then obviously you can't represent every single block as an entity in your ECS system or on chain what we do instead is we have a function a closed form function of the entire world essentially that gives you uh for as an input it takes in as an input the coordinate of a block and then adds an output it gives you the block at that position and then what we do is just store the difference to this world in ECS so every time you mine a block we basically place an air entity at that position and every time you build a block we just place the block at that position so how do you get this closed form function that represents the entire Terrain step one is you need Perler noise Turtle noise is a noise function that was invented by kanpoden and it's very useful to generate these kinds of infinite terrains and so the first thing you need is basically a polar noise implementation in solidity and a matching polar noise implementation on the client ideally in webassembly such that it is fast enough and conveniently mud already gives that to us so we don't have to do anything further um and then you could theoretically just use the purlin output as the height of your of your world and now you already would have an infinitely a procedurally generated world but it's not very interesting so let's add some more interesting stuff to it step one like step three I guess is adding oceans for that we scale up the Berlin and now we have huge valleys and huge uh like oceans basically and we say every time in our function we say if the if the height of the current block is less than zero but it's above the height of the purlin then we put water there and now we have oceans but the terrain still looks pretty pretty boring so next thing is adding uh something called octaves which is basically the same thing as when you add different sign curves with different frequencies and amplitudes like if you add them if you add them up then you get like more interesting patterns basically you can do the same with polar noise and if we do that twice with two different octaves then we get something like this which is already much more interesting but it still all kind of looks the same so we can we can do better Next Step let's add some biomes for biomes we need basically two two more permanent functions that we just for our understanding call humidity and heat and then for every point in the world we can compute the potent value for this heat and humidity and then plot it into this graph and then in this graph we we like divide the graph into four quarters and say if the heat is high and the humidity is low then we're in a desert if the heat is high and the humidity is high then we're in a savannah Etc and now as I said for every point we get uh like a point in this graph essentially and then we can compute the distance from these edges of the biome to get a biome vector and then we can use the spine to say like to in this case just represent the block types in a different way so such that you can see where the biomes are but we can do more interesting stuff like scaling the terrain depending on the biome such that in the mountain in the mountain biome you get like much higher terrain and and like mountains and in the Savannah Biome you get much more flat land kind of things next step is adding valleys and rivers to make it again a little bit more interesting and this is where something called a splined function comes into place blind interpolation we create the spline function and then we create a new Poland function and don't use the pollen value directly but rather map it through this function into a new value and in the case of rivers and valleys we basically want not to use the the like Peaks and the like the hills and The Valleys of the problem function directly but rather the the areas of the permanent function where it's like at the at the like around 0.5 such that the output of that like mapped function is basically the thing you see here on the right and then we just subscribe subtract that from the terrain we have so far and we get valleys and rivers and now this looks already much more interesting but it's still kind of naked so let's add some plans for plants we can just hash the coordinates the 2D coordinate basically and then say if the code in it if the hash module of some value is below a certain threshold then we put a plant there otherwise not and we can do the same for hours if we use the 3D hash of the coordinate and then we get something like this where you have at random positions plants growing and now the final the final touch that's still missing here is something that's bigger than just in like a small flower a small plant and something like a tree but for trees it's slightly more tricky because the tree is not only at one specific coordinate but rather it spans across like multiple coordinates so the trick that we use here is basically use a structure like a structure grid and align our structures on that grid and then we can map each position like each individual tile coordinate to one of these grids coordinates and then we can use the same trick as before and use the hash of that structure grid coordinate and then if it's below a certain threshold we say okay there's a structure at this position and if we know there's a structure at this position then within the structure within the structure grid we can say is uh we can we can figure out if there's a block of this type at this position within destruct if that makes sense and that's it basically now we have a beautiful infinitely generated terrain with flowers and plants and auras and valleys and rivers and this is basically all you need to know about opcraft now you know where all the diamonds in our p-craft are so you can mine all of them and build something cool thank you [Applause]
