Java is both a popular object-oriented programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

learn more… | top users | synonyms

0
votes
1answer
51 views

How can I apply effects to a character based on the tiles it occupies?

A mechanic of my game is that when a Character (Actor) steps on some specific tiles, they should be affected by status effects like slow, poison, burn, etc. These effects lasts only while the ...
-1
votes
2answers
71 views

How to lock the mouse cursor in the middle in a first person camera?

I want to get a first person camera (like Call of Duty or Minecraft etc.) but I don't know which is the best way to do it. I have some camera increase rotation methods (camera.increase Rotation(x,y,z)...
2
votes
2answers
63 views

Java: problem with 2D corner collision

:) It took me many days to create a working collision detection for a 2D java platformer... I am finally calculating the corners of my player but the system is still buggy and I hope that we can ...
0
votes
1answer
51 views

Frustum culling only working at certain angles

So how I'm doing this is a little sketchy but I plan on changing it to either AABBs or spheres once I get it working. So the problem I'm having right now is that the frustum culling I've implemented ...
0
votes
0answers
20 views

JBullet & LWJGL Rendering objects with jbullet transform

I tried to render objects with jbullet matrix transform. Its something like that: get float array where is stored matrix then put it to floatbuffer and load to Matrix4f using load() function. Use ...
1
vote
1answer
70 views

How to get the position in an actor inside a table with LIBGDX?

Well the title says it all, I want to get the position of an actor inside a table Button button = new Button(bs); table.add(button).width(50).height(50); table.top().center(); By using button....
0
votes
1answer
47 views

Game Server Mechanic [closed]

Hey guys :) Im currently developing a little rpg duengon crawler. I really want to implement a local and an online multiplayer function, i know how servers are working and how to make them using ...
0
votes
1answer
46 views

keylistener and synchronization

i have this code: public final class PlayerInput implements KeyboardInputHandler{ public static final int INVERTED_AXIS = 0; public static final int NORMAL_AXIS = 1; private Sprite sprite; private ...
0
votes
1answer
38 views

Libgdx + Box2d working with 2 cameras

Recently I have read that you can work with 2 cameras whenever you involve Box2d, which only works in meters. In my Renderer class, I receive all the entities in the game and then draw them. I work ...
0
votes
0answers
30 views

Collision logic with Animations Java

Im trying to code a tile based platformer game with slick2d. While handling the collisions, Im facing with this problem. I could fix it for only that situation but I guess there must be a better way. ...
0
votes
1answer
71 views

How can I make an actor fire a bullet on touch?

I created a Jet and a Bullet, and when Jet is touched, the Bullet is fired. Now I want to know how can I make the Jet fire again when touched after it has fired the first shot? public class ...
0
votes
0answers
64 views

LibGDX - Player Movement Flickers

So, I was programming a very simple LibGDX game, so I decided to include a player class into the program. Once I did that, the players image started to flicker/stutter while I moved it. Here's the ...
0
votes
2answers
47 views

Detecting position within a circle

I need to detect the position of a knob on a touchpad. I need to detect if it is in particular areas and if so, which one. The sections, of course, being the colored parts. I know that the black ...
0
votes
2answers
173 views

How can I move an object around a canvas in a random direction at random times?

I am currently trying to move an object (circle ball) around the canvas in a random direction. I have already written the code for the wall collisions so the ball bounces back into canvas when the ...
0
votes
0answers
97 views

Implementing BaseGameUtils with LibGDX for Google Game Services

I'm developing a game for Android in Java using Android Studio and LibGDX. I'm trying to implement the Google Game Services inside my game but I'm having trouble using the BaseGameUtils. Every time I ...
-2
votes
1answer
43 views

How to get system date? [closed]

How do I get system date like: month, day in libGDX? I want to add to my game events that happen on specific date but I don't know how to receive it.
1
vote
1answer
73 views

Java - Adjusting the speed of an object during movement

I am trying to get an object to move (on java canvas) in the same angle but at different speed within the X and Y axis. Below you can see how i have implemented the movement of the object. xPosition +...
0
votes
1answer
105 views

dual contouring concept and term translations

I am working on a 3D sandbox mmo with destructible terrain, using Java and LWJGL. I looked at most options to achieve this and found that dual contouring would probably be the best option for me. I've ...
1
vote
2answers
91 views

Render terrains depending of the player position (Chunks)

Well, I have an array with all the terrains. How do I render them? I just add them to a List of terrains that are sent to the Renderer. There, every terrain of the list is rendered. The problem is ...
1
vote
1answer
71 views

How could I implement destruction of bases in Space Invaders type game?

What approaches could you use to implement the the gradual destructions of bases/shields in a top down shooter type game similar to Space Invaders? The simplest approach could be to use a series of ...
0
votes
0answers
39 views

Box2D top down car weird spasm

im currently programming a 2d top down racing game with box2d and libgdx. i have a car body to which there are 4 wheels attached. these 4 wheels are attached with RevoluteJoints ( for the front ...
0
votes
1answer
55 views

Ball can double jump in Jumper Game

I wrote a game that has a ball which can only jump (like in most jumper games) to avoid incoming obstacles (only, I haven't integrated the obstacles part yet). Right now, it's just a ball that can ...
5
votes
2answers
952 views

AI multithreading [closed]

MMO game. ~5000 (fake) players should be controlled by the server. Many of them have different classes -> different behavior. They should make some random pauses while doing some actions (~500-1500 ms)...
-3
votes
1answer
25 views

OpenGL ES 2 inheriting issues [closed]

I am Having an issue where one of my classes will not inherit the other ones variable value. In the class which is inherited. It shows the value of the float just fine. But when I go to the Class ...
1
vote
1answer
51 views

Player moving back and forth when moving with camera LIBGDX

I have a problem. When in libGDX my player moves across the screen and the camera is moving after him the player jumps back and forth a bit. Player still moves forward but it looks goofy I'm moving ...
0
votes
1answer
40 views

Frame Rate Independence for Non-Linear Increases

So while working on my game, I decided that I would have a speed variable increase in the fashion speed += 1/speed; with the goal being that in the beginning it increases fast and then it increases ...
0
votes
2answers
49 views

Hide building roof & Hide faces/vertices depending on world location

I'm currently developing a small game for my own enjoyment and I've ran into a problem. As you probably know many third person games (such as Runescape and XCOM, for example) hide the roofs when you ...
0
votes
0answers
40 views

Multithread OpenGL to Upload Meshes

My game is rendered in dynamically generated chunks, each of which has its own mesh. Every time I generate a chunk and upload its mesh, there is a huge lag spike. Is there a good way of eliminating ...
0
votes
1answer
45 views

GlViewport-code doesn't work in one specific screen?

I am currently working on a small game using LibGDX and Java. However, I have found one oddly specific problem. I want the game to resize so that it never has to be cropped and so it never has to cut ...
0
votes
0answers
33 views

Doing collisions on both axis with java overlap

I'm making a top down game from scratch and just found out about the java rectangle overlap method that would work great for collisions. However, after the overlap happens, I need to check for which ...
0
votes
2answers
156 views

Optimising Voxel World Rendering

There are a couple of questions like this already. This one is different because it is specifically about rendering, as opposed to navigation and generation. I've implemented suggestions from here ...
0
votes
1answer
54 views

LibGdx: search through text file without lots of String garbage

I'm reading a text file from Gdx.files.internal in LibGdx. This is essentially streaming a file from a compressed Jar file so random access is not possible. I want to search through the text file ...
1
vote
2answers
85 views

How do I calculate the tangent to a point on a circle?

I have a line that is from the center of a circle to a point on it's edge that is changing constantly (radius is drawn to a point orbiting a circle) I want to make a line tangential to the circle ...
2
votes
2answers
62 views

Cut rest of image behind object (like POV)

There are two objects - blue circle and black square. When you normally render them, you will see situation in "A". But how do I render only specific part of blue circle, which can be "seen" (is in ...
0
votes
0answers
28 views

Simple OpenGL ES 2 program fails

I'm stuck on a very simple OpenGL ES application from 2 days now. I am a "beginner" OpenGL developer, and this is my first attempt at the ES version on android. This is a VERY simple app, the usual ...
0
votes
1answer
56 views

LibGdx Tiled Map Rendering Problem

Im trying to study a book to learn LibGDX game engine but i have a problem with rendering tiled maps. i think i wrote the same code with book but i couldnt get the same result. its a simple game with ...
0
votes
3answers
63 views

LibGDX efficient colored rectangle rendering

I'm creating a game in which I renderer around 1000 to 2000 solid colored squares per frame, 90% of which are the same size: ~4 px depending on the dpi. I am looking for the most efficient way to ...
0
votes
1answer
46 views

Tile collision detection

Right. So I was making this simple game. The player is two tiles wide, and four tiles high. My current code is really buggy (it was better before my rewrite) Here it is: float newx = position.x +...
-1
votes
1answer
126 views

C++: from LWJGL to C++ with OpenGL

I've been trying my best on porting my 3D game from Java to C++, but to no avail. I use only LWJGL with OpenGL but I cannot find any other library in C++ that supports as much as LWJGL does for Java. ...
0
votes
1answer
41 views

What is the code for panning a camera from touch input? (libGDX + scene2d)

I would like the user to pan around a game world by dragging their finger on a touch screen - just like Google Maps. I tried a few things but I'm not having much success thus far. Here is where I'm ...
2
votes
1answer
172 views

How can I set a Steam achievement in Steam via LibGDX or native Java?

Is it possible to set or 'unlock' a Steam achievement via LibGDX or with a native Java solution? If so, how it this possible. Furthermore, what would be a good implementation for 'saving' achieved ...
0
votes
0answers
39 views

Have libgdx particles leave permanent sprites?

I am trying to figure out how to have enemies hit leave permanent blood splashes in my game, but I am not sure what direction to go. I am currently using box2d, just for defining my ligh-system with ...
0
votes
1answer
59 views

Desktop launcher Error in Java & LibGDX

What's my problem: It says there is a null pointer exception in my desktop launcher class even though I haven't really touched it other than add a title and change the width & height. The weird ...
0
votes
1answer
94 views

Libgdx Fine Tune Megaman Movement

With help from my last question, I was able to fix the issue of having a stuttering effect if you keep hitting jump, while jumping. I believe I have managed to match moving on the X axis and the ...
1
vote
1answer
49 views

How to dispose in Newest Java/LibGDX ApplicationListener?

Am I new? yes What I'm wondering: How do you dispose of textures / spritebatches and the things you normally need to dispose of now? Why I'm asking: Because theirs no automatic dispose() function ...
2
votes
1answer
106 views

Bullets Are Spawning Weirdly in my Java/LibGDX Plane Shooting Game

What I'm trying to do Have bullet's spawn in the center ( or close enough, the exact number can be played with after ) of my player sprite. What's going wrong: They're spawning super weirdly. The ...
0
votes
0answers
31 views

ChainShape in Box2D

I recently began to learn libgdx and I am stuck at a problem with the CainShape of Box2D. My first goal is to simply create a box with a ChainShape. In order to achieve that, I added four Vector2 to ...
0
votes
0answers
20 views

How to verify POST data is sent from Android app with correct SHA1 signature? [duplicate]

Recently my game has been hacked and one user submitted an impossible score to the server. The score was submitted with a verified checksum, and correct data. I'm convinced that the user must have ...
0
votes
0answers
11 views

Waiting for scene2d action to be done?

I am trying to make the enemies in my turnbased combat game to do their moves. As it is right now, they will only move one step, but it will cost them 3 action points each. I think it might be because ...
0
votes
1answer
106 views

Libgdx Megaman Engine

This is my first time posting here. Through the tutorials and videos I can find regarding developing games using libgdx. I thought I would start with something that was relatively simplistic, a ...