Giter Site home page Giter Site logo

Comments (2)

endragor avatar endragor commented on June 30, 2024

godot-nim by itself is just a Nim library. It doesn't do anything out of the ordinary when you use it.

godot-nim-stub provides an example (a rather basic one) of how to build your Nim project in a way that Godot expects it. You can modify it to your needs, name libraries differently or even have multiple libraries in your own project. That project was meant to provide a basic template that you can expand as needed.

As about the specific questions here:

  1. You cannot package a native dynamic library into another file. OS APIs expect it to be a separate file. The only exception is iOS where dynamic libraries are not allowed and so GDNative libraries are linked statically. The last time I checked GDNative didn't support static linking for other platforms, but things may have changed since then.

  2. I haven't looked into exporting Nim projects for HTML5. You should look into how it's done for C and replicate the same steps for Nim. Nim supports overriding the commands used for compiling C files, which may come in handy here.

  3. For exporting to multiple platforms I'd recommend making a task like nake package html5 that does the necessary preparations, compiles the library for Godot, and then invokes Godot to export the project.

from godot-nim.

insomniacUNDERSCORElemon avatar insomniacUNDERSCORElemon commented on June 30, 2024

To be clear on one of the questions: you can copy the nim-lang library from 1 exported project over to another and it will carry over logic (most notably window settings if set via nim). It might be interesting if 2 games were developed similarly enough that swapping files like that would produce a playable (though odd) result. Though I suspect the more common issue will be people updating/replacing .pck files and not also the libraries, and thus not actually fixing code errors.

So It'd be more clear if it were nim_gamelogic_OSbits.libext (or something like that) as default instead. Though sure, I do see how I could do that myself in nakefile.nim in your stub project (which yes, I have used obviously). EDIT: Actually the gdnlib file needs to be edited as well


The other stuff I don't know where I'd even start (a while ago I wanted to test Bunnymark and couldn't get C++ bindings installed), I'm not far enough for it to really matter that much (well, I've now done 1 project that I tried to export to HTML5) but it'd be nice to have actual info/directions.

from godot-nim.

Related Issues (20)

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.