• B

    Thanks, i will keep this in mind.

    posted in Kode read more
  • B

    Thanks! Would love to work more with Kha. However, i wonder if anyone shipped medium-to-big-sized HTML5 WebGL game with Kha and what is their experience with performance and stability.

    posted in Kode read more
  • B

    So, i was working hard to keep my main game loop below 1ms, however Pixi just eats away all the performance on mobile. And i am not doing anything fancy, just using a single 2048x2048 base texture, about ~200 containers (some are nested in 2-4 levels) and ~750 sprites. No filters, no shaders, no color transforms.

    Anyone have experience with Kha and Pixi.js as it relates to performance? Particularly HTML5 WebGL.

    (Pixi.js is HTML5 2D rendering engine.)

    posted in Kode read more
  • B

    Just in case i need to remember the steps in the future, so i will save it here. šŸ˜ƒ

    TODO list:

    1. download ( and install haxelib to C:\HaxeToolkit
    2. open cmd.exe
    3. run command: haxelib setup
    4. run command: haxelib install kha
    5. create folder anywhere.
    6. navigate to your project folder using cmd.exe
    7. run command: haxelib run kha --init
    8. it will create few folders and files inside your project folder.
    9. run any of these commands while you are in your project folder:
      1. haxelib run kha windows
      2. haxelib run kha ios
      3. haxelib run kha android
      4. haxelib run kha android-native
      5. haxelib run kha html5
      6. haxelib run kha flash
    10. it will build project files for popular IDEs. (FlashDevelop, Visual Studio, etc.)
    11. open created project file with popular IDE. šŸ™‚
    12. build again.
    13. Probably automate it in some way.

    posted in Kode read more
  • B

    Ok, tried using Kode Studio.

    My impressions: looks nice, but feels sluggish.

    Maybe because Visual Studio Code is not fast in general. šŸ˜ƒ

    Anyway did few test to see why it feels slow (3GZ dual core CPU, 4GB ram, regular HDD):

    CPU Usage:
    ā€¢ typing text: ~50% (FlashDevelop: ~10%)
    ā€¢ selecting small chunk of text: ~70% (FlashDevelop: ~15%)
    ā€¢ moving text cursor up and down over empty lines: ~40% (FlashDevelop: 5%)

    empty project:
    ā€¢ 7 instances of kode.exe (FlashDevelop: 1)
    ā€¢ 548MB ram usage. (FlashDevelop: 158mb with multi-thousand line project opened with 10 tabs)

    ā€¢ Slow.
    ā€¢ No autocompletion.

    I am keeping FlashDevelop. šŸ˜ƒ

    Anyway, lets try haxelib:

    Compile speed of empty project:
    ā€¢ flash target: ~4 seconds
    ā€¢ html5 target: ~4 seconds
    ā€¢ windows target: ~9 seconds (about 3 minutes in visual studio to build first time, release build .exe file size: 1.4mb)

    problems with flash target:
    swf size is 400x300 instead of specified 1024x768. Have to open project-flash.hxproj and compile again? If so, why Kha compilation produce swf in the first place? šŸ™‚

    Windows is very fast compared to OpenFL. Also very low executable size. Pretty nice.

    Things to try out next time:
    ā€¢ Android and iOS.
    ā€¢ Test how fast it will go from changing few lines of code -> Kha compilation -> visual studio compilation -> run exe and see the results.
    ā€¢ Test how fast it will go with several thousand lines of code and hundreds of assets.

    posted in Kode read more
  • B


    Maybe. šŸ˜ƒ

    I'm just a bit skeptical after trying to get my game running on Android and iOS and all the issues i encountered with OpenFL. And each new OpenFL version seem to break just about everything.

    So, i don't want to invest months building a game using some SDK to later turn out that tons of simple things are broken.

    I may try Kha, though, because i like the overall direction towards performance. šŸ™‚

    posted in Kode read more
  • B

    Basically i use flash to release games on various flash gaming websites and Stage3D is not supported by default. It's the only reason i use OpenFL:, to combine regular flash+native mobile.

    Anyway, if flash is not supported by default, i can't really use Kha right now.

    However, Kha does look promising and i hope i will try it out in the future.

    Thanks for letting me know.

    posted in Kode read more
  • B

    cool, will try it out. šŸ˜ƒ

    posted in Kode read more
  • B

    Will i shoot myself in the foot if i start using Kha?

    I really like the promise of "the speeds". And i am really close to switching from OpenFL to Kha. But before i invest my time, i have few questions and worries. šŸ™‚

    My current goals:
    ā€¢ Create smooth 30fps 2D games for flash platform and smooth 60fps non-battery-draining 2D games for mobile.
    ā€¢ Compile to regular Flash (not stage3D), Windows (for testing hardware rendering), Android, iOS.
    ā€¢ Keep stuff simple. šŸ™‚

    Worries about Kha:
    ā€¢ Have to install, learn and use Git and NodeJS. So basically projects are now tied with: FlashDevelop, Haxe, Git, NodeJS, Kha, Visual Studio, etc.

    So, what do i really get with Kha?
    ā€¢ Non-stage3D flash is available as target?
    ā€¢ Can i expect to get stable 60fps in a non-demanding 2D game?
    ā€¢ If i do the right things on my end, can i expect games with continuous scrolling to be smooth on Android and iOS?
    ā€¢ Do fonts work? šŸ™‚
    ā€¢ Do i have to worry if i use a feature on one platform to later find out it's "not implemented" on another platform?
    ā€¢ Do i have to worry about memory leaks in Kha library?
    ā€¢ Do i have to worry about random lag spikes caused by Kha?
    ā€¢ Does it take a year to compile to C++ like OpenFL? šŸ™‚
    ā€¢ And what about them compilation speeds in general?

    To be fair, it doesn't mean everything in Kha SDK must be flawless, but would like if basic 2D bitmap graphics and sounds are consistent and fast.

    Thanks for hearing me out.

    Any answers would be appreciated. šŸ™‚

    posted in Kode read more