Save
Saving
  • C
    Cuco

    Actually, that's also my favourite workflow, and that was one of the main reasons I chose Kha. The other was console support.

    I guess you're right about Flash (incidentally, the Node target has the same BytesData/Bytes thing). How about Adobe AIR as a replacement?

    posted in Kode read more
  • C
    Cuco

    By native IDE, do you mean Android Studio or Kode Studio? I like to use VS Code more (btw, thanks for the Kha Extension Pack!), as I can use that for other stuff.

    The other targets didn't have anything related to Gradle.

    For instance, Unity building said the following Haxe compiler error:

    C:\Users\Rui.vscode\extensions\kodetech.kha-19.2.0\Kha\Sources/kha/Display.hx:14: characters 2-51 : No overloaded method named get_modes was compatible with the property modes with expected type Void -> Array<kha.DisplayMode>

    And, as another example, Flash building complained that Blob.bytes was expecting haxe.io.BytesData, while in Android and HTML5 (for example) it's haxe.io.Bytes. I guess I'll have to place a few #if's in the code 😕 .

    posted in Kode read more
  • C
    Cuco

    Just gitted https://github.com/Kode/Kha into C:\Users\Rui.vscode\extensions\kodetech.kha-19.2.0\Kha, as you said, but still no luck - there's the same error. What I have been doing to circumvent the issue is I ask Kha to generate the Android Java project and source files, and then I do the rest in Android Studio. This way, I'm able to generate an APK.

    As for Windows, I don't have Visual Studio installed, so I can't give you any feedback there. Sorry!

    posted in Kode read more
  • C
    Cuco

    Hi. I just installed Kha Extension Pack for VS Code, but I am getting these errors when trying to compile for targets other than the F5 one:

    > Executing task: node C:\Users\Rui.vscode\extensions\kodetech.kha-19.2.0\Kha\make.js android --compile <

    Using Kha from C:\Users\Rui.vscode\extensions\kodetech.kha-19.2.0\Kha
    Creating Kha project.
    Exporting asset 1 of 36 (a.png).
    ...
    Exporting asset 36 of 36 (x.png).
    Compiling shader 1 of 8 (painter-colored.frag.glsl).
    Compiling shader 2 of 8 (painter-image.frag.glsl).
    Compiling shader 3 of 8 (painter-colored.vert.glsl).
    Compiling shader 4 of 8 (painter-image.vert.glsl).
    Compiling shader 5 of 8 (painter-text.frag.glsl).
    Compiling shader 6 of 8 (painter-text.vert.glsl).
    Compiling shader 7 of 8 (painter-video.frag.glsl).
    Compiling shader 8 of 8 (painter-video.vert.glsl).
    Done.
    events.js:174
    throw er; // Unhandled 'error' event
    ^

    Error: spawn gradlew.bat ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    The terminal process terminated with exit code: 1

    What does it mean and how do I compile to other targets?

    posted in Kode read more
  • C
    Cuco

    I see. Is there a way to check where that is? I searched the whole disk but found no file "slot1.sav" anywhere.

    posted in Kode read more
  • C
    Cuco

    Ok, I tried that, and then did a few writeString() in succession. However, after hitting F5 in Kode Studio to test, I could find no trace of the created file. Is it because it's HTML5, and the file is only temporary? Or am I forgetting to do something, like open and close, or anything like that?

    posted in Kode read more
  • C
    Cuco

    I'd like to save some data onto a file. I suppose StorageFile is the class to use, since I cannot use sys.io.File. My question is: how do I create an instance of StorageFile, say for a file called "slot1.sav"?

    posted in Kode read more
  • C
    Cuco

    That's also the one I'm using. 🙂

    posted in Kode read more
  • C
    Cuco

    There seems to be a bug with cmake that doesn't let me create a working apk. The same error also happens to some people who aren't running Kha. I'll have to leave this until later. Sorry.

    posted in Kode read more
  • C
    Cuco

    Sound.uncompress works only in native Android, so I had to download cmake. The older version (3.6....) compiles (with lots of warnings), but when trying to install generated apk in device, it says it is corrupt. The newer version (3.10....) doesn't compile. It says

    CMake Error: Could not create named generator Android Gradle - Ninja

    halfway through.

    posted in Kode read more