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

1
vote
1answer
45 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
101 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 ...
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
105 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
34 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
42 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
28 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
89 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
40 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
30 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 ...
1
vote
1answer
57 views

2D BoundingBox Collision Detection Problem

I implemented collision detection into my game (using Bounding Boxes) The character is floating above the blocks instead of standing on them. I know what is happening, but I can't figure out how to ...
0
votes
1answer
137 views

Is Angry Birds Made Purely Using Bitmaps/Raster graphics? [closed]

Being a beginner game developer I would like to start creating my own engine and graphics so I am concerned about how successful games accomplish the graphics portion. My question is, are all the ...
0
votes
1answer
57 views

Libgdx: more efficient way of using Vector 3?

I currently use if(cam.frustum.pointInFrustum(new Vector3((float)posX, (float)posY, 0))) To check if my sprite is in the camera's view. I have to make a new Vector3 every frame wich is very ...
1
vote
0answers
105 views

How to bundle JRE with game for Steam

Heyo! I have looked for a step by step tutorial everywhere and haven't been able to find anything so please be helpful and fairly slow. I am creating a game for Steam and I am using Java to write ...
0
votes
1answer
59 views

How can I communicate between libGDXand the Android Studio Java files?

The reason I'm asking is because I wanted to create a game and I know I could use Scene2D to create the UI but as far as menus go I wanted to use the tools in android studio to at least create a menu ...
0
votes
0answers
52 views

HashMap or LinkedList

I'm working on a 2D game for Android using LibGDX in Java. In my game I got lots of enemies, bullets and other stuff. I hold a hash map, which every cell holds a reference to an array list of that ...
1
vote
1answer
54 views

Problems managing collision filtering

I have my character fixture and body(is a tank), so when I press the screen it throws a rocket(which also has a body and a fixture) that the player can controlll touching the screen. My game also has ...
1
vote
1answer
61 views

Problems making a smooth character rotation

My character has an angle rotation, when the player touches the screen it automatically face to the place that the player touched, using atan2(y,x) and Math.radiansToDegrees methods, but I want it to ...
0
votes
0answers
37 views

Libgdx tiled map collision scale problem

I followed Dermetfans tutorials on youtube to make a collision tile map for use in Libgdx and I think I have some scaling problems related to the camera. I'm loading the map and the bottom left corner ...
1
vote
0answers
77 views

Euler angles to directional vector

I wanted to implement a directional light system in my game, and instead of passing the direction to the light, I chose to use an angle, and only later convert it to a directional vector, so it is a ...
1
vote
1answer
65 views

How to Programm A Dialog box with a typewriter effect in Java? [closed]

Im am very new to java and programming so I might be a bit annoying to work with but please bear with me :D So As the title says I'm trying to figure out how to properly program a working dialog box ...
0
votes
2answers
96 views

Where do assets for Minecraft mods go?

I found this link: Where do I store (or how do I refer to) textures for custom blocks? Unfortunately, the answer did not explain where that assets folder actually is. As such, I can't figure out ...
7
votes
3answers
2k views

Does Steam notify the user that they need Java for a game when they buy/download/install it?

My mate and I are gonna make a game for Steam and I, as the programmer, want to use Java as that is my current favorite language. So I need to know, does Steam notify the user that they need Java for ...
1
vote
2answers
88 views

Box2D LibGDX Body.getPosition() and Body.getWorldCenter() problems

I have a problem with my game in Java with Box2D and LibGDX I found out that when I use body.getPosition() it is only half of that of body.getWorldCenter(). The problem here is for me that I use ...
0
votes
0answers
50 views

Alternative Sound lib with LibGDX

i'm making a 2D game for Android in Java using LibGDX. I find LibGDX sound management not good enough for me. I wonder if it's possible to use an external lib for playing and managing the sound and ...
0
votes
2answers
74 views

Round position to center of current grid position

The title may not make sense, nor may the question - I'll try nevertheless. I'm attempting to make a game similar to The Powder Toy. Essentially, this is a physics simulation game, where the users ...
4
votes
2answers
176 views

How can I randomly spawn circles on a screen but make sure they don't overlap?

I just need a general idea for how to do this. I have a list of Circle objects. Circle { private int yCoord; private int xCoord; Circle(int a, int b) { xCoord = a; yCoord = b; } } I randomly ...
1
vote
1answer
55 views

Java creating random pipes from an image

Im trying to make a simple clone of flappy bird game. The tutorial that i watched used only rectangles for all the objects. But the thing is im trying to do it with nicer images. I have handled the ...
0
votes
0answers
50 views

Wrong Normal When Models is Close to Each Other

I have a problem regarding my Normal FrameBuffer that creates gaps between models. The image below contains 10x2x10 block (Minecraft style) and one character. The image is outputed through: ...
0
votes
1answer
74 views

libgdx limit angular speed

I'm working on my top-down game. y characters use pathfinding + steering behaviors(Arrive and FollowPath) to move. I've implemented my character class from libgdx SteeringActor class (from tests). So ...
0
votes
0answers
48 views

Libgdx easy peer to peer connection

Background Information Since a few weeks I am trying to create a easy libgdx game... Maybe a bit similar to Binding of Isaac... But theres one thing which I want to implement as soon as possible... ...
0
votes
0answers
104 views

How can I change the color of the default android drawable star?

I asked a question before and I got an answer to do this: Drawable drawable = getResources().getDrawable(android.R.drawable.btn_star); drawable.setColorFilter(Color.YELLOW, ...
0
votes
0answers
20 views

Why does LWJGL's CLPlatforms interface return null, and how can I change this?

I'm running Jeff Heaton's OpenCL example from https://github.com/jeffheaton/opencl-hello-world ; in hopes of using the information for terrain generation for another Java program later. I'm also ...
0
votes
0answers
38 views

Create a new layout?

After the user gets to a certain score in my game, I wan't to display a medal next to the users name. Doing this pro grammatically will make the image disappear after the user leaves the app. How can ...
0
votes
2answers
109 views

Will scaling images at runtime impact my game's speed?

I have read the android developer guide to working on different screen sizes. My question is, if I only provide one image in the drawable file, and let android scale it for me, will it impact the ...
2
votes
0answers
67 views

What heuristic should I use for A* pathfinding?

So, I've successfully implemented A* pathfinding (java) (http://www.cokeandcode.com/main/tutorials/path-finding/) in my game, but that pathfinding doesn't work as I wanted it to work. I don't know ...
1
vote
1answer
33 views

How to add images?

I was adding images after reading in the documentation: This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for ...
0
votes
1answer
116 views

How could we use trigonometry for moving around a 3D World?

Well I have a question about geometry and 3-Dimensional player movement in general. I'm using Java, OpenGL and LWJGL. This is basically what I got: currentFrontSpeed: Is a float that contains the ...
1
vote
0answers
64 views

Moving box2D body with texture?

I was following the solution from this http://stackoverflow.com/questions/20180063/box2d-body-with-texture. I ended up getting this working for static bodies. But when trying to get the PolygonSprite ...
1
vote
1answer
111 views

Make game camera stay inside of tiled map boundaries [LibGDX]

I am creating a little 2D platform game, with the LibGDX framework. So far I have created a simple prototype level in Tiled, and loaded this map into my LibGDX game. I can use mouse and keyboard ...
2
votes
2answers
91 views

Circle to Polygon collision response

I'm working for collision response for my 2d game. Character is represented by circle and obstacles are represented by Polygons(in my example it would be rotated rectangle for simlification). The ...
0
votes
1answer
69 views

Image rendering with additional space around it

When I try to display an image that is 400 pixels wide and 800 pixels high, it is not displayed this way. Instead it is diplayed like this: Instead it is displayed like this You can see at the bottom ...
1
vote
1answer
57 views

Admob - gradle configuration error

I've followed this tutorial https://developers.google.com/admob/android/quick-start, but I'm stucked at gradle configuration. I've added line compile 'com.google.android.gms:play-services-ads:8.3.0' ...
0
votes
0answers
35 views

LWJGL 3 GLSL normal problem

I have a pretty strange problem today. I started to make a 2d game yesterday, and everything was right until now. I wanted to make a lighting system, wich required me to send the vertexnormal from ...
0
votes
0answers
74 views

How to dynamically draw a filled polygon with a given array of vertices?

Say I have a simple array of vertices (or floats with every odd index being the X of a vertex and every even being the Y), how could I paint all the area between the vertices? As in, I have maybe ...
0
votes
0answers
55 views

LibGDX Scene2D.UI without Scene2D?

I'm currently programming a little game in LibGDX for which I planned to use Scene2D's UI aspects to make menus and a hud. When fiddling around a bit, I noticed that my Scene2D.Stage basically made ...
2
votes
1answer
95 views

LibGDX: Do I have to dispose a texture if I load it from AssetManager?

AssetManager manager = new AssetManager(); manager.load("texture1", Texture.class); manager.load("texture2", Texture.class); manager.load("texture3", Texture.class); //And so on... And then I load ...
0
votes
1answer
77 views

Aspect ratio of drawn quad messed up after rotating

When I draw a quad that is rotating the aspect ratio of the quad gets messed up and the size changes. Gif of what is happening I am confident it has something to do with the way I calculate the size ...