Giter Site home page Giter Site logo

godot-ctsi's Introduction

Godot Toolchain for Cartesi

This project aims to build the Godot Engine for the Cartesi Machine to enable a new wave of blockchain integrated games.

Motivation

Currently, blockchain integrated games follow two main patterns:

  • Web 2.5, where digital assets are stored onchain but all other game logic is built offchain either in the game client that players run or on game servers managed by the development team. This works well for most games but is very limited in how it can leverage the blockchain.
  • Fully onchain, where all the game logic is built with smart contracts and the offchain components are almost exclusively presentation layers. This comes with the serious restriction to computation in the form of gas usage, and requires game developers to build with unfamiliar tools not well suited to game development.

Godot is an open source, cross platform game engine that has the potential to bridge this gap, allowing developers to build game logic with familiar tools, then run it in a secure, decentralized manner with a tight integration to the blockchain. It also already has experimental support for the RISC-V architecture so in theory it should be able to run on Cartesi with limited effort.

Challenges

The primary challenge with building Godot for Cartesi is in its compiler support. Godot can only be compiled for RISC-V with Clang due to a bug in gcc with atomics. So, before compiling Godot Engine, we need to compile a Cartesi-compatible LLVM toolchain, which was much easier said than done.

The first attempt felt almost too easy. LLVM built without issues, but then couldn't find some of the headers it needed to build Godot:

Missing headers

That seems like it could be a simple fix to the build flags, but it turns out LLVM didn't build with the cartesi toolchain in the first place, it found the system toolchain and used that instead, ignoring the sysroot and build target I'd set. Building with the Cartesi toolchain came with new challenges:

Failing to find the Cartesi toolchain

And some more:

Missing atomics support

I'll continue to press forward with compiling Godot for Cartesi, as I strongly believe this will enable game designs and mechanics that aren't possible with the current state of game and blockchain tooling.

godot-ctsi's People

Contributors

sweti-yeti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.