Navigation

    KorGE

    • Register
    • Login
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Popular
    Log in to post
    • All categories
    • General
    • Support
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month

    • R

      Adding external Libraries
      Support • • Rainer  

      8
      0
      Votes
      8
      Posts
      30
      Views

      R

      Thanks for this hint. I added the kotlinx serilization and appled the plugin, resulting in this build.gradle.kts: import com.soywiz.korge.gradle.* buildscript { val korgeVersion: String by project val kotlinVersion: String by project repositories { mavenLocal() maven { url = uri("https://dl.bintray.com/korlibs/korlibs") } maven { url = uri("https://plugins.gradle.org/m2/") } maven { url = uri( "https://dl.bintray.com/kotlin/kotlin-dev/")} mavenCentral() } dependencies { classpath("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:1.13.2.3") classpath("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion") } } apply<KorgeGradlePlugin>() apply(plugin = "kotlinx-serialization") korge { id = "com.example.example" } repositories { mavenCentral() mavenLocal() } dependencies { add("commonMainApi", dependencyNotation = "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0") } But this wasn't enough, as I still cannot use the lib in the main.kt I think I'm missing this part, using implementation, from the given example: subprojects { apply plugin: "kotlin-multiplatform" apply plugin: "kotlinx-serialization" kotlin { jvm { ... } } js { ... } sourceSets { commonMain { dependencies { implementation kotlin('stdlib-common') implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:$serializationRuntimeVersion" ... But I faild to include something equivalent in my build.gradle.kts. I also tried to use the build,gradle from the example and adapt it, but gave up after several attempts... Maybe I have to do some serious research on gradle, gradle-kotlin-dsl and the gradle korge plugin, before I try this again... Thanks for all the help! Rainer
    • RezMike

      KorGE Tutorial - Writing 2048 game
      General • • RezMike  

      4
      1
      Votes
      4
      Posts
      50
      Views

      Yuri Volkov

      @RezMike Thank you for the tutorial and for the working game app! I think that KorGe community may be also interested in my 2048 game implementation that I created based on it. But it's not a clone of that repository: it's a rewrite aiming at becoming a (board) game template that is easy to modify, to extend and to play with using Kotlin programming language and KorGe game engine. Following this goal, the source code has been structured and cleaned. We're trying to use board games terminology (e.g. Glossary of chess) in order ease understanding of implementation logic. Please see https://github.com/andstatus/game2048
    • K

      Order of updates of views
      Support • • kooostia16  

      4
      0
      Votes
      4
      Posts
      14
      Views

      soywiz

      we can change it in KorGE 2.0 if you think it is better
    • K

      Networking examples?
      General • • kgsxr  

      4
      0
      Votes
      4
      Posts
      9
      Views

      soywiz

      I'm afraid we don't have that yet. We don't have too much resources, so we are focusing on the code. But any contribution in that direction will be awesome.
    • Didibwoy

      Vibration on smartphone
      Support • • Didibwoy  

      4
      0
      Votes
      4
      Posts
      10
      Views

      Didibwoy

      I found the solution. I had to add "supportVibration()" in the build.gradle.kts : ... korge { supportVibration() name = "..." id = "..." }
    • L

      Some questions regarding KorGe3D
      General • • LuxxorOne  

      4
      0
      Votes
      4
      Posts
      8
      Views

      L

      I see, no problem. I was expecting that this might be pretty far out there. Thanks anyways!
    • Jero Wang

      Cannot start debug mode on Android
      Support • • Jero Wang  

      4
      0
      Votes
      4
      Posts
      13
      Views

      soywiz

      Did you solve this? Do this page: https://korlibs.soywiz.com/korge/resolutions/ helps with this issue?
    • Saiful Anwar

      Text Wrapping
      General • • Saiful Anwar  

      4
      1
      Votes
      4
      Posts
      23
      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
    • Yuri Volkov

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

      4
      1
      Votes
      4
      Posts
      16
      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.
    • lem0nify

      KorGE JavaDoc
      Support • • lem0nify  

      3
      0
      Votes
      3
      Posts
      12
      Views

      soywiz

      KDoc documentation is here: https://dokka.korge.org/korge/ Yeah, not all the stuff is documented. We are working on that.
    • N

      Why is Korma's Easing interface not an enum?
      General • • nanodeath  

      3
      0
      Votes
      3
      Posts
      12
      Views

      N

      To close the loop on this, I've submitted a PR to change this in korge-next and it's been merged.
    • Jero Wang

      How to get screen width and height on Android Device?
      Support • • Jero Wang  

      3
      0
      Votes
      3
      Posts
      10
      Views

      Jero Wang

      @soywiz Thanks, I will continue to try use korge
    • L

      Tweens of anything else but position/rotation...
      General • • LuxxorOne  

      3
      0
      Votes
      3
      Posts
      4
      Views

      L

      I just found that out by myself, lol. This is so easy, I was looking to get the bytes r/g/b separate... Very cool!
    • Sujith Krishnan

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

      3
      0
      Votes
      3
      Posts
      9
      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
    • L

      Text input / Text input field?
      General • • LuxxorOne  

      3
      0
      Votes
      3
      Posts
      7
      Views

      L

      I'll try that, thanks.
    • Rishav Sharan

      How to add animated images in the game?
      Support • • Rishav Sharan  

      2
      0
      Votes
      2
      Posts
      20
      Views

      soywiz

      It is not straightforward. But you can read all the frames of the GIF and great a SpriteAnimation. Thought with a fixed frameTime even if the GIF has different frame times. You could also implement the animation image changing yourself manually. In the case is it enough for you to have a fixed frame time: import com.soywiz.korge.* import com.soywiz.korge.view.* import com.soywiz.korim.bitmap.* import com.soywiz.korim.color.* import com.soywiz.korim.format.* import com.soywiz.korio.file.std.* suspend fun main() = Korge(width = 512, height = 512, bgcolor = Colors["#2b2b2b"]) { val frames = resourcesVfs["ed3002fb3b703f38807ddb7da020169d.gif"].readBitmapImageData(GIF).frames val frameTime = frames.first().time val animation = SpriteAnimation(frames.map { it.bitmap.slice() }, frameTime) val sprite = sprite(animation) sprite.playAnimationLooped(animation) }
    • Adam Brown

      Cross platform coroutines?
      General • • Adam Brown  

      2
      0
      Votes
      2
      Posts
      20
      Views

      soywiz

      Check these links: https://github.com/Kotlin/kotlinx.coroutines/issues/1147 http://blog.davidvassallo.me/2020/01/15/kotlin-coroutines-flow-parallel-processing/
    • snaulX

      How make animation slower?
      Support • • snaulX  

      2
      0
      Votes
      2
      Posts
      10
      Views

      Nico

      Hi. you can use the parameter spriteDisplayTime = 200.milliseconds Check out these videos to see how it works: https://youtu.be/fY7a2xrHL9g https://youtu.be/atElzA2jYkQ
    • I

      ECS and Shaders
      General • • ilum  

      2
      0
      Votes
      2
      Posts
      8
      Views

      soywiz

      I think we discussed that on slack/discord already. No ECS provided by the engine, but some people talked about that stuff via chat, so not sure if someone will work on a ECS engine. Regarding to shaders: Shaders on KorGE are usually applied via filters, and created using a DSL for that. Please, check this link: https://github.com/korlibs/korge/blob/16aac42d6cf0e4eed19e088e12b73282661cf0f4/korge/src/commonMain/kotlin/com/soywiz/korge/view/filter/WaveFilter.kt#L31-L40
    • B

      How to read quantization tables of JPEG files with korim?
      Support • • BioGeek  

      2
      0
      Votes
      2
      Posts
      12
      Views

      soywiz

      Just for the record: https://github.com/korlibs/korim/issues/56