KorGE

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    Log in to post
    • All categories
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • J

      Can't use config module
      Support • • jamade

      1
      0
      Votes
      1
      Posts
      6
      Views

      No one has replied

    • P

      Change Scenes without Dependencies lead to OutOfMemory Exception?
      Support • • pixelprodukt

      5
      0
      Votes
      5
      Posts
      50
      Views

      X

      I believe the problem is that the garbage collection doesn't ever kick in when switching scenes. So as you continue to switch between scenes, the number of allocated objects increase, thus resulting in a OOM.

      Personally, I don't understand much about how garbage collection works for a multiplatform project/JVM myself so will need to do some research.

      Also it seems like System.gc() is not available for a multiplatform project, so you can't activate garbage collection yourself.

      https://youtu.be/NIQ6yylux94

    • X

      More video tutorials for Korge
      General • • XenoTactic

      1
      0
      Votes
      1
      Posts
      56
      Views

      No one has replied

    • O

      Kotlin serialization not working on JS
      Support • • ollesate

      1
      0
      Votes
      1
      Posts
      89
      Views

      No one has replied

    • Z

      anyone know why this doesn't work?
      Support • • Zukoix

      2
      0
      Votes
      2
      Posts
      104
      Views

      Z

      got it to work and I don't know how

    • G

      Networking in browser
      Support • • Gal Bachar

      1
      0
      Votes
      1
      Posts
      93
      Views

      No one has replied

    • V

      Good way to draw updating lines?
      Support • • Vapid

      1
      0
      Votes
      1
      Posts
      88
      Views

      No one has replied

    • Saravanane Manicome

      Is there any way to set the game window to scale full screen on Android ?
      Support • • Saravanane Manicome

      2
      0
      Votes
      2
      Posts
      144
      Views

      soywiz

      You can set the orientation on gradle:

      https://github.com/korlibs/korge-plugins/blob/master/korge-gradle-plugin/src/main/kotlin/com/soywiz/korge/gradle/KorgeExtension.kt#L230

      // build.gradle korge { orientation = Orientation.PORTRAIT fullscreen = true }

      And on your fun main IIRC:

      fun main() = Korge(fullscreen = true) { }
    • R

      Adding external Libraries
      Support • • Rainer

      9
      0
      Votes
      9
      Posts
      3608
      Views

      T

      I have the same issue. I was able to get my package to download via

      repositories { // https://stackoverflow.com/questions/59413364/upgrading-from-gradle-5-1-1-to-6-0-1-breaks-kotlin-multiplatform-build jcenter { metadataSources { gradleMetadata() mavenPom() } } jcenter() } dependencies { add("commonMainApi", "com.github.glwithu06.semver:semver:1.0.1") }

      but I cannot resolve it in my code, it's like it's not on the classpath
      I also tried using

      plugins { java } dependencies { implementation("com.github.glwithu06.semver:semver:1.0.1") }

      but does not even add it to my external dependencies (although it's downloaded and it's in my modules-2 gradle cache folder along with sources jar, main jar and pom.xml

      any ideas?

    • E1e5en

      Handling liquids
      General • • E1e5en

      1
      0
      Votes
      1
      Posts
      85
      Views

      No one has replied

    • Yuri Volkov

      High CPU usage when game is idle
      General • • Yuri Volkov

      4
      1
      Votes
      4
      Posts
      171
      Views

      Yuri Volkov

      @soywiz said in High CPU usage when game is idle:

      This is not currently implemented, but could be implemented in a future version. Both not flipping the buffer and adjusting the fps.

      Thank you @soywiz . I created https://github.com/korlibs/korge-next/issues/176 for this.

    • Yuri Volkov

      Publishing KorGe-based apps in the F-Droid repository - Android Open Source app market
      General • • Yuri Volkov

      2
      0
      Votes
      2
      Posts
      72
      Views

      Yuri Volkov

      I also created the issue to allow downloading KorGe artifacts via JCenter: https://github.com/korlibs/korge-next/issues/121

    • Jero Wang

      Why the text widget centerOn() method is notwoking?
      General • • Jero Wang

      2
      0
      Votes
      2
      Posts
      60
      Views

      Yuri Volkov

      I also noticed that centerOn stopped working (at least in some cases) after some KotGe library upgrade.
      And I easily changed this to the manually calculated positioning ( position(x, y) )
      E.g. in https://github.com/andstatus/game2048/blob/master/src/commonMain/kotlin/org/andstatus/game2048/presenter/Block.kt I changed:

      centerOn(this@graphics)

      to

      position(cellSize / 2, cellSize / 2)
    • Никита Денисов

      How to create a level similar to the mario level from the snake that was written for the competition?
      General • • Никита Денисов

      1
      0
      Votes
      1
      Posts
      83
      Views

      No one has replied

    • Saiful Anwar

      Text Wrapping
      General • • Saiful Anwar

      4
      1
      Votes
      4
      Posts
      137
      Views

      Yuri Volkov

      @Saiful-Anwar Thank you for the contribution!
      I only had to fix it a bit 🙂 and add wrapping for e.g. Chinese texts,
      and it works well for my Help screen.
      https://github.com/andstatus/game2048/blob/master/src/commonMain/kotlin/org/andstatus/game2048/view/WrappableText.kt
      help_zh.png

    • I

      How do we handle long press?
      General • • IMBurnin

      2
      0
      Votes
      2
      Posts
      106
      Views

      I

      ended up doing this.:

      var down = false onDown { down = true GlobalScope.launch { delay(500) if (down) { // do the thing } } } onUp { down = false }
    • G

      Integration with existing apps
      General • • Gwekabel

      1
      0
      Votes
      1
      Posts
      75
      Views

      No one has replied

    • I

      How to load isometric tilesets?
      General • • IMBurnin

      1
      0
      Votes
      1
      Posts
      88
      Views

      No one has replied

    • Bart Kors

      rotation point when rotating a sprite
      Support • • Bart Kors

      2
      0
      Votes
      2
      Posts
      100
      Views

      soywiz

      That's called "anchor" on KorGE. image.anchor(0.5, 0.5) should do the trick

    • Sujith Krishnan

      Availability of korlibs libraries in npm registry
      Support • • Sujith Krishnan

      3
      0
      Votes
      3
      Posts
      59
      Views

      Sujith Krishnan

      My final output of the Kotlin multiplatform project is

      JS (node module) library JVM lib (jar).

      All good with projects which using my JVM jar as the pom XML have the korlibs (JVM jars) from maven. The issue is with JS projects using my js library.
      So, to answer your question, YES, I am consuming it from a NodeJS project, which expects the js version of these libraries to present in the npm registry.

      I can see a question already there for klock w.r.t this.
      https://github.com/korlibs/klock/issues/54