Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. smakryp
    3. Posts
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Posts made by smakryp

    • RE: Using WebAssembly and C++

      @wtfrank said in Using WebAssembly and C++:

      WASM sets up an array, which is treated as the memory for the WASM code. You have to copy the in-game objects into this array. And wasm supports only basic types (int, uint of various lengths). There's probably code in emscripten which will wrap all of this up for you and copy javascript objects in and out, but I've only used WASM with byte data.

      There's some example code here that uses C++ https://github.com/screepers/cppreeps

      Alright, thanks for you help!

      posted in General Discussion
      smakryp
    • Using WebAssembly and C++

      Hey, I just got this game recently and JavaScript is really kicking my butt. I've done quite a bit of programming in C++ and I keep reading about how it is possible to compile C++ to WebAssembly. I just don't understand how I would interact with the in-game objects through C++ code. Like, is there an API or tutorial that I can check out? Could someone maybe post some example code or point me in the right direction?

      posted in General Discussion
      smakryp