https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
korge
  • r

    Rachid

    07/02/2020, 7:21 PM
    Hey, beginner to KorGE here. I can't find out how do do something simple as: drawing a circle with a border. So the border should have another color than the filling. I followed the tutorials on the website/youtube. And went through all the korge-samples. Only thing I found what looks related is
    fillStroke
    , but I have no idea how to apply this in a clean hello world where I only draw a circle...
    p
    n
    • 3
    • 26
  • r

    Rachid

    07/03/2020, 8:46 AM
    Related to my previous question. Any idea why when I draw a circle with filling the
    onClick
    and
    onOver
    doesn't work?
    // clicking DOES work
    	val cicleStroke = graphics {
    		stroke(
    			ColorPaint(Colors.RED),
    			Context2d.StrokeInfo(thickness = 1.0)
    		) {
    			circle(0.0, 0.0, 40.0)
    		}
    	}.xy(100.0, 100.0)
    	cicleStroke.onClick {
    		println("Clicked cicleStroke")
    	}
    // clicking does NOT work
    	val circleFilled = graphics {
    		fillStroke(
    			ColorPaint(Colors.LAWNGREEN),
    			ColorPaint(Colors.BLACK),
    			Context2d.StrokeInfo(thickness = 1.0 )
    		) {
    			circle(0.0, 0.0, 30.0)
    		}
    	}.xy(200.0, 100.0)
    	circleFilled.onClick {
    		println("Clicked circleFilled")
    	}
    n
    d
    • 3
    • 14
  • r

    Rachid

    07/03/2020, 9:01 AM
    Another thing I stumble upon regularly is that it's hard for me to get code samples working. Maybe I'm missing out on something. But doing the tutorials and looking at the docs is not sufficient for me. So if you have other references please let me know. So for example tweens at: https://korlibs.soywiz.com/korge/animation/#simple-interface when copy the line (apply it to the circleFilled of my previous message)
    circleFilled.tween(circleFilled::x[10.0, 100.0], time = 1000)
    I got the compilation error:
    'operator' modifier is required on 'get' in 'kotlin.reflect.KMutableProperty0'
    Type mismatch.
    Required: V2<*>
    Found: Double
    Can it be that I'm using a version that's newer than when the docs were written?
    d
    • 2
    • 13
  • t

    tobsef

    07/03/2020, 8:16 PM
    A click Event is blocked by a overlaying Container. The hitTest of a Container only uses the bounds which contains all views. So it's not possible the click the green box with index 0. The Container above consumes the click events, because it spreads over the whole screen. Can we use the unused HitTestType of View to change from Bounding to Child? This default Container implementation seems to be not very intuitive and leads to strange behavior (
    Container#getLocalBoundsInternal
    ). It was hard to get out, why my click event doesn't work. It seems to be a performance optimization.
    suspend fun main() = Korge(width = 512, height = 512) {
    
        solidRect(100, 100, color = GREEN) {
            centerOn(this@Korge)
            onClick {
                color = if(color == GREEN) BLUE else GREEN
            }
        }
    
        container {
            solidRect(100, 100, color = RED) {
    
            }
            solidRect(100, 100, color = RED) {
                alignRightToRightOf(this@Korge)
            }
            solidRect(100, 100, color = RED) {
                alignBottomToBottomOf(this@Korge)
            }
            solidRect(100, 100, color = RED) {
                alignBottomToBottomOf(this@Korge)
                alignRightToRightOf(this@Korge)
            }
        }
    
    }
    🤔 2
    r
    • 2
    • 3
  • c

    Caleb Hulbert

    07/04/2020, 2:09 AM
    I noticed that KorUI is reference in the documentation, and links to the korgw repository, but also it seems to mention that it is old? And I cannot seem to use it in my korge project. Is KorUI still supported? If not, are there other alternatives? I know there are some
    ui
    Views, like
    uiButton
    ,
    uiComboBox
    , etc.
    r
    d
    • 3
    • 5
  • r

    Rachid

    07/05/2020, 7:59 PM
    Does anyone has an example how to use the WebSocketClient of korIO? On https://korlibs.soywiz.com/korio/#websocket-client is only the class itself, but no sample of how to interact with it. Pointers to how
    Signal
    work are also welcome
    t
    • 2
    • 4
  • n

    Nico

    07/08/2020, 6:04 AM
    Good morning guys. After some requests, we added a discord channel to our portfolio which is much easier to join than the slack channel.Check it out here: https://discord.gg/jKCxCHn
    p
    r
    r
    • 4
    • 5
  • g

    Gabe97330

    07/08/2020, 6:40 AM
    In thinking about KorGE 2.0 and alternative applications of KorGE and Korlibs I am struggling with how to best follow developments and contribute, given that I’m easily 😕. My assumption is that Github issues are a good intermediate point between real-time discussion in slack/forums at one end and code and documentation at the other. Assuming that Github issues are used for intermediate level sharing, do the project maintainers have a preference for how to track issues that may be spread over one or more korlib libraries and are not yet clearly scoped? My guess would be to apply them as a parent tracking issue to either the korlibs project or the korGE project and then have leaf issues at the project level as they become clearer. Two example features I would like to help develop and track are enhanced text support and video. It would be great to have high level tracking issues to keep track of child and related to the parent issue, at least for me.
    ➕ 1
    d
    • 2
    • 11
  • s

    SerVB

    07/09/2020, 10:25 PM
    https://github.com/korlibs/korge/issues/164#issuecomment-656269309 what's the discussion there? Are you going to stream?
    r
    d
    n
    • 4
    • 13
  • r

    Rachid

    07/10/2020, 12:03 PM
    I have drawn a line with:
    val line = graphics {
            stroke(
                ColorPaint(Colors.LIGHTGRAY),
                Context2d.StrokeInfo(thickness = 1.0)
            ) {
                moveTo(e1.v1.pos.x + VERTEX_RADIUS, e1.v1.pos.y + VERTEX_RADIUS)
                lineTo(e1.v2.pos.x + VERTEX_RADIUS, e1.v2.pos.y + VERTEX_RADIUS)
            }
    Is it possible to change the color of this line afterwards? If not, what should I use to draw the line instead?
    d
    • 2
    • 14
  • p

    Pablo Caviglia

    07/13/2020, 8:09 PM
    hi, what's the next sprint start date for korlibs?
    r
    d
    • 3
    • 11
  • r

    Rishav Sharan

    07/14/2020, 12:21 PM
    Is there any issue which discusses the planned changes to the Camera in 2.0?
    r
    • 2
    • 3
  • p

    Pablo Caviglia

    07/14/2020, 2:53 PM
    hey, does someone got ever into this error while trying to execute runAndroidDebug task ?
    Caused by: org.gradle.tooling.BuildException: Failed to process /home/paul/devel/projects/tool_framework_multi_platform/build/platforms/android/build/tmp/kotlin-classes/debug
    
    Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
    
    Caused by: java.lang.UnsupportedOperationException
    d
    r
    • 3
    • 32
  • p

    Pablo Caviglia

    07/14/2020, 3:19 PM
    is it ok to apply this plugin version?
    korgePluginVersion=1.14.0.0
    d
    • 2
    • 49
  • m

    Michal Janos

    07/18/2020, 3:36 PM
    Hi I'm new with kotlin, so my question may be stupid, but are there someone, who have correctly implement
    klock
    to multiplatform? I have implemented 1.11.13, everything works fine, with using
    npm link
    , but it is not possible to publish it to my private nexus NPM repo what I try, is to change package.json, and change it to my scope before publish, this help me with
    kotlin-source-map-loader
    , but
    klock
    create
    require('klock-root-klock')
    on end of generated js file kotlin multiplatform 1.3.72
    d
    • 2
    • 1
  • p

    Philipp Karlsson

    07/20/2020, 12:02 PM
    Hi there. I have a question about using Klock in multiplatform kotlin projects. I have a backend, multiplatform and frontend module with gradle. The backend and fronted use the model from the multiplatform with the kotlinx-serialization-runtime. The backend works as expected but the fronted always came up with error messages like a missing compareTo-function. With Serialization I get Serializer has not been found for type 'DateTimeTz' Example: (Multiplatform)
    data class(dates: List<DateTimeTz>)
    (Frontend after receiving the objects)
    console.log(it.dates[0])
    --> Objects look like:
    Object { adjusted: 1577667600000, offset: 3600000 }
    Error during:
    console.log(DateFormat("dd.MM.yyyy").format(it.dates[0]))
    I just included the implementations for multiplatform, jvm and js. The communication between backend and frontend is via REST. If I remove the serialization, I get error messages like missing compareTo functions.
    d
    • 2
    • 1
  • d

    Deactivated User

    07/25/2020, 5:43 PM
    Hey guys, just did a webinar about making a connect-four in Spanish. But before that I did the same locally in English. How to make a testable Connect-4 in Kotlin and KorGE:

    https://www.youtube.com/watch?v=F2UmKH0L-6A▾

    a
    r
    +2
    • 5
    • 7
  • r

    Rishav Sharan

    07/27/2020, 6:27 PM
    I just tried to update Korge to latest version by changing the build.gradle.kts dependency to 1.15
    dependencies {
    		classpath("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:1.15.0.0")
    	}
    }
    On compiling, I am getting this error
    A problem occurred configuring root project 'korpg'.
    > Could not resolve all artifacts for configuration ':classpath'.
       > Could not find com.android.tools.build:gradle:3.6.0.
         Searched in the following locations:
           - file:/C:/Users/risharan/.m2/repository/com/android/tools/build/gradle/3.6.0/gradle-3.6.0.pom
           - <https://dl.bintray.com/korlibs/korlibs/com/android/tools/build/gradle/3.6.0/gradle-3.6.0.pom>
           - <https://plugins.gradle.org/m2/com/android/tools/build/gradle/3.6.0/gradle-3.6.0.pom>
           - <https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.6.0/gradle-3.6.0.pom>
         Required by:
             project : > com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:1.15.0.0
    
    Possible solution:
     - Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
    d
    • 2
    • 2
  • n

    Nico

    08/02/2020, 1:18 PM
    Hey guys. We got so many news for you Korge 2.0, new homepage, patreon!!

    https://www.youtube.com/watch?v=H4vMPpihqdw▾

    🔥 5
    🤯 1
    a
    r
    • 3
    • 2
  • j

    ja.son

    08/03/2020, 11:57 PM
    Is there any game made with Korge that can be downloaded from Google Play?
    d
    • 2
    • 1
  • j

    ja.son

    08/04/2020, 12:31 AM
    Is it possible to do 3D with Korge?
    d
    d
    • 3
    • 2
  • j

    ja.son

    08/04/2020, 12:37 AM
    Is it possible to use AR as a game engine for Android native? I'm using gamePlay3D and coos2D now.
    d
    • 2
    • 4
  • d

    Dave

    08/05/2020, 2:24 PM
    Is a kotlin 1.4.0-rc version of korio, etc likely in the next few days ?
    d
    • 2
    • 3
  • d

    Dave

    08/05/2020, 2:37 PM
    I think that the dependency image in 'https://korlibs.soywiz.com/' needs an update. A click on korui gives an error 404. Is korui still active ?
    d
    • 2
    • 9
  • d

    Dave

    08/06/2020, 1:12 PM
    What about korgw? how does that releate to korge and korui ?
    r
    d
    • 3
    • 5
  • f

    fkrauthan

    08/06/2020, 4:37 PM
    and KorGE on the Web is using WebGL and WebGL only correct? No Canvas fallback?
    d
    • 2
    • 23
  • c

    CLOVIS

    08/13/2020, 8:22 PM
    Hi! I'm trying to start doing gamedev with a personnal project for fun, and I thought it'd be even better to do it in Kotlin. This library looks great, but the documentation (https://korlibs.soywiz.com/korge/3d/) seems to say 3D is not ready yet, and the links are dead. What do you think?
    d
    d
    • 3
    • 3
  • d

    Dave

    08/19/2020, 8:58 AM
    When using Korge, does one have to define/create all the views up-front. Or can one dynamically add views to a scene whilst it is running ?
    d
    • 2
    • 5
  • d

    Dave

    08/24/2020, 10:02 AM
    Is anyone else woking on the UI stuff or the 3D stuff ? I would like to make some additions and provide a pull request.
    d
    • 2
    • 11
  • l

    laith

    08/31/2020, 11:39 PM
    Hi all, is there a support for playing 360 video ?
    r
    • 2
    • 2
Powered by Linen
Title
l

laith

08/31/2020, 11:39 PM
Hi all, is there a support for playing 360 video ?
r

RezMike

09/01/2020, 7:12 AM
Probably, no. We haven't done anything special in this direction
l

laith

09/01/2020, 8:52 PM
I see, thanks
View count: 2