Tagged Questions

Java is both a popular 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
3 views

Libgdx Scene2d shows White screen when executed

package com.Darth377Apps.DeepShadow; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.scenes.scene2d.*; import com.badlogic.gdx.scenes.scene2d.ui.*; import ...
0
votes
0answers
3 views

Libgdx: ModelInstance texture is not rendered on Java8

I have project based on opengl, libgdx framework. It's impossible I think, but when I switch my project from Jdk1.7 on Jdk1.8 I have problem with rendering model's texture. I have no idea how language ...
0
votes
0answers
35 views

Generating Mesh From Voxel Data [on hold]

I need help converting a 3D array of voxels (The array indexes are the voxel positions) to an actual voxel terrain mesh (float array for vertices, And a int array for indices) So i can render a chunk ...
0
votes
1answer
24 views

Box2D pixel to meter conversion

I have a game that was written in pixels and now I want to change it to meters like(box2D do). How I need to do that. I have wached a lot of tutorials and all they have some SCALING FACTOR but when I ...
0
votes
1answer
48 views

Player being covered by glClearColor?

Here is a video of the problem: https://www.youtube.com/watch?v=6vnDOB1Vk4o (this is the game I've been making for fun/practice). You notice, in the beginning of the video, I walk off the map and ...
0
votes
0answers
18 views

Ray casting problem using JOGL

I'm trying to port an old perfectly functioning ray casting implementation from my lwjgl project (FF pipeline) to a new project using JOGL and shaders. My problem is that my ray no longer intersects ...
0
votes
1answer
42 views

Tile map only rendering 1 layer when it should be 3

I've been working on this for a while and I can not seem to figure it out. I had the fileParser() method in the constructor and it worked fine. Then I was told it's very bad practice to have it in the ...
0
votes
1answer
14 views

Predicting circle-circle bounce vector when aiming one at another

I am making a game with libGDX (with box2d) in which you drag and aim one circle body at another then release to fire. I would like to be able to predict the path of the second circle based on the aim ...
0
votes
1answer
12 views

Andengine onAreaTouched TouchEvent not working - ACTION_OUTSIDE & ACTION_CANCEL

I have a simple problem. I have a button on the screen. I want isActionDown to push the button down, and isActionUp to push the button back up again and make my character jump. But the problem is if I ...
0
votes
0answers
5 views

Problem with the method unproject of the class OrthographicCamera of LibGdx [on hold]

cam is a object of OrthographicCamera v3 is a object of Vector 3 in the next line the play closes in android, in the PC it works good, I don´t which is the problem cam.unproject(v3); Thanks very ...
0
votes
0answers
10 views

Leaderboard in game, android, LibGDX [on hold]

I am developing android game using LibGDX engine (java) , I want to put leaderboard (top scores) in it . I can't find any tutorial that explains how to do it using Google play services , any ...
1
vote
0answers
36 views

How to turn off antialiasing in Graphics class?

I have been using the following code with a Graphics2D buffered image g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); to ensure the image ...
0
votes
0answers
77 views

Best way to develop a Web based RPG game - after some research [on hold]

I've been researching this for a while, and I'm in need of some pointers(:D) the thing is this - I have 3 options in mind: HTML5 + Javascript Java applets(is that still a thing?) unity web player ...
0
votes
1answer
24 views

LibGDX Bounding Rectangles

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate ...
0
votes
0answers
37 views

Make a smooth curved terrain from chain shape [on hold]

what have i tried: Vector2[] vs = new Vector2[6]; vs[0] = (new Vector2(-50, 7.3f)); vs[1] = (new Vector2(-18, 7.3f)); vs[2] = (new Vector2(-10, 2)); vs[3] = (new Vector2(-5, 4)); vs[4] = (new ...
2
votes
3answers
171 views

How to avoid duplication using client-server model

I am using a client-server model to write a multiplayer-capable game (in Java). Currently the clients and the server are using the same code to run the game logic, in order to enable client-side ...
0
votes
1answer
23 views

box2d ChainShape into curved line

i need to draw a curved line , i searched the internet and found nothing , maybe someone with knowlegde on the subject can help me with a link , i used chain shape and did this , and i don't know ...
0
votes
0answers
25 views

Problem with changing font color in libgdx

I recently noticed that my version of libgdx was way out of date, so I updated from version .9.something to 1.4.1. I copied files for the project I'm working on over into a new project generated with ...
0
votes
2answers
62 views

Game Background graphics blurred edges?

Why when using this code for the background for my game do I receive blocks with blurred edges? public final class State_Play extends State_Template { private BufferedImage background; ...
0
votes
0answers
19 views

Change a vertices and display corner of a polygon

I'm currently building a level editor for my game and i'm having some trouble on how to change vertices of a polygon. Basicly i searched the web trying to figure out how to update the vertices of a ...
0
votes
0answers
14 views

Cant Set Image Origin in Table Cell - LibGDX

I am having real issues with my Actors when placed in table cells. I would like to set center Origin to allow me to tween the scale around the center. I am aware that the Table is responsible for ...
0
votes
0answers
34 views

Sample source code for coordinated group movement. Preferably in c# or java [closed]

I implemented Astar algorithm from andengine gles2 for path finding in my android RTS game. Now i want to implement group movement. Anyone can point to some sample source code for coordinated group ...
1
vote
1answer
76 views

How can I implement a camera like the one in RotMG?

RotMG, an MMO top-down shooter, takes on a unique 2d-3d style, and has an intriguing camera; The game is obviously 3d, not simply isometric, and if you play the game and turn on camera rotation you ...
-2
votes
0answers
19 views

Collisions aren't working Processing [closed]

im trying to make my proyectiles to collide with my Character [Personaje] But i think my Code isnt working. Here's my code: the problem is in the void checkCollisions(), and void areProyectiles() down ...
0
votes
0answers
13 views

Rotate image according to mouse's cursor [closed]

The image is rotating but the mouse's cursor location is in the left corner of the image. public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException{ Input input ...
0
votes
0answers
25 views

Dynamic VBO update possibly corrupting data?

I want to draw a line between two vertices. On a mouseclick the vertex data will change and I want to update the line to use the new values. I am using a VBO for this and it looks like the update ...
0
votes
0answers
12 views

Removing extra blank window when adding Jmonkey based sound to Java based game

I'm currently programming a simple run and jump game in java. I'm in the process of implementing sound and I'd like to use Jmonkey's sound because I'd like to eventually switch the whole game over to ...
0
votes
0answers
23 views

glBlendFunc() makes primitively drawn quads disappear

i have experienced some issues with glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);. Having this invocation in OpenGL init code makes stuff drawn with the following methods ...
-1
votes
0answers
33 views

arrayindexoutofbounds [closed]

i'm new in this site and i've been learning java for 1 month, escuse my grammar. I want to make a game about a character that has to dodge bullets that appear every 3 secs, and are messing around the ...
-2
votes
0answers
23 views

Libgdx how Coverflow animation [closed]

Please see this link and suggest me how to make this animation in libgdx.. http://code4app.net/ios/Infinite-Scroll-Picker/51ecb20a6803fa7b31000000 Suggest me any idea ya link. I don't know how to ...
0
votes
0answers
11 views

Configuring eclipse exporting - export res folder into jar's /res [migrated]

NOTE: I use new File(...) instead of getResourceAsStream(...) so i can then easily make it to Slick's Texture class. I'm having a trouble with exporting my resources folder in eclipse. This is my ...
0
votes
1answer
44 views

Ram usage , libGDX game development

I am developing android game using LibGDX . The game data (images , sounds etc.) are maximum 25mb . But when the game is running on Android device it places 110mb there (look at the image) 110mb is ...
0
votes
0answers
12 views

Jmonkey Translucent Render Bucket fails to model object last

So I have a weapon model that moves wherever the camera moves and the rotation of the weapon is the same as the rotation of the camera. Additionally I added the weapon to the Translucency Queue Bucket ...
6
votes
1answer
2k views

Why do my images take 200 MB of RAM when they are ~20KB on disk?

I am creating an Android game using libGDX. When I load my nine images it takes 200 MB of RAM. But the images are 10 to 17 KB each. Why the discrepancy? Here is where I create textures from those ...
0
votes
1answer
11 views

Understanding HingeConstraint in jBullet

I'm using the java port of BulletPhysics engine jBullet. I'd like to make a joints between 2 triangles so that one edge of the first and one edge of the seconds act like a hinge. But I don't ...
0
votes
0answers
15 views

Using debugdraw in jbox2d

I've created a class which implements org.jbox2d.callbacks.DebugDraw. And implemented the abstract methods too. DebugDrawHandler extends org.jbox2d.callbacks.DebugDraw I've instanciated it with: ...
0
votes
1answer
47 views

Box2D Body creation causing performance issues

I have at max 10 dynamic bodies in my world at any time. they are created at random and fired up from below they screen. when a new body is being created, the fps falls from 59 - 61 to about 35- 40 ...
0
votes
1answer
180 views

OpenGL generate hills looking vertices

I want to generate a terrain which looks like hills. Some sort of sine waves. Should be as simple as possible. But I can not figure out how. I get very scary results, which are nothing worth. I need ...
0
votes
0answers
30 views

How to get yaw of bullet physics vehicle?

I am using the Bullet Physics port to java, JBullet, and am trying to render a vehicle body that i created in Blender on top of the vehicle chassis. Since i cannot effectively find a way to render ...
0
votes
0answers
38 views

OpenGL ES 2.0 - Applying rotation to only specific quads within a batch

This problem seems fairly simple on the face of it: How, when drawing a batch of quads using a triangle strip, can I apply a rotation to only one or some of the quads. I've been looking at this ...
1
vote
1answer
93 views

Making sprite rotate smoothly

I have a sprite that I want to rotate smoothly and face the opposite direction: This is my render function: public void render() { // Game Loop Gdx.gl.glClearColor(0.7f, 0.7f, 0.2f, 1); ...
0
votes
1answer
31 views

Making sprites move in oppsite direction of vector

I have a sprite that moves from the bottom left of the screen to the top right. What I want to know is how would i make it turn around and go in the opposite direction, and continue this loop. I ...
0
votes
3answers
98 views

Dynamic Crafting Systems [closed]

I have been toying with the idea of having a game that is based purely around crafting. That on its own is not much of a big deal. The way the crafting would work is the problem. The idea I have is ...
0
votes
2answers
100 views

Dealing with multiple scenes /levels

Overview I have a scene manager in my game and in each 'Scene' I have a render() and a update() method for drawing and updating my game's logic. Basically, when I want to switch to another scene, ...
0
votes
1answer
83 views

How to implement mouse based movement in an RPG? (Java) [duplicate]

I'm making a 2D rpg and I want the character to move with the mouse, ie the user clicks and then the character moves to that location. How do I accomplish this?
1
vote
2answers
144 views

Should FPS exceed ticks/second?

I was once told that you should never re-draw a frame if the game logic has not changed since the last draw. Assuming game logic is updated once every tick, and assuming a game runs at 40 FPS @ 20 ...
0
votes
2answers
239 views

Is object-oriented underestimated for game development? [closed]

I'd like to understand whether the object-oriented paradigm applied to game programming is bad, or whether it's just an urban legend. A friend of mine is developing a game with HTML5 and Javascript ...
-1
votes
1answer
67 views

Why Is My AABB Collision Detection Not Working

I am going to be making a 3D game and I need to be able to test for accurate collision. I was able to get bounding sphere collision working (too inaccurate to be used for the whole game), but AABB ...
0
votes
1answer
121 views

How to determine the distance between a point and a rotated rectangle

This question is very similar to How do I calculate distance from a point to a rectangle?. But that question assumes that the rectangle is axis-alligned, or not rotated. So just like in that ...
0
votes
1answer
49 views

Java 2D RPG Game smart pathfinding [duplicate]

Hello I have a top down survival game where you shoot bad guys(green squares). The player can collide with certain tiles and so can the mobs but I want the mobs to go around the tile if there is a ...