New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Cronos 🛠 Build your Web3 games with Cronos Play - Leslie Cheung & Ricardo Arcifa

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Welcome Leslie Cheung and Ricardo Arcifa from Cronos for a workshop titled "Build your Web3 games with Cronos Play". ETHOnline is our biggest event of the year! Collaborate with thousands of developers and creatives from around the world and win over $300k+ in prizes! We're bringing in 30+ of the biggest teams in web3 to give you access like never before. Learn from ecosystem leaders and build your biggest ideas as the merge nears reality. The future of Ethereum is being written right now, and it's time to make your mark. --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com #ethereum #blockchain #web3 #eth

Transcript

[Applause] [Music] great we get started uh thank you everyone for joining today uh we're joined by leslie and ricardo uh from phonos and today's workshop is building your website games with chronos played so i'll hand the mic off to lesson hello everyone um so i would just quickly share the screen make sure you you can see my screen right okay yeah yeah yes wonderful yeah once again i would like to say thank you to the organizer and also you know uh it's a pleasure to have everyone here you know build together in this hackathon so uh let me introduce myself i'm leslie chung and also i have uh our teammate rick here will be presenting uh some of our exciting features on cronus flight in particular later so uh yeah i'm leslie and i'm in charge of the developer relations of chronos in case if you have any question in the future feel free to add me in the discord channel and i'll be there so let's kick off with a quick overview of chronos first so chronos is the first vvm compatible layer 1 blockchain that builds on cosmo sdk it is supported by crypto.com crypto.org and more than 300 application developers and partners okay so the mission of chronos is simple and also challenging this is to make it easy and safe for the next billion of crypto users to adopt to referee with a focus on d5 nfts and game 5. so if you're a developer joining this hackathon you'll be like why building on chronos right so if you ask me i would say chronos is more than just a simple evm compatible chain what makes chrono special is a unique position that links up the cosmos ecosystem and the evram ecosystem in particular chronos is built on top of a technology called either main which is an open source project that brings cosmo sdk and is underneath consensus engine tendamine together with the standard ethereum practice so cosmos sdk antenna mean has already been working well for many different networks and projects which allows a high transaction throughputs and provide instant transaction finality and it is also backed by formal research and has been robustly tested implemented and adopted by many high profile projects one very interesting part is it also comes in a modular structure what does it mean is it all the flexibility regarding which application that are developed on top of it and how they are going to be developed in particular it enables us to build a special module that called well evm module very obviously that it allows evm related logic to be executed at the top level while the tandemian consensus engine will take care of all the consensus related logic at the back for us of course one very important thing i would like to mention about cosmo sdk is something that you might already heard of it's called ipc so uh ibc which stands for inter blockchain communication protocol it allows chains to be connected passing messages and transfer tokens natively at the political level at the time being we have already been connecting to multiple cosmos sdk based chain uh such as call crypto.option cosmos hub and a cache network and we're expecting more to come simply speaking i would say uh chronos is the evm compatible chain that also comes along with all the goodies from the ecosystem of chrono of cosmos yeah and on the value proposition what makes chronos unique is uh the instant portability well evm compatible that supports smart contract of course and bridges directly come along with the ibc that we have just mentioned low infriction while to user with us high transaction throughputs and instant finality transaction costs on chronos is also relatively low for developers solidity and also all the evm toolings will just work out of the box which reduces a lot of friction for projects to migrate to chronos next thing is while by looking at the orange activities we can see a strong user adoption to chronos we can see that chronos is one of the top 10 chains that in terms of tvl with more than 900k of uses 50 million plus of transactions since we launched november last year finally the most important and also organic part is the community today we can see that well on twitter hashtag clove ecosystem represents and representing an addressable user base of more than 50 million of people all over the world which means building on chronos would put your d apps to a huge stage with spotlights on that means easy on ram to your project for more than 50 million plus of user of crypto.

com yeah so uh moving onwards i mean this is in a hackathon setting yes for developers um from very big basic solidity to travel hothead open zeppelin webfree.js well you name it all of your experience and evm related knowledge can be directly applied to chronos in addition we also have been continuously working together with many leading providers in the industry to further support on the infrastructure data indexing and rpc endpoint side this hackathon can be a perfect starting point for you to build on chronos even after this hackathon we have extensive developer approp programs for you to take your project to the next level so one major highlight in our chronos development toolkit is chronos play which is a gaming sdk that allows us to connect your games written in unity or unreal or c plus plus with chronos directly so what would i do is i would firstly pass it to my teammate ricardo to give us a more in-depth breakdown on a demonstration of chronos play and then later on we will jump back into couple more extra developer resources and the prices for the hackathon so i'll pass it to you rick fantastic thank you leslie okay so yeah let me quickly introduce myself before i start to share my screen or maybe i can do the same thing synchronously so my name is rick and i work alongside leslie as an innovation blockchain engineer uh and yeah today i want to tell you a little bit more about chronos play for for those of you who haven't heard of it yet it's basically um our our sdk that we have been uh working on for the past couple of months uh and really since the beginning of the year um i should i should say and what it really is it's it's um it's basically a collection of packages and dependencies in the context you know of unity and unreal which enable game developers to to build new games and existing games and perhaps also have the ability to connect off chain and on-chain data in order you know to make some some some blockchain magic also happening in those games um at its core from a unity perspective we have used chain save the chain save gaming sdk but we have been also integrating with the c plus libraries for for unreal for example um obviously some of the play cross play features are that gives the opportunity to to get some um data some insightful on-chain data such as you know um metadata from nfcs from your erc uh 721 tokens um but also you know other type of data that you might want to fetch into your games it also provides some opportunities in in in the area of wallet authentication and authorization which has been a very trending topic from what i've been hearing so far from game developers and then as i mentioned before the ability to to transfer tokens and you know data that comes from nfts within winning games there's a couple of reasons um why we recommend to build on chronos i'm not gonna go through all of them but some were mentioned already by my colleague leslie um obviously you will know that there is a multi-platform support which means that you can build on on several engines you can build on unity you can build on on unreal as well and there's more to come and obviously there is a lot of opportunity around you know the global reach because we have a strong community that's expanding and the fact that we focus on scalability is probably something to keep in mind and also the fact that you know we we aim to always provide the best interoperability as possible since you know our protocol is ibc based with the basically interoperability and access to cosmos as my colleague leslie mentioned before roadmap we have been working intensively on different elements for example the crypto company integration has been released just recently it is available on our documentation and i will go to the documentation in just a minute but there's obviously some some other opportunities that we're working on such as you know our authentication options and also crypto.com nft packages um i mentioned as well that we are actively working on on the unreal engine plugins as well as working on c plus plus development sdks some of the games you know that we have been working with a few are you know for example we haven't worked with rolf games with the bemoly dragon sb decentral games just to name a few and i think you know before going too deep into these details why don't we just have a look at the documentation and show you how you can get started if you're interested to start to develop some interesting games or even integrate some new features on onto your game so on the main page whenever you go to click on the get started button you get to the kronos play quotation page you also find some other modules that might be very interesting but i think let's keep it in the context of of the chrome display sdk you will see that the chronos play uh sdk is divided in different topics um so whenever you're interested to get started and build something on unity you have different kind of elements and tabs that you can explore you have some examples for login mechanisms you have some some script examples which we're going to actually expand within the next few days and as i mentioned you have the different core modules such as you know the the unreal engine plug-in and the chronos play c plus plus sdk as well as the recently released crypto.com pain integration so why don't we have a look um at the scripts so it's quite simple they are based on on the chainsafe documentation some of you might be familiar already with chainsafe as they have really provided a really cool set of scripts for for unity which is at the core of this sdk as well for example right now you will find the evm modules a couple of evm modules that make use of our rpc method which you can use whenever you want to query the evm function in in unity we are also working on releasing the native version meaning that you wouldn't have to use the rpc method anymore because we have recently launched our subgraph endpoints which means that now uh chainsafe will natively support as well uh native transactions which means if whenever you want to get stuff like you know a batch of your nfts uh you can do that without having to create for loops or even whenever you want to query your balances and these sort of things you don't really have to use the rpc method anymore if that's something you don't want to do if you want to work with rpc method obviously the option is still available but obviously this is going to be up to the developer and why not having both options available so to get started again all you have to do you can visit this page you go to the unity um example in here then you have obviously all the steps on how to get started the different rpc methods that we provide and we can choose whether you clone it from github or you can just go ahead and download your sdk from here why don't we quickly go into the unity editor so i show you a couple of scripts that i have prepared so the first one um is called call it erc721 balance of chronos as the name suggests what it does it returns the balance of the the assets that i own the 721 assets there's a couple of parameters that i'm passing to the option here so basically i want to chain the network i want to get the contract of the nfts and i want to get my account now you can make this a little bit more dynamic if you if you wish so whenever you start to build your game there's obviously some player press versions that make this string a little bit more dynamic meaning that whenever you log in a new authenticate you will be able to just replace this with the dynamic player press string so if i close this and i run it um all it does uh it's basically printing the balance once the promise is returned so i'm gonna close this and just choose my unity editor uh gonna switch this one off on and then i'm just gonna run it and then we will see okay here we go so basically um it just printed the amount of nfts that i own in this case i'm using the testnet obviously so all of these nfts are generated in our nft faucet which is also available in the documentation if you want to have something like the openc kind of test network you can create some test nfts and then query them into your game that's also something that we provide now the second option we can quickly test is the the owner class which again is i think it's self-explanatory uh what it does is um it takes a couple of parameters in and checks for the owner of a specific token id that's part of a specific contract always on the test net in this case so come back to unity and run this very quick set the right one yes i'm just going to print out obviously right the address that they use for this test nfd which is then indicating obviously the ownership this is an interesting function because it can in the context of a game you know you could create some some functionality that make sure that the specific ownership is being identified within the game for example so it's quite cool and yeah then i want to have a look at the evm balance option just this one now for this one we use the evm function and in here what this one does it's going to return the balance based on on the evm function so let me turn this one off okay that's uh basically the the balance that i have my test net balance but uh yeah again this is something that you can use as well you know whenever you want to start building and you want to use a test net we have a faucet which means that you can get on a daily basis some some resources but leslie's going to explain that in a minute as well now another um function that i want to quickly show you another script is uh this one is probably one of my favorites because it it shows how you can replace game texture you know um with with an ft based texture by using uh the ure option here in the erc721 function so there's a couple of informational couple of parameters i'm passing the chain the network to contract the token id and as well the rpc method so some of you might be familiar already there's some tricks that can be used with ipfs particularly when it comes to getting data and there's some some some guards at times so it's better to just replace the ipfs protocol with the https protocol and this way you won't have those kind of problems that might even impact the performance of the query then the next step is we use unity web request to get the information from the uri and once we await the web request we create a response and that response is basically going to hold the json object of the metadata that is being fetched once we run the unity web request and in there we want to store the image yuri which is going to be under the data dot image option available then what we want to do is always we need to make sure that we just something you know it's very repetible so i think there's a lot of smart ways to to create maybe a function for this and then reuse it every now and then whenever it's necessary to use it uh just to reduce you know duplication i think there's a couple of ideas and then finally we fetch the image and display it in the game so we close my code editor and get back to my unity editor let's run this so as you can see it's logging the information and then it replaces the the sprite the quad with with the new sprite which is basically the image that is being stored in that contract and yeah these are just a couple of examples i know we are very short on time today so if you're interested to learn a little bit more there is a couple of interesting videos already on youtube with some real game examples that we have been working on so feel free to have a look at them but you know i think the ideas in terms of development are literally endless so these were just a couple of example and maybe before handing it over i have been working on on different client examples that connect you know metamask and and smart contracts to to save on chain data as well as images are to ipfs by using front-end applications such as next.js to create mounting web applications and there's a lot of front-end libraries for example i had been using morales very recently despite the fact that morales is um moving to morales 2.

0 i still thought it was a cool library to explore um but yeah and that's just one of the examples um of how to combine different frameworks really to create a off-chain and on-chain data and then reconnect these to to your game client whichever that might be whether it's unity or unreal engine and with that i'm going to pause it here and i think there's something you wanted to show as well leslie yes that's right um yes thank you very much rick that is actually a quite a lot of like different demos uh rick and i already uh demonstrate in some other workshop as well so in case if you like to know more uh you can always you know jump to the discord channel then we can provide you with the links so uh yeah so after the demonstration by rick i would like to cover some of those like other information about the support and also documentation and price so on the support side of the the most native way to provide the support and if you have any question would be you know join this um idih online 2022 um discord channel and uh we will be me and my teammate will be there in the sponsor ivan kronos channel to provide support over there and uh on the documentation um i think uh rick already showed you of like this docs.chronos.org and uh i think uh also something that very important is uh many of the resources has already been provided in this uh for dev developer site you can see that uh integration uh with integration with uh like different rpc endpoints uh for testnet mainnet and uh explorer etc and also this is some of the uh developer toolings in terms of uh price oracle and also render number generators and morels api support that the detailed documentation you can also find in here yeah and also the next one is on the price uh for this hackathon we reserve five prices uh 2k each uh for any project that develo uh developed and also deployed on chronos minute or test net so yeah pay with that i think uh can reach up sometime for the qa section see if we got any question from the chat yeah i think there was a question before um so beowulf was asking if um if you currently support game maker studio or if there's any game makers do you support planned maybe i can answer the question so to the best of my knowledge we are currently not working on support for game maker studio but that doesn't mean necessary that we won't do it in the future i think um it all depends uh probably on on on on demand and probably we will we'll have to see how many of the game studios we work with are interested in seeing uh game studio support in the future and the more feedback we get from game developers like yourself the more it might be like in the future that we will perhaps provide also support for game maker studio yeah and also i think uh if you have no experience on unity for example uh in the cases like uh rick also uh before like we kicking off these projects he also have like no experience on unity as well but turns out uh how was your experience in general yeah i think that's a very good point yeah i started from scratch with unity so it was a bit scary at first but i think there's so much documentation maybe not too much but there's enough documentation to get started i think that's what matters in the principle you know to have enough information but also um the the curiosity to learn and to to to test stuff i think that is what helped me to go through um the the unity implementation so far so i think yeah there's enough information to really get started and once one gets started you know everything else just comes out automatically yeah right yeah thank you right and then i also saw a question um uh would like to see whether the sdk compatible with uh ethereum mainnet uh i think the the short answer is yes but you would have to do a bit of like uh you know modification in terms of the the chain id and also the endpoint that you choose uh basically i mean it it supports all this evm compatible chain given that they have a like a similar uh method calling ways of calling uh the the lpcn bonds and also they support like similar methods on the evm level if that is the case and then it is actually you know applicable to other chain as well okay let us see if that is um any other question from the from the audience it looks like that's it um if anyone does have any questions i recommend them to take it over to discord there's a chronos discord channel under global uh online event um yeah don't say anything else well thank you to both of you um this is the first workshop of the day we do have many more coming up today um so i hope people join uh tune in and uh with that being said have a great day everyone thanks for having us bye have a good one later bye you

Automatic transcript — names and jargon may be misspelled.