Questions tagged [kotlin]

Kotlin is a statically typed programming language that can be compiled into Java Bytecode or JavaScript source code. It is fully interoperable with Java and Android libraries.

Filter by
Sorted by
Tagged with
0 votes
1 answer
102 views

How do I implement data persistence?

I wonder how do I implement data persistence in 2d game. I am not using any engine, just pure Kotlin and OpenGL for rendering, so it is more of a software architecture question. The case: Character ...
Steyrix's user avatar
  • 191
0 votes
0 answers
28 views

Box2D issue with setLimits on a RevoluteJoint

I have a top down 2d view, a revolute join and a "wheel" attached to the joint. I'm setting the limits of the joint to follow the angle direction of the mouse gradually. I'm also trying to ...
Matsor Browncoat's user avatar
0 votes
1 answer
220 views

Is it a good idea to detect collisions in 2D game on different thread?

I am writing simple tiled map based game using LWJGL and Kotlin. I am testing out different collision detection algorithms and avoid using out of box solutions for personal reasons. I figured out that ...
Steyrix's user avatar
  • 191
0 votes
1 answer
104 views

Libgdx OrthogonalTiledMapRenderer doesn't render properly

I will simply leave a clip of it as it's easier than describing the problem. https://i.stack.imgur.com/bBAVC.jpg This is All the code that i have ...
random person's user avatar
0 votes
1 answer
78 views

Is there an algorithm for a Joystick class that happens to be engine/framework independent?

I need to be able to get the given input's distance inside the joystick, bounded within -100% and 100% and an unbounded version of it, get the position of where the mouse's position projects to the ...
random person's user avatar
0 votes
1 answer
62 views

Needs help on actually making the trigonometric function work as intended

...
random person's user avatar
-1 votes
1 answer
168 views

Extracting cell center and corner points from rasterized Voronoi diagram

I currently have this code which I copied from Rosetta code: ...
random person's user avatar
0 votes
1 answer
95 views

Conway's game of life algorithm does not work

the getNeighbors and isOutOfBounds function works fine as far as my tests go but for some reason the game never works as ...
random person's user avatar
1 vote
1 answer
53 views

How can I assign a World.createBody to a variable after initialization, `var` and `val` don't work?

...
random person's user avatar
0 votes
1 answer
109 views

Why does my PBR material appear grey in game?

I am playing around with PBR materials and I cant get them to work correctly. When I create a material using PBR the model appears gray in game. Any ideas on why I’m not getting the same result? ...
Jason Crosby's user avatar
0 votes
2 answers
90 views

What rotation needs to be applied to align mesh with expected axis of target?

I'm using LWJGL and JOML to create a 3D view of hexagons whose positions lie on a torus. I have a number (NxM) hexagons, whose centres and normals I have calculated to be placed on the torus to ...
Mark Fisher's user avatar
0 votes
1 answer
33 views

Android Game - Screen Flickers When an Entity Removed From The List

I am using Canvas in my android game. When I remove a no longer displayed entity in my entity list, all other entities are flickering for a brief time. When it's not removed, there is no such problem. ...
DeveloperKurt's user avatar
1 vote
2 answers
491 views

Fixed timestep, updates per second keeps changing?

I've been trying to create a deterministic, fixed gameloop. The game loop should run TICK_RATE # of physics updates per second, and then render as quickly as possible (didn't do interpolation yet). ...
Edward's user avatar
  • 13
-2 votes
2 answers
336 views

Is passing big objects in parameters not performant? [closed]

let's say that I have a big main class with a lot of variables, subclasses, etc... in it. Like "IngameScreen" What if this class is passed as a parameter very often for each frames ? For example ...
user129961's user avatar
1 vote
1 answer
45 views

Action never fires

I have a method, which runs the action MenuScreen at the very end. It never fires. Why is that? ...
Sandra's user avatar
  • 11
0 votes
1 answer
86 views

Missing texture after add new actors

I want to add two types of characters multiple times but when I add a new actor to stage texture in "old" actors stops render. I can add multiple KnightActor (...
Alcadur's user avatar
  • 111
1 vote
0 answers
43 views

Implementing an Asset Lifecycle

I'm currently developing a game using Kotlin and LibGDX. But this Question should be Framework/Engine agnostic. Given I have a Screen class like this: ...
mrdlink's user avatar
  • 323
0 votes
1 answer
1k views

Getting solid black color when texture is added to GLSL

I'm trying to apply the default badlogic.jpg image to a .obj I have. I'm currently loading the texture from AssetManager and creating a material with a texture ...
devthedevel's user avatar
0 votes
1 answer
252 views

How to setup engine properly in ktx-ashley?

I'm trying to setup simplest Ashley project with only 2 entities and get this error: ...
Divelix's user avatar
  • 169
0 votes
2 answers
2k views

How to make shake effect on camera in LibGDX?

I want to shake my OrhographicCamera on some event (i.e. click on the keyboard). How can I do that?
Divelix's user avatar
  • 169
1 vote
0 answers
65 views

Inner shadow of a polygon in libgdx

Is it possible to draw inner shadow for some polygon to make it look like this?
Divelix's user avatar
  • 169
1 vote
2 answers
431 views

Do I need to dispose Pixmap in Actor?

I create Pixmap in Actor and don't know how to dispose it. Is it necessary in my case? ...
Divelix's user avatar
  • 169
1 vote
2 answers
480 views

How can I draw Polyline and detect its collision with other objects?

The idea is to draw trace of moving Actor and if some other Actor intersect it, some function would be called. I've been searching for solution to this problem in Intersector class, but it seems to ...
Divelix's user avatar
  • 169
0 votes
1 answer
723 views

Focus scene2d UI actors programmatically in libGDX

I am trying to implement keyboard movement in game main menu which is libGDX Stage with UI-Actors. I'm also trying to code this feature myself since I can't neither ...
barsoosayque's user avatar
0 votes
1 answer
498 views

How to draw a list of images?

I found an example with strings ...
ravend's user avatar
  • 185
0 votes
2 answers
552 views

Access violation when using shaders in LWJGL 3

I've successfully used LWJGL 2.9.3 in the past and am now giving LWJGL 3.15 a shot in Kotlin. I had a quad rendering nicely but now I'm using shaders it seems that openGL isn't initialized and I'm ...
Alex's user avatar
  • 11