https://kotlinlang.org logo
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
  • p

    Pablo Caviglia

    11/16/2020, 4:40 PM
    hi people, i’m trying to build ios. It used to work but after upgrading to korge 2 i’m getting this: * What went wrong: Could not determine the dependencies of task ‘:copyIosResources’.
    Task with path ‘genResources’ not found in root project ‘tool_framework_multi_platform’.
    d
    • 2
    • 78
  • d

    Dave

    11/17/2020, 7:20 PM
    hi, I'm trying to use the latest from korge-next, and I am now getting this error, "class com.soywiz.kmem.BufferJvmKt tried to access abstract method java.nio.ByteBuffer.slice(II)Ljava/nio/ByteBuffer; (com.soywiz.kmem.BufferJvmKt is in unnamed module of loader 'app'; java.nio.ByteBuffer is in module java.base of loader 'bootstrap')" any ideas?
    d
    • 2
    • 68
  • j

    ja.son

    11/18/2020, 2:20 AM
    I'm developing an Android app through Android Studio, so can I apply ui through korge to some screens?
    d
    p
    • 3
    • 15
  • p

    Pablo Caviglia

    11/23/2020, 2:40 PM
    hi, were someone able to check the genResources-not-found-folder bug on the 2.0.0.2-rc2 plugin build ?
    d
    • 2
    • 124
  • p

    Pal Matolay

    11/24/2020, 8:01 PM
    Is KorGE a good option to create app (that isn’t a game)?
    d
    c
    +2
    • 5
    • 9
  • p

    Pablo Caviglia

    11/29/2020, 12:06 PM
    hi, if I setup the idea plugin and configure it like this, shouldnt it download korge’s code alongside the libraries?
    idea {
        module {
            setDownloadJavadoc(true)
            setDownloadSources(true)
        }
    }
    d
    k
    • 3
    • 60
  • d

    Deactivated User

    11/30/2020, 1:15 AM
    🎉🎉🎊 KorGE 2.0 Released! https://blog.korge.org/korge-2-0/
    ❤️ 2
    🎉 10
    :kotlin-intensifies: 13
    👍 2
    p
    n
    n
    • 4
    • 4
  • a

    Alexey Chuprin

    12/01/2020, 9:07 AM
    Hi, I'm setting
    targetJs()
    , call
    ./gradlew jsWeb
    , but gradle says
    Task 'jsWeb' not found in root project...
    . What could be the problem?
    s
    d
    • 3
    • 4
  • s

    solidogen

    12/01/2020, 4:05 PM
    When I use box2d, cleanup doesn't seem to work well. When I change scene, I keep bumping into (invisible) bodies of previous scene sprites. I wonder if it is related to https://github.com/korlibs/korge/issues/144
    d
    • 2
    • 3
  • m

    Michael Sigl

    12/01/2020, 5:27 PM
    Hi, I'm trying to build a simple 2D-physics engine, but for huge numbers of objects realtime-Physics are not a good concept. So I had the idea to pre-calculate a full simulation and save the data of every object and every frame in a text file. Then I wanted to read the text-data with korge (for example like .xml) and recreate all frames by creating the objects in korGE and move them as the text file describes it. So actually I want to create every frame with graphical objects in korge, take a "screenshot" of the actual situation and save it as png. After doing that for all frames, the images are put into an animated .gif, and so you can watch the full physics-simulation. But how is it possible to create objects in korge and then save the actual screen as .png? Or is there maybe a better way to do non-realtime-physics-simulation?
    d
    • 2
    • 2
  • p

    Pablo Caviglia

    12/01/2020, 5:53 PM
    hi guys, is there a way to generate an iOS .framework from a korge project ?
    d
    • 2
    • 8
  • m

    Michael Sigl

    12/02/2020, 4:05 PM
    Hi, is there any way to create an animated .gif from a set of images generated with
    bitmap.writeTo(localvfs("file.png"), PNG)
    , so that they are played like an animation? I know how do to it in Java, but I cannot import .java classes into korge
    d
    • 2
    • 5
  • k

    kartikpatodi

    12/03/2020, 3:47 PM
    p
    d
    n
    • 4
    • 15
  • m

    Max

    12/03/2020, 10:16 PM
    Is it possible to use Korge in a Kotlin JS project?
    :yes: 1
    m
    d
    • 3
    • 15
  • p

    Pablo Caviglia

    12/05/2020, 5:48 AM
    guys, how u doing? had a weird problem while trying to build an android output on a brand new dev machine. while trying to run the ‘bundleAndroid’ task I got an error saying that the file ‘projectFolder/build/platforms/android/local.properties’ didnt exist. the only way to make it work was to create the folders ‘platforms/android/’ and later the file local.properties with the sdk.dir in it
    d
    • 2
    • 10
  • m

    Michael Sigl

    12/06/2020, 11:57 AM
    Hi, I tested some of the new tiled-map features in Korge 2.0. But is it possible to load animated Tiles in Korge, which were animated in Tiled Map Editor before?
    n
    r
    • 3
    • 3
  • j

    jeff

    12/08/2020, 2:50 AM
    Any documentation available on camera manipulation? I'm just trying to move around the default camera but nothing seems to do it...
    suspend fun main() = Korge(width = 1920, height = 1080) {
    
            val mainTree = resourcesVfs["main.ktree"].readKTree(views)
            addChild(mainTree)
    
            val board = mainTree["board"].first as Image
            val camera = camera {
                this.centerOn(board)
            }
    }
    s
    • 2
    • 2
  • m

    Mayank

    12/15/2020, 12:33 PM
    Hi, I'm having trouble understanding the threading model in Korge. Currently it seems to me that Korge is single threaded, I may be wrong. I was wondering if there is any doc which explains it or can someone help me out
    a
    d
    p
    • 4
    • 39
  • j

    jeff

    12/15/2020, 10:32 PM
    Getting this error during my build -- any advice? Doesn't appear to be causing any user-facing issues (yet)
    > Task :korgeProcessedResourcesJvmMain
    java.lang.IllegalStateException: textures:4 > maxTextures:1
    	at com.soywiz.korim.atlas.AtlasPacker.packPairs(AtlasPacker.kt:28)
    	at com.soywiz.korim.atlas.AtlasPacker.pack(AtlasPacker.kt:20)
    	at com.soywiz.korim.atlas.AtlasPacker.pack$default(AtlasPacker.kt:19)
    	at com.soywiz.korge.atlas.AtlasResourceProcessor.processInternal$suspendImpl(AtlasResourceProcessor.kt:44)
    	at com.soywiz.korge.atlas.AtlasResourceProcessor$processInternal$1.invokeSuspend(AtlasResourceProcessor.kt)
    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
    	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
    	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    	at com.soywiz.korge.resources.ResourceProcessorRunner.run(ResourceProcessorRunner.kt:52)
        ...snip...
    d
    • 2
    • 4
  • m

    Max

    12/16/2020, 9:04 AM
    I have a issue with tweens when working with korge-js:
    val view = SolidRect(width = 20.0, height = 5.0, color = Colors.RED)
    view.tween(view::x[10.0, 100.0], time = 1000.milliseconds)
    view.tween(*view::x*[10.0, 100.0], ...) does not work as view.x is Koltin.Double and not KMutableProperty Am i doing something wrong or does this not work when i am using korge-js and not the common api?
    d
    j
    +2
    • 5
    • 14
  • j

    jeff

    12/19/2020, 5:01 AM
    Once I've set up a click listener with e.g.
    myView.onClick { ... }
    is there a way to clear/remove that listener? Couldn't find anything in the documentation...
    r
    • 2
    • 5
  • t

    Tom Baku

    12/20/2020, 1:54 PM
    Hi all, joined this channel some minutes ago and directly have a question. Some days ago I started with the 2048 Tutorial. The tutorial is not quite up to date but i could figure out the most changes that I need to do until step 3. In Step 1 the usage of the "graphics" method is shown and the documentation say "...position relative to its Graphics container...". But for me its not working and the position is not relative This is my graphics method.
    graphics {
            position(leftIndent, leftIndent)
            fill(Colors["#cec0b2"]) {
                roundRect(cellSize, cellSize, 3.0) {
                    position(10, 10)
                }
            }
        }
    It seems that the first position method with leftIndent and leftIndent as parameters is not working. For me that roundRect is positioned at 10, 10. I would expect that 10, 10 is added to leftIndent for x and y. I am sure that I misuse the parameters or have something configured wrongly. Any idea? Thx for help
    r
    • 2
    • 8
  • j

    jeff

    12/21/2020, 2:29 AM
    Is there no way to list all components attached to a view?
    d
    • 2
    • 4
  • l

    Lazard

    12/21/2020, 10:50 AM
    Hi, is there a way to trigger on a collision exit rather than on a collision enter (sprite.onCollision) ? I can use hitTest inside an updater to do it manually but I cannot use shapes with this method. (I want to detect when a player is falling down a platform for example.) Thanks for you help 🙏
    m
    d
    • 3
    • 4
  • p

    Pablo Caviglia

    12/21/2020, 4:36 PM
    hi people, i'm having troubles using korge as a view in iOS. When I exit the swift view, and then create a new view with korge I get this: glError: 1281 INVALID_VALUE calling useProgram(1) = kotlin.Unit kotlin.Exception: glError: 1281 INVALID_VALUE calling useProgram(1) = kotlin.Unit
    d
    • 2
    • 7
  • j

    jeff

    12/21/2020, 11:02 PM
    Can
    Container
    be given an anchor? Or is there an alternative that can? I have two views that I want to scale up and down together. I put them in a container thinking I could just change the container's `scale`but doing so makes them move as they scale, since they're using the parent container's "anchor" which is just the grandparent's origin. Thoughts? (apologies for all the questions, and thanks to everyone who's been responding!)
    m
    • 2
    • 3
  • p

    Pablo Caviglia

    12/22/2020, 10:39 AM
    hi! anyone had success trying to run korge-next samples? I’m getting this:
    m
    • 2
    • 5
  • l

    Lazard

    12/23/2020, 7:12 PM
    Hello everyone ! Does KorGE currently supports Box2D with KTree ? I'm not able to make my Box2D object collide with the level (loaded from a ktree file) even after adding Box2D physics
    • 1
    • 3
  • p

    Pablo Caviglia

    12/27/2020, 4:20 AM
    hi all, touch events question, I have two views on the hierarchy, and they work pretty well in relation to the touch events hierarchy. If i have view B on top of view A, I get the touch events correctly triggered by view B, and view A events are ignored or so. This behavior works by implementing the method onClick. The problem arise when I implement the methods onDown and onUp on view A. In this case even when view B is on top of view A, the onUp and onDown events of View A gets processed … ideas ?
    d
    • 2
    • 10
  • m

    Michael Sigl

    12/27/2020, 9:57 AM
    Hello everyone Is it possible to create a Polygon-View in korge by defining all vertices? I want to create a PolygonShape in Box2D (for example a hexagon) and attach a correct view to it. Thanks
    m
    • 2
    • 1
Powered by Linen
Title
m

Michael Sigl

12/27/2020, 9:57 AM
Hello everyone Is it possible to create a Polygon-View in korge by defining all vertices? I want to create a PolygonShape in Box2D (for example a hexagon) and attach a correct view to it. Thanks
m

Mayank

12/27/2020, 10:09 AM
Hi Michael You can use ShapeView which takes a VectorPath to define a polygon view.
View count: 10