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
gamedev
  • o

    orangy

    10/21/2018, 9:21 AM
    You can replace it with this:
    suspend fun run() {
         while(true) {
              …
              val dt = nextFrame() // suspending call
         }
    }
    In this case complex logic can be encapsulated inside a function and a lot of state machine complexity is generated by a compiler. E.g. loops, branches, etc.
    d
    • 2
    • 1
  • j

    jo

    12/22/2018, 5:21 PM
    This may be more of an IntelliJ issue, but I don't see a subforum for that. Is anyone else getting "Gradle project sync failed. Basic functionality will not work properly." no matter what after reopening a Gradle project? I don't get it the first time after import, but if I close and reopen IntelliJ I get it.
    s
    • 2
    • 1
  • r

    Ryan Abraham

    01/06/2019, 6:54 PM
    Hey guys, I'm new here and I'm really interested in making a simple online Android game with Kotlin (MMO-ish style, like first milestone is just empty room you can move around and see other players). Would using Zircon+LibGDX be a good start with a node or Golang server and use websockets? I came across this https://developers.google.com/games/services/android/realtimeMultiplayer and just wondering where is the right place to start with this
    o
    a
    • 3
    • 15
  • d

    Dominaezzz

    02/01/2019, 10:40 AM
    Hi! So I want to create a thin OpenGL wrapper that targets every platform that Kotlin supports (including wasm). So it'll call to either OpenGL, OpenGL ES or WebGL where appropriate. I have started basic code generation from the official registry but I'm stuck on design and would like some input/tips/advice. 1) `expect`/`actual` or common interface for the commands. I haven't really used ES or WebGL so I'm not sure which will work better for versioning. 2) Top level functions or an object pass around to call gl commands on. 3) Strongly typed enums or plain old `Int`s. 4) Should this be shipped as a gradle plugin that generates the bindings in your project or just ship the generated library. 5) Any idiomatic Kotlin ideas? 6) Should this be in a channel of its own?
    a
    d
    • 3
    • 9
  • p

    pererikbergman

    04/01/2019, 3:02 PM
    Hi, I am just about to start writing my own MMO server, mostly for learning. I am looking for some resources, theory etc. about the subject. Of course I will write it in kotlin 🙂
    ➕ 3
    t
    t
    • 3
    • 4
  • e

    elect

    04/09/2019, 2:33 PM
    is there a way to retrieve all the generated gl objects? (buffers, textures, etc..)
    d
    • 2
    • 2
  • a

    addamsson

    05/21/2019, 2:34 PM
    @veiset have you tried using #zircon for your game? Seems like a suitable choice for you
    v
    • 2
    • 3
  • j

    jdiaz

    06/06/2019, 9:39 PM
    Is it possible to use Imgui to render and have one window with a libgdx image? I've seen the example in the wiki and it seems the opposite
    :yes: 1
    • 1
    • 2
  • s

    sksk

    06/17/2019, 6:35 PM
    that's kinda sad to have to rely on C++ to have decent performance, if Valhalla ever get released, can we expect android's java to support it aswell ?
    🤔 1
    🙄 1
    g
    • 2
    • 16
  • a

    addamsson

    07/08/2019, 7:32 AM
    Hi there! I've just finished a tutorial series I've been working on: https://www.reddit.com/r/Kotlin/comments/c9z5bs/how_to_make_a_roguelike_in_kotlin/
    :kotlin: 1
    👍 7
    d
    • 2
    • 2
  • v

    veiset

    12/11/2019, 7:30 AM
    I wrote a short article on how to get started with LibGDX 🎮 https://kotlin.christmas/2019/11
    👍 10
    s
    t
    • 3
    • 4
  • j

    John

    12/22/2019, 5:14 PM
    I feel like anything like vert.x would be good
    j
    • 2
    • 1
  • d

    Dominaezzz

    01/10/2020, 10:15 PM
    message has been deleted
    j
    • 2
    • 1
  • r

    raniejade

    02/15/2020, 6:21 AM
    Howdy #gamedev folks! I recently released a Kotlin Native binding for Godot. Documentation and release notes are available at https://godot-kotl.in. Feedback is definitely welcome 🙂
    ❤️ 6
    👏 12
    j
    • 2
    • 1
  • j

    jk2018

    02/15/2020, 7:45 PM
    You wrote in the README" "Kotlin Native's compile times are horribly slow" ... I noticed that too when I was playing around with a rather small windows console app in Kotlin/Native.
    r
    • 2
    • 1
  • k

    kennycason

    03/12/2020, 6:20 PM
    Sorry if this is spammy, but after a few years of dev I finally released my Ninja Turdle 2d platformer on steam. It’s all in Kotlin! Originally I started in Java, but then fell in love with Kotlin and ported the code base to Kotlin and never looked back. Was an amazing experience. I now love Kotlin 100x more than when I started and even use Kotlin for everything at my new startup. :) I plan on posting a couple technical blog posts about my learnings along the way and things I wish I knew earlier on.
    👏 3
    e
    k
    • 3
    • 2
  • i

    Igor Yankovsky

    05/14/2020, 7:25 AM
    Hi guys! I wonder if there any kotlin dsl to build typesafe glsl programs?
    d
    • 2
    • 1
  • m

    Max

    06/10/2020, 9:49 AM
    Hello everyone! Anyone have experience doing kotlin js games using Phaser? Currently struggling setting up a working project. There seems to exist two kotlin wrappers for Phaser. First: https://github.com/hiperbou/kotlin-phaser seems to be good but i cannot get it to work with a multiplatform project(doing web game with jvm backend). @hiperbou Then there is: https://gitlab.com/nanodeath/phaserkt but that seems to be not support the phaser api enough to do a basic game. @nanodeath A third option would be to use Dukat and generate kotlin wrapper from the phaser typscript bindings. But there seems to be a lot of issues with Dukat and this path might be alot of work. I just want to get something up and running. Have anyone looked at this and could give me some pointer on how to do this? A link to some project i can look at would be great! 🙂
    h
    • 2
    • 8
  • m

    Michał Kalinowski

    06/11/2020, 9:48 AM
    Hey guys, is there any nice freetype JNI binding?
    h
    j
    e
    • 4
    • 7
  • j

    Juan Medina

    08/12/2020, 5:16 PM
    Hi guys, I've been working on a cross-platform ECS, if you don't mind to take a look and give feedback I'll really appreciate it. Thanks! https://juan-medina.github.io/kecs/
    r
    m
    • 3
    • 26
  • c

    czyzby

    12/11/2020, 8:41 PM
    Hey, just wanted to say that KTX joined the GitHub Discussions beta. You can find our new forum here: https://github.com/libktx/ktx/discussions Feel free to set up new discussions with questions, ideas, your projects and anything you want to talk about with fellow KTX developers. 🙂
    😍 1
    v
    • 2
    • 2
  • c

    Ch8n

    01/06/2021, 6:10 AM
    Hello gameDev! In noobiee in game development and want to make some 2d games can you guys recommend me which framework ? I want to use Kotlin and if exporting games to device doesn't have any licensing would be great, Edit 1: beginners friendly guides would be great!
    v
    d
    • 3
    • 3
  • b

    Brian Dilley

    02/22/2021, 4:49 AM
    What’s a good feature complete game engine/framework written in kotlin-native? (I’d ultimately like to target MacOS/PC/maybe consoles)
    h
    m
    • 3
    • 3
  • h

    hiperbou

    03/10/2021, 6:12 PM

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

    🚀 1
    💥 4
    e
    m
    s
    • 4
    • 11
  • b

    Brian Dilley

    03/29/2021, 5:35 PM
    AS?
    :thread-please: 1
    r
    t
    • 3
    • 2
  • d

    dwursteisen

    04/02/2021, 8:26 AM
    👋 It’s a Work In Progress but I wanted to share with you my pet project. It’s a small 3D multiplatform game engine. At the moment, you can write a game, it will run in your JVM, your browser (except safari at the moment...) and Android too. It’s way more limited than other engine but the goal is to keep things simple. You can try some demos here: https://minigdx.github.io/minigdx-showcase/
    :kotlin-intensifies: 6
    t
    c
    • 3
    • 4
  • n

    Nate Emmons

    04/11/2021, 4:51 AM
    I would like to create a mutliplayer game server in Kotlin using websockets to communicate between client and server. I'm assuming that i can use something like Http4k or Ktor to handle the websocket stuff and that I need to learn coroutines to enable myself to run a 'game loop' asynchronously alongside the websocket i/o? does that sound generally correct?
    :yes: 1
    m
    • 2
    • 2
  • v

    veiset

    09/28/2021, 8:45 AM
    Been working on a 2D game engine in Kotlin for a while now. Finally gotten to the stage where I can start implementing a game in it. Here is a video of the work in progress:
    2021-09-27_19-49-07.mp4
    💥 5
    🔥 14
    d
    t
    • 3
    • 3
  • d

    dwursteisen

    10/10/2022, 10:20 PM
    https://github.com/littlektframework/littlekt Just discovered a little 2D game engine using Kotlin multiplateform. 👏
  • m

    Marc

    02/20/2023, 8:38 AM
    Has anybody played with building a 2d game with compose or maybe adapt one of the existing kotlin engines (minigdx, littlekt, korge) to render in a compose canvas? Any suggested approach? Having something like flame for flutter would be amazing 🙂
    m
    • 2
    • 7
Powered by Linen
Title
m

Marc

02/20/2023, 8:38 AM
Has anybody played with building a 2d game with compose or maybe adapt one of the existing kotlin engines (minigdx, littlekt, korge) to render in a compose canvas? Any suggested approach? Having something like flame for flutter would be amazing 🙂
m

Michał Kalinowski

02/20/2023, 4:19 PM
It's a bit more complicated, Compose Desktop perform most rendering on CPU. And that's the reason why it's hardly suitable for anything except the ui. On android you can quite easy inject OpenGL ES/Vulkan when for PC almost nothing has moved to ensure better integration with lwjgl, or to ensure the support for the OpenGL/Vulkan/Directx contex. However, if you would like to do something in these areas then you can start here: https://github.com/JetBrains/compose-jb/tree/master/experimental/lwjgl-integration
However, if you don't want to play with compose magic and want to make your own little engine then I can recommend libgdx(has some cool games in it like Slay the Spire) + lwjgl
m

Marc

02/20/2023, 4:33 PM
Understood… i did a small gdx game back in the day 🤔
Id like something more multiplatform though, maybe korge is worth a shot
m

Michał Kalinowski

02/20/2023, 4:39 PM
From what I have try a one year ago, korge is a bit too new and too limited. But maybe something has changed. For multiplatform game(that's not kotlin multiplatform) libgdx should be fine. I, for example make my own game in Lwjgl+Vulkan + imgui. Can be built on Linux/Windows/Macos, maybe I will add support for Android someday
m

Marc

02/20/2023, 4:40 PM
any thoughts on others like littlekt? a bit worried of new stuff as maybe if stops being maintained one day
m

Michał Kalinowski

02/20/2023, 4:41 PM
I don't know the others :((, but maybe I'll take a look
View count: 4