• Zicklag

    Ah, very good information. 🙂 Thanks.

    So the primary use of loadable dlls would be to integrate with native APIs, not for optimization of any sort, but it could still be useful.

    Also good to know about Krom on iOS and consoles; I was assuming Krom would run similarly on consoles. I've got a lot to learn about this stuff so thanks for answering my questions. 👍

    posted in Kode read more
  • Zicklag

    I am trying to compile Krom on Linux and just wanted to make sure I was doing it in the way that made most sense for development. I am able to successfully compile it using Koremake like the Readme explains, but I wanted to know if there was a different way that I should build it for debugging purposes. Are there "Release" and "Debug" build modes that make a difference?

    I noticed that the Readme said that debugging setup isn't automated on Linux IDEs yet. I don't need to have a debugger if it is not setup yet, but I did want to make sure there wasn't a debug build mode that would make it compile changes faster ( it seems to take a really long time running ld when I compile it after making changes, not sure if that is just because of my laptop being slow ).

    posted in Kode read more
  • Zicklag

    OK, so, Krom is awesome. 😉 I've established that. It is the easiest and the best way to handle dynamically loading code for mods, it outperforms the C++ target for Armory, it will be available on consoles and mobile devices soon, and it is using the fastest runtime available. It's great.

    Still, there is one disadvantage that I recognize compared to the C++ target and that is being able to interact directly with other native C++ libraries. For example, with Armory, for physics it is using the Bullet library for the C++ backend. For Krom it uses an Emscripten compiled version of the Bullet C++ library. That is fine, but that wouldn't work if you needed to interact with something like native APIs for mobile phones or for desktop integrations. Yes, you could fork Krom and add those C++ libraries and bindings, but then you have to maintain a fork of Krom for your purpose. Not ideal.

    What would be awesome is if you could make native Krom extensions like you can for NodeJS. You could compile like a .dll or a .so library that could be loaded by Krom ( automatically? ) to add extra libraries and Javascript bindings that can be used in your Kha app ( obviously with Haxe externs for said library ). If you could do that, you could use the C++ Bullet library right inside of Krom without having to compile Bullet to Javascript ( which should be better for performance ). Also, if you had any extremely intensive operations that you really needed to write in C++, you could write that code as a Krom extension and use the bindings to interact with it in your Haxe code. That way, if you ever really needed to super optimize a certain portion of your game, you could do it easily.

    I'm not sure exactly what options there might be for automating bindings for C++ libraries. I know some C++ libraries use tools like Swig that are used to automate bindings to Python and other languages, but I don't know what options there are for Javascript. Much of this is outside of my expertise. Even if you had to write the glue code manually, though, just having the ability to bind Javascript to other native libraries in Krom would be an huge advantage.

    Maybe there is already a way to do this. If there is, Krom is still awesome. 🙂 If there isn't, maybe it could be even awesome-er ( yes it's a word despite whatever your dictionary tells you ). So @Robert, what's the verdict? 😉

    posted in Kode read more
  • Zicklag

    Thanks again for your quick and helpful reply. 🙂

    posted in Kode read more
  • Zicklag

    I was wondering whether or not it would make sense to make HashLink either the VM or an optional VM for Krom. On the HashLink website it says that it has tested to out-perform V8. I know we switched to Chakra recently, but maybe it's worth benchmarking Chakra and HashLink to see if HashLink is faster. HashLink might make the Krom binary and the bytecode smaller than it would be with Javascript, too.

    I'm not sure exactly how debugging would work or how much work it would be to get HashLink in Krom, so maybe it isn't worth the effort, but I couldn't resist asking about it. 🙂

    posted in Kode read more
  • Zicklag

    OK, good to know. I might try my hand at implementing it, then, if nothing else gets in the way. I'm going to need to learn some C/C++ anyway. 🙂

    posted in Kode read more
  • Zicklag

    @robert I just had an idea, would it be possible to compile the sys package from the Haxe standard library to C++ using the Haxe C++ backend, include this generated C++ code in Krom, and bind it to Javascript. That would allow us to avoid having to re-implement sys from scratch in Krom.

    HashLink can also compile to C so that might be another option for sourcing the sys implementation.

    Do you think this would work or would there be problems. I don't have experience in C/C++, but I'm wanting to get sys support in Krom so I thought that this might be an easy way to get a sys implementation without having to start from nothing.

    posted in Kode read more
  • Zicklag

    @robert Thanks for the explanation! That's great. That's a very nice to know and it sounds like a good strategy. Works without me even having to know that it's there. 🙂

    posted in Kode read more
  • Zicklag

    I was curious about Kha and compressed textures and/or bitmap fonts. I noticed that the OpenGL Tutorial I was going through essentially said not to use normal texture formats, but to use a compressed texture format that is native to the GPU. I also noticed that another tutorial used a bitmap image for text instead of using a TTF font. I know that Godot 3 has tooling to convert textures and fonts as well.

    I was wondering if there was a reason that Kha uses normal textures formats instead of compressing them. The workflow is already setup because Khamake does convert the images for different platforms. I'm not saying that Kha should, I'm still learning all of this stuff, I was just wondering whether or not it was a performance disadvantage that it doesn't convert them.

    posted in Kode read more
  • Zicklag

    Is there a way to list folders and files in Krom? I'm targeting Krom and I need to be able to list the directories in a "Mods" folder and execute the krom.js file in every mod. As far as I can tell, the Kha API allows you to load blobs from a path, but it doesn't allow you to list directories or files within a path. I suppose that makes a certain amount of sense because that wouldn't work on all platforms, such as web, but I do need a way to do it on the Krom platform.

    posted in Kode read more

Looks like your connection to Kode Forum was lost, please wait while we try to reconnect.