Questions tagged [libktx]

Kotlin game framework based on LibGDX


LibKTX aims to provide idiomatic Kotlin extensions and APIs for the LibGDX Java game framework. It provides modular utilities and extensions for selected parts of LibGDX with poor native Kotlin support.

Examples of Kotlin language features used to improve usability, performance and readability of LibGDX APIs include:

  • Operator overloads for collections and mathematical operations.
  • Extension methods with sensible default parameters.
  • Inline methods with reduced runtime overhead for various listeners, builders and loggers.
  • Nullable types which improve typing information of selected interfaces and functions.
  • Default interface methods simplifying the implementation.
  • Type-safe builders for GUI, styling and physics engine.
  • Coroutines context providing concurrency utilities.
  • Reified types that simplify usage of methods normally consuming Class parameters.
9 questions
2
votes
1 answer

ScrollPanel in libgdx (libktx)

I have a scrollpanel test headers in it. Through debug, I see that the panel itself is there, but the content is not displayed in it, although it seems to be. Maybe someone knows how this is possible? The panel itself adjusts to the size of the…
1
vote
1 answer

ModelBuilder end() not working as it should "com.badlogic.gdx.utils.GdxRuntimeException: Call end() first"

I'm just trying to get a basic box rendered with LibGDX (using Kotlin & LibKTX) but am running into some issues. If I call the ModelBuilder createBox function without the specified begin() and end() functions my box is not rendered. I checked the…
shan
  • 3,035
  • 5
  • 34
  • 50
0
votes
1 answer

How to create new module (android library) into libgdx apllication? (if it is possible)

I created libgdx application with android module (kotlin - libktx) - I use: https://github.com/tommyettinger/gdx-liftoff I tried to add new module (Android Library) in Android Studio, but it do not work: Cannot add extension with name 'kotlin', as…
fram4
  • 37
  • 3
0
votes
1 answer

libgdx holo-skin: no No SelectBoxStyle registered with name: default

I am trying to find my way into LibGDX, using the libKtx extensions, and trying to get my first piece of UI going. I wanted to add a SelectBox to set the window resolution, but I'm getting an exception when setting the stage: Exception in thread…
UncleBob
  • 1,233
  • 3
  • 15
  • 33
0
votes
0 answers

Libgdx: Dispose of screen not working on android

I developing my game using libgdx and libktx. my main game class is: class MyGame : KtxGame() { val assets = AssetManager() override fun create() { addScreen(LoadingScreen(this)) setScreen() …
Hadi Ahmadi
  • 1,924
  • 2
  • 17
  • 38
0
votes
1 answer

Run while loop in parallel

I have a large collection (+90 000 objects) and I would like to run while loop in parallel on it, source of my function is below val context = newSingleThreadAsyncContext() return KtxAsync.async(context) { val fields =…
Alcadur
  • 681
  • 1
  • 8
  • 22
0
votes
1 answer

Async fields generation and TextureRegion rendering problem

I have a piece of code to render a grid from which I will render a maze. My build function: fun buildAsync(): Deferred { return KtxAsync.async(newSingleThreadAsyncContext()) { addEmptyFields() …
Alcadur
  • 681
  • 1
  • 8
  • 22
0
votes
1 answer

Custom actor for BitmapFont (libgdx)

I've spent several frustrating hours trying to implement (what I thought would be) a simple FontActor class. The idea is to just draw text at a specific position using a provided BitmapFont. That much, I've managed to accomplish. However, I'm…
EntangledLoops
  • 1,951
  • 1
  • 23
  • 36
-2
votes
1 answer

I want to have a minigame inside my notetaking application in android

I want to have a minigame inside my note-taking application. (Eg: an activity with a chrome dinosaur clone.) I have worked with libktx and libgdx before. My question is can these libraries be used to work with normal android projects and can they be…
Narendra_Nath
  • 4,578
  • 3
  • 13
  • 31