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
0answers
37 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
25 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
0answers
11 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
27 views

Java game architecture [on hold]

so Ive started to design my game engine, and this is what Ive come up with. There is an abstract Entity class wich contains some info (x,y,speed etc.) Now, I will want some entities to have health, ...
0
votes
0answers
19 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
61 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
22 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
26 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
31 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
54 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
26 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
votes
0answers
19 views

Lwjgl unsatisfied link error intelliJ

I recently wanted to update one of my games to a recent (stable) LWJGL 3 version. I changed everything I needed to change, like instead of GLContext.createFormCurrent() I did GL.createCapabilities(), ...
1
vote
0answers
53 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
41 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
32 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
34 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
49 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
23 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
42 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
50 views

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

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
42 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
45 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
20 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
44 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
114 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
42 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
47 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
32 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
26 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
36 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
14 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
34 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 ...
1
vote
1answer
35 views

LibGDX box2d - Jumping not working

I'm trying to make a platformer game using Box2D, but I can't manage to do the jumping. The source code is here: https://github.com/ZacGarby1/Platformer. I have no idea why it's not working because I ...
0
votes
1answer
58 views

Will this 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 an image in the drawable file, and let android scale it for me, will it impact the ...
2
votes
1answer
46 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
25 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
79 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
38 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
41 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 ...
1
vote
1answer
50 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
64 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
41 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
24 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
37 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
35 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
39 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
61 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 ...
0
votes
2answers
51 views

Java map generation

What is better way of setting up a map for a java 2D topdown game? Would it be having an ArrayList of tiles, a simple 2D array, a HashMap? (Note: the tiles/blocks or whatever are squared)
0
votes
0answers
23 views

Surface View show black screen

i need necessary help! please anyone?! My GamePanel's Surface View show black screen (or don't show at all) on testing even though in the code every-thing looks fine!! Am i missing something?! Note: ...