Taking CryptoCarz out of the garage and into Decentraland

CryptoCarz
6 min readOct 9, 2018

--

The process of invention with CryptoCarz was largely driven by inspiration: what are the possibilities with non-fungible tokens (NFTs); has anyone thought about the options for gamers with smart contracts beyond buying and selling items? Our development has been focused on our areas of domain expertise — game design, VR design and modelling, and blockchain coding. With Nifty Hong Kong, the first summit focused on NFTs and gaming, hosting a hackathon, the chance to bring all our development tracks together in real-time was a critical opportunity for the whole team.

One of the key instigators — and sponsors — of the Nifty conference was Decentraland, the most known decentralised virtual reality platform. Their virtual reality real estate presented a chance to put our NFT-based cars to the test — could we render cars, link them with a system of smart contracts and race them? This is the promise we’ve made to our community and partners since the launch of CryptoCarz. Now we could show that it worked, and, more importantly, that it was awesome.

The premise for the Nifty hackathon was to produce the best ideas in blockchain-based gaming in 36 hours. We thought it would be the right time and place to demonstrate how CryptoCarz could work on Decentraland. It would have been ambitious to build a full racing circuit in the space of less than two days, so we decided to focus on creating a workable drag race. This would leave enough time to complete the Smart Contract infrastructure, as well as additional ideas to support the drag race — settling on an additional betting decentralised application (dApp).

The concept:

Beyond the simple premise of showing an actual race, we wanted to demonstrate how ERC721 can be functionally applied in a game. Blockchain-based gaming enables the creation of new games dynamics, such as sharing revenue using smart contracts. This has been promised, but it hadn’t been shown in practice.

We wanted the drag race to demonstrate the following features:

  • four different cars drag racing on a strip, all built in Decentraland
  • the platform and game mechanics defined and controlled through NFTs and smart contracts
  • all cars and the track itself are ERC721 tokens
  • an additional betting dApp to allow other user to bet on the result of the race

The 3D assets:

For starters, we had to adapt our high-resolution car models to a lower resolution to fit the current parameters in Decentraland, and render four different cars to use in the race. We modelled the drag strip as a 30x4 scene, which, given the parcel size in Decentraland, came to 300 by 40 meters. To give it context, we used Hong Kong’s Victoria Harbour as the backdrop for the race.

Rendering our cars in real-time

The game mechanics:

The drag race takes place on a straight track. The problem from the outset was how to establish different performance capabilities. Our moment of inspiration came with linking car performance to market data feed — given each car has the look and feel of a cryptocurrency, it was time to have them powered by the same currency under the hood. We created a variable component of the car velocity which was linked to the actual price variation of the currency during the race. The car speed would change around an average base speed based on price dynamics. For example, if Ethereum was going up, the Ethereum car would go faster.

It sounds like a simple idea, but it was a complex problem to work through in 36 hours. While we managed to code this functionality, we couldn’t complete market data feed link, so we had to simulate this variable component in our final demo. This feature got a lot of positive feedback, so we will continue the development of this special feature.

Decision time

One of the most popular features of CryptoCarz has been an option we call “Fast and Furious.” Given we were debuting a functional game, we decided to add this feature to our demo. The four cars (ERC721 tokens) are held by an escrow smart contract, which actions at the end of the game and transfers all four cars to the winning driver. This is literally a case of the winner taking it all — adrenaline-packed, pink-slip racing on blockchain is not for the faint-hearted.

FnF: the ultimate test to see if you are a true racer

The Blockchain assets:

One important feature of CryptoCarz that is made possible through smart contracts is revenue sharing across multiple parties. We developed a smart contract to automate revenue distribution, splitting the race fee from each user between the prize pool, game developer, track owner and tournament organizer. When the game is fully operational on Given LAND in Decentraland is an NFT itself, we will provide a further split between the land and the track owner, given the track will be a separate NFT than the land it is built on.

Drag race with Victoria Harbour in the background

The betting dApp:

The final experience we thought would excite the audience was our betting dApp. This idea is not central to our CryptoCarz proposition, but it gives an indication of the types of innovation that our game will trigger. The dApp allows viewers to wage on the results of the race. Going forward we plan to integrate prediction market applications such as Augur or Gnosis and add variable odds.

CryptoCarz Betting dApp

With two working dApps, together with our ERC721-based cars brought to life for the first time, we reached the hackathon finals. This was a special achievement for the team, and we managed to bag two prizes: the Toshi (now Coinbase Wallet) prize, since our dApps also run on Toshi mobile version, and the Meme prize for our popular 1Doge car.

1Doge

We’re huge supporters of Decentraland and extremely happy to work together to build our racing experience there. Having tested what can be done in 36 hours, we could not be more excited about what we can create inside Decentraland over the coming months. With more time to develop, the results are going to be awesome. Stay tuned via this page to see how we take forward all the ideas we demonstrated at Nifty in Hong Kong.

We would like to tank again the hackathon team: Jose, Chris, Daniele, Stefan, Shan and Tina; Decentraland and Nifty for giving us a platform to showcase our project; Coinbase for the Toshi prize and everyone else for listening. To the next year with more racing in Decentraland!

Keep up-to-date with our latest news

Stay in touch with us, and learn more about CryptoCarz:

Read our drivepaper — https://cryptocarz.io/assets/docs/CryptoCarz_WP.pdf

Join our Telegram: https://t.me/cryptocarz

Follow us on Twitter: https://twitter.com/cryptocarz

Be part of our Facebook Group: https://www.facebook.com/cryptocarz

--

--