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.
0
votes
1answer
15 views
How can I make an actor fire bullets repeatedly?
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 after it has fired the first shot?
public class MyGdxGame implements ...
0
votes
0answers
10 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
33 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
51 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
21 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 ...
-3
votes
0answers
56 views
Engine or no engine? [on hold]
Shall I create a engine and then make my games based on the engine or should I make my games with no pre-made engines made by myself and make the game loop and etc. for each new small game I make?
-2
votes
1answer
33 views
How to get system date? [on hold]
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
34 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
44 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 ...
0
votes
1answer
33 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
56 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
26 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
36 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
889 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 ...
-3
votes
1answer
24 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
34 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 ...
-2
votes
0answers
17 views
Save dynamicaly added items in layout [migrated]
How do I save dynamicaly (through code) added items in layout? I mean, I added two imageViews into layout through code, but when I switch to another layout, and then get back to this one, imageViews ...
0
votes
1answer
36 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
45 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
28 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
27 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
29 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
110 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
32 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 ...
0
votes
1answer
40 views
Geometry logic question
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
53 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
23 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
33 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
47 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
38 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
52 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
19 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
71 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
22 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
0answers
13 views
Texture Coords using PolygonSprite
I am having trouble getting a PolygonSprite to use the right texture coords when drawing. I am using the default badlogic.jpg as my test image.
As you can see by the black and gray bars the scaling ...
0
votes
1answer
35 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
56 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
29 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
77 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
27 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 ...
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
10 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
67 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 ...
0
votes
0answers
47 views
Problem with Pixels In The Game
So, in the game that I am developing, there is an issue with the pixels for the different objects. This is a problem as it makes the game a little awkward. Essentially, the pixels for a house in the ...
0
votes
0answers
31 views
How do I implement a LWJGL orthogonal matrix?
As seen on the official LWJGL page, I tried. But failed.
All the things I've found on SO and other sites didn't answer anything that had to do with this specifically. I've been on this for weeks. It's ...
0
votes
1answer
32 views
Slick2D Simple StateBasedGame not working
I recently started trying to work with outside Java libraries like Slick2D. This is my first time doing so, so I basically have no clue what I am doing.
I tried making a simple StateBasedGame that ...
0
votes
0answers
22 views
Libgdx tiled map not showing
I'm using a HashMap structure to store and load my maps made in tiled. Currently I have two and I am able to go from mapOne to mapTwo with no problems. But when I go from mapTwo to mapOne, mapOne ...
0
votes
3answers
69 views
Get pressed character in LWJGL (Ignoring modifier keys)
I have a basic text field setup in LWJGL, however pressing any modifier keys (Shift, F1-19, Page Up, etc.) inputs a space into the text field. How would I ignore those characters? Here's some code so ...
0
votes
0answers
34 views
Java - Component Based Architecture applied to Entities
I've recently been getting my game a lot more of functions for the entities: growing, IA, colours depending of season, position, magic, teleportation an d a lot more. The problem was that for ...
0
votes
0answers
27 views
Do I restart the service?
I have a long running service in my game, that consists of two threads.
//MY SERVICE:
if(userEnabledProcessOne) //Shared preference value that I'm getting from the settings of my app based on a ...