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

-1
votes
0answers
13 views

Libgdx- Translate animation is not work [on hold]

In the libgdx how to scale animation.. this code has been not work. ScaleAnimation scal=new ScaleAnimation(0, 1f, 0, 1f, Animation.RELATIVE_TO_SELF, ...
0
votes
3answers
83 views

Dynamic Crafting Systems [on hold]

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
0answers
46 views

Maze game 2D - simple solution [on hold]

I want create simple game for Android using Java in my app where user using his finger moves his hero from top to bottom of the screen, and have to avoid enemies moving from left to right randomly. ...
-2
votes
0answers
23 views

libgdx; how to slide the image ya popup

I want to slide the image foe Example any Car Racing game when choose any car than slide the car popup. thats my problem how to slide the popup in the libgdx. Ya how to use Translate animation ya any ...
0
votes
2answers
85 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
68 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
votes
0answers
24 views

box2d bouncing ball [on hold]

I'm trying to make a program with Box2D that make a ball bounce, but its not working. I don't get any warnings or errors before running it. Here is the code: package com.project.test; import ...
1
vote
2answers
136 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 ...
-1
votes
0answers
23 views

How do I shoot horizontal Lines when the object is moving horizontally [on hold]

So basically, I have this "enemy" moving to the left. I want him to shoot horizontal lines in an interval, but the shooting isn't even doing its job this is my main: UFV theUFV = new UFV(); Laser ...
-1
votes
0answers
65 views

3D Game development in Java [on hold]

I've searched for 3D Game development in Java and I've came across a few libraries but they don't seem to have good tutorials. I've came across: Java 3D(Good tutorials but I've been told that it ...
0
votes
2answers
223 views

Is object-oriented underestimated for game development? [on hold]

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
55 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
105 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
40 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 ...
0
votes
0answers
47 views

Should I enforce “console” control flow? [closed]

I have a game where the user enter commands in a JTextField to interact with the game engine (move his character, get a description of its current location, see his inventory...). The problem is that ...
0
votes
0answers
40 views

Making a player jump [closed]

I am developing a game in eclipse for android and I wont to make the player jump like in flappy bird.I developed some code to make the player jump when the screen is touched but when I run the app and ...
0
votes
0answers
77 views

Calculating Projectile Movement

I'm having some trouble putting together a method that will constantly move a "bullet" in the same direction accurately. Here is what I have so far public Vector3f moveFromPosition(Vector3f location, ...
-2
votes
1answer
49 views

How to spawn multiple enemies? [closed]

I can store it in an array, ok, but after how can i paint it? Because if i do enemy = new Enemy(); enemy2 = new Enemy(); i create two istances of the object, but afer how can i paint it? I use: ...
-1
votes
0answers
52 views

Arcball camera rotation [on hold]

I need some help adding Arcball camera rotation in my LWJGL modern OpenGL game. Right now, I have a camera that follows the player. I want to be able to hold down the right mouse button and move the ...
0
votes
0answers
26 views

Need Help to add a JOptionpane list to my Java Chess Game [closed]

Github Link to full download https://github.com/Jamiex304/Chess-Game I am currently developing a chess game and have ran into a problem Currently when a pawn reaches the end of the other side of ...
1
vote
1answer
56 views

How would you declare a Texture object in the libgdx skin json file, using a region from a texture atlas?

I have a texture atlas that is linked to my skin.json file. The atlas contains a region named "game-title". I would like to declare a com.badlogic.gdx.graphics.Texture object in the json file, to ...
0
votes
1answer
75 views

Location of “units” in Code

So, I've been playing around with the concept of a game, mechanically think of the Civilization games(Tile, turn-based strategy) but I am quite uncertain about where I should store the units location ...
0
votes
1answer
67 views

Per vertex diffuse lighting not propogating across entire model

I'm not sure how to describe this problem so I've added a picture. When I add per vertex diffuse lighting to my model (just a field of cubes for simplicity) the lighting effect applies to each ...
2
votes
1answer
144 views

Avoiding memory allocation in Android game development

For obvious reasons, allocating memory on the fly in Android game development is not recommended. For example: http://developer.android.com/training/articles/perf-tips.html: There are two basic ...
1
vote
1answer
57 views

What is the relationship between glVertexAttribPointer index and GLSL location?

I've been getting some strange results when trying to implement a normals buffer for the purpose of rendering lighting. It seems to be related to the indexes for glEnableVertexAttribArray, ...
-1
votes
1answer
28 views

Screen flashing while window is open [closed]

The screen renders everything in the right place but the entire screen flickers/flashes while it's open. Any Ideas? TileMapEditor class import com.stardust.main.gfx.Assets; import java.awt.Graphics; ...
0
votes
0answers
9 views

Creating bullets at tip of rotateable object? [duplicate]

I am and not very good at trigonometry or whatever it is i'm even using. My problem is that I simply cannot figure out how to create the bullets exactly at the point of my object. The object rotates ...
0
votes
0answers
6 views

Circular references in Nation-Town-Citizens chain [migrated]

Say I have three classes, Nation, Town, and Citizen. A nation contains towns, and a town contains citizens. public class Nation { Set<Town> towns; } public class Town { ...
0
votes
1answer
36 views

TileMap not not rendering

I have a tile map that I would like to be able to move while playing the game. In the code you will see the posX and posY variables. I used these variables so that when I complete this, I can have the ...
1
vote
1answer
47 views

Rotating an object to point towards the mouse [duplicate]

I'm using slick2d for this process and trying to rotate a minigun to face the mouse. My problem is that the minigun in my game is actually rotating but no towards the mouse at all! Also, the minigun ...
1
vote
1answer
66 views

IBO interfering with VBO data?

I have a vertex and color VBO that render a plane (2 triangles) just fine. However, when I attempt to use an IBO to render the plane, the vertices are completely off. My nice square looks all crumpled ...
0
votes
1answer
32 views

Using IBO's with color

I am trying to familiarize myself with IBO's by drawing triangles etc but I'm finding no way to get the color to apply properly. Can I not use an IBO to index the color values as well? I am having ...
0
votes
0answers
79 views

libgdx building 3D terrain

I've been spending a lot of my time working with libgdx scene 2d & have become very familiar with it. I've decided I want to move over to 3D & take a couple of weeks to learn & better ...
1
vote
0answers
39 views

Why does my texture-based object picking detect the wrong object?

I am a LibGDX beginner implementing a RISK-like game. I want to let the player select territories by clicking on them, but for some reason, the wrong territory is sometimes detected. The clicked ...
2
votes
0answers
36 views

Why do my Box2D bodies occasionally get stuck and separate forcibly?

I'm making a space game with LibGDX and Box2D. I made a video here to illustrate the issue. Verbal description: When objects collide, they sometimes get stuck together and are then suddenly separated ...
0
votes
1answer
67 views

Box2D object wont move until tons of force is used

Im making a game for android im using LibGDX and Jbox2D it is a space flying exploration game controlled with the accelerometer. so I have set the world to no have no gravity. the objects in Box2D ...
0
votes
2answers
166 views

How do I make an 8 bit sprite sheet using GIMP or Paint.NET?

I'm looking to create a sprite sheet for an 8 bit, 2D RPG I'm making. All I need to do at the moment is render in some textures. To do this, I want to make an 8x8 sprite sheet. Now, I am really bad at ...
0
votes
0answers
15 views

Projectile Motion in lwjgl with java [duplicate]

I was trying to make a game with a bow and arrow using lwjgl but I couldent get the arch right. I have a function called projectile that is updated once a frame for each arrow. my frame cap is at 60 ...
1
vote
1answer
67 views

Smooth anmiation with LibGDX

I want to move a enemy from its current position toward the mouse position in LibGDX. x, y - enemy position saveX, saveY - position where my enemy need to go(or mouse position saved at specific ...
-1
votes
0answers
42 views

LibGDX Texture width and height must be powers of two

public class Game implements ApplicationListener{ public static int WIDTH; public static int HEIGTH; private Texture texture; private SpriteBatch batch; public static ...
1
vote
0answers
42 views

JBox2D Objects moving slowly (pixel to meter conversion) (SOLVED) [closed]

This problem is solved When trying to program a game using Box2D, I ran into a problem with Box2D. I filled in pixel numbers for the lengths of the the textures and sprites to create a box around it. ...
1
vote
2answers
59 views

How do I make a pop-up window with Scene2D?

I have a main-menu screen with a logo and a bunch of buttons. When the Login-button is pressed, I pop up a dialogue asking for a username and password. This works fine, other than the "popping up". ...
1
vote
0answers
68 views

Rotating a scene around a fixed axis

I am looking for a way to move my scene so that when I translate forward/back/left right it moves directly up/down/left/right on the screen. Currently it does do that until I rotate (by anything ...
2
votes
1answer
111 views

How do I multiply two RGBA colours?

I have two RGBA integers. What procedure should I perform on them to return the multiplied colour? Do I need to split the RGBA integer into its component integers (R, G, B, A)? I'm using this for a ...
1
vote
1answer
66 views

How can I do a weighted cascade down a path in a 3D environment?

I am trying to perform a weighted cascade down a path in a 3D environment. Now, what I am trying to do is have one object(a cube) in the environment scan from its coords 1 in every direction for ...
0
votes
0answers
46 views

Need some guidance implementing event based game loop in JavaFX card game

i tried to make the title as much informative as possible. Anyhow, i'll try to be brief - I'm fairly new to java programming and programming altogether, after learning the basics and some advanced ...
0
votes
0answers
37 views

Slick 2D - how to substract two vectors?

I have two vectors:- Vector2f enemyVec = new Vector2f(enemyX, enemyY); Vector2f playerVec = new Vector2f(playerX, playerY); According to docs, I can use the "sub" method to substract two vectors ...
2
votes
1answer
37 views

Libgdx : point that scrolls on the edge of a circle

I'm not very familiar with libgdx vectors. I want to create my own joystick-controller and I want to know how can I find the coordinates of B by using Vectors. I can calculate the radius and I have ...
-1
votes
0answers
35 views

How is PokeMMO made (2D) or how they did it? [duplicate]

PokeMMO is a 2D Java Game, i wonder how they made it does some know how they did it?
0
votes
0answers
87 views

How can I make a swinging rope?

Base question: How can I make a swinging rope in box2d? Context: The idea is to have a rope where the player can grab it, swing a little bit to get more "momentum" and reach the next platform. Like ...