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

4
votes
1answer
852 views

Scaling a game view with letterboxes?

I'm creating an Android game and I want everyone who plays it -- no matter the size or shape of their screen -- to see the same 480x800 playfield but, depending on the actual resolution of their ...
4
votes
2answers
3k views

What Java library provides a high-level communication interface suitable for use in an action-game server?

I need to write a server for an action game, which needs fast communication with the client. There will only be one server, and I'll split the world in zones. The client will be written in Java using ...
4
votes
3answers
4k views

How to give delay in java

I wan tto give delay in java without using thread. I need to load images one by one with approx half second delay. Is there any way to do this other than thread because if I am using thread my whole ...
4
votes
1answer
4k views

The most efficient and accurate game loop?

Obviously for a game to work you need a game loop... Normally, my game loop would consist of something like this: while(running){ update(); render(); Thread.sleep(10); } This seemed to ...
4
votes
1answer
629 views

Drawing isometric walls

I'm having some trouble with isometric walls. I'm drawing isometric floor tiles using the back to front rendering method, and it works fine. I also keep my floor tiles lined up properly in a nice ...
4
votes
2answers
1k views

Bitmap Font Displays in Center Always Without Coding it Manually (Fix Coordinate Problem onText)

Is there a way on how to stay the texts in center without manually coding it or something, especially when making an update? I'm making a display for the highest score. Let's say that the score is 9. ...
4
votes
1answer
2k views

Access vertex data stored in VBO in the shader

If I wanted to store extra data in a VBO for skinning (indices for indexing into an array of matrices of bones and floats for applying weights to those bones) How would I go about accessing that data ...
4
votes
2answers
2k views

How to get smooth transition within slick?

When a player clicks start, my app immediately switches to the first level. My question is how do I incorporate a smooth transition within Slick?
4
votes
1answer
1k views

In a component/entity system, what's the correct way to implement entity-specific components?

I'm trying to create a basic C/E game engine for Android, and I'm trying to re-create pong as a basic warm-up. I currently have a EntityManager class that contains a list of all the UUIDs for its ...
4
votes
1answer
2k views

How can I detect collision between a circle and a rectangle?

i'm trying to make a clone of brick breaker, one problem that i am running in to is to do with collision. i know how to detect if a collision has happened but i do not know how to check what side of ...
4
votes
3answers
1k views

Collision Detection in Java for a game

Im making a game in Java with a few other people but we are stuck on one part of it, making the collision detection. The game is an RPG and I know how to do the collision detection with the characters ...
4
votes
1answer
641 views

unable to launch LibGDX Particle Editor.jnlp

I am not able to launch LibGDX ParticleEditor.jnlp file on my system(win7 64 bit) with java7. when I execute this file with javaws.exe in jre7/bin folder, it displays splash screen of badlogic games ...
4
votes
4answers
455 views

Storing data for a pokemon like game

The game I'm developing is close to Pokemon. How should I store the data? I am currently thinking of text files where I save the map and have a corresponding textfile for the trainers and their teams ...
4
votes
1answer
353 views

Android Java: Way to effectively pause system time while debugging?

In my project, I call nanoTime and use that to get a deltaTime which I pass to my entities and animations. However, while debugging (for example, stepping through my code), the system time on my ...
4
votes
3answers
1k views

How to Align Gun with Bullets

I have a top-down 2D shooter. I have an image of a player holding a gun, that rotates to face the mouse. Please note that the gun isn't a separate image tethered to the player, but rather part of the ...
4
votes
1answer
426 views

Store data on server or only in database?

I have been working on programming an online RPG in Java for a while now. It's a huge project and way too hard for me, but I'm having fun learning. server and client: Java database: MySQL I have ...
4
votes
1answer
2k views

Box2D platformer movement. Are joints a good idea?

So i smashed my brains trying to make my character move. As i wanted later in the game to add explosions and bullets it wasn't a good idea to mess with the velocity and the forces/impulses didn't work ...
4
votes
2answers
1k views

2D game - Missile shooting problem on Android

I have to make a tank that sits still but moves his turret and shoots missiles. As this is my first Android application ever and I haven't done any game development either, I've come across a few ...
4
votes
1answer
2k views

New Vector Calculation for Elastic Collision of Circle and Fixed Rectangle

I am writing a fairly simple breakout-style game for Android phones. I have successfully detected the collisions between the ball(s) and bricks. The problem that I am having is in calculating the new ...
4
votes
1answer
2k views

How do I draw a full resolution texture to a window of the same resolution?

My image is 1280x800, and my screen size is 1280x800. It should draw perfectly. I'm creating a quad the size of the screen, and setting the texture to fit the quad. But right now it draws a square ...
4
votes
2answers
315 views

Inventory Grid Detection

I'm working on creating an inventory system for a game. The inventory system will use cells and 2D images to represent items, like Minecraft, Diablo, or WoW. I've hit a bit of a snag when trying to ...
4
votes
2answers
1k views

Slick2D Isometric TiledMap Rendering Problem

I created a Tiled Map using the Tiled Map Editor. In the Editor it looks like this: Desired State In my java program it looks like this: Actual State My java code is: public class Game extends ...
4
votes
1answer
1k views

Need info on creating a tile grid data structure in Java

I'm trying to create a game with a fixed size map (2D Tile array). I suppose I can inherit other tiles from this base Tile, e.g.: a BankTile. Placing and removing tiles is all too easy, but forming ...
4
votes
4answers
685 views

Point of contact of 2 OBBs?

I'm working on the physics for my GTA2-like game so I can learn more about game physics. The collision detection and resolution are working great. I'm now just unsure how to compute the point of ...
4
votes
5answers
1k views

Should my game handle collisions in the Player object?

I'm making a 2D platform game. Right now I'm just working on making a very generic Player class. I'm wondering if it would be more efficient/better practice to have an ActionListener within the Player ...
4
votes
1answer
2k views

Distributing cross-platform .jar containing natives for LWJGL?

I'm making a game in Java using Slick2d, which depends on LWJGL. I can get everything to work in my development environment, but when I export it to a .jar, it needs the natives placed in the same ...
4
votes
2answers
4k views

Starting Java 2D Platformer using LWJGL [closed]

Getting started on a 2d platforming project in java. I've decided on using LWJGL and OpenGL, but I don't quite know where to start. What is typically the first thing one would work on with a ...
4
votes
2answers
231 views

Developing an Asteroids successor: which languages/tools/frameworks?

Currently I'm planning to run the Asteroids successor on the Java Virtual Machine, while writing the code in Scala (because that's the language I'm fluent in). I have looked at different options, ...
4
votes
1answer
378 views

Spriting engine on mobile platforms, OpenGLES

I'm writing a basic spriting engine for a blackberry app, and I want to know the best way to draw tons of sprites using the glDrawArrays() command. We have several sprites that move around the ...
4
votes
1answer
1k views

Best way to store a word list in Java/Android

I'm building a game where I form words (think Scrabble) and I need to have them validated in real-time, meaning that I need to have some sort of word list loaded where I can check if the word made ...
4
votes
1answer
118 views

Large 2D Arrays Causing Garbage Collection

I've been working on a game in Java that, for this post's sake, looks like Terraria and has random world generation. I've been using Vectors to contain my tile/block objects, but recently due to the ...
4
votes
1answer
1k views

using heightmap to simulate 3d in an isometric 2d game

I saw a video of an 2.5d engine that used heightmaps to do zbuffering. Is this hard to do? I have more or less no idea of Opengl(lwjgl) and that stuff. I could imagine, that you compare each pixel ...
4
votes
2answers
422 views

2.5d with box2d - approaches from the top and bottom

So, I'm using box2d for my 2.5d game (think double dragon, tmnt arcade, castle crashers) where you can move around on the z-axis (faked as y-axis movement). Basically, I have box2d only doing ...
4
votes
1answer
468 views

2d coordinates vs x/y screen positioning

I have a 2d top-down view tile map game, that generates random color tiles (water colors) as you move the character. I've been positioning elements on screen using the x/y coords (finding a way to ...
4
votes
1answer
385 views

What to pass to scripting

I am using Java and libgdx to create a game and have decided to go a data driven approaching with Jython for this refactoring (just picked up Jython, have used Java for a while). The game is a ...
4
votes
5answers
5k views

Why does my rectangle-circle collision handling misbehave in this fashion?

Ok so this is for a small uni project. My lecturer provided me with a framework for a simple brickbreaker game. I am currently trying to overcome to problem of detecting a collision between the two ...
4
votes
1answer
1k views

Create the right pom.xml for LWJGL and Slick Project (Maven)

can somebody tell me whats wrong with my pom.xml file? At this point i get this error if i start my *.jar file: C:\Users\Michael\git\freezing-robot\target>java -jar ...
4
votes
1answer
211 views

Clicking on clues and other objects in a 2D cluedo like game

I'm a java/android programmer, but I don't have any experience in game programming, I'm already reading proper books, like "Pro Android Games", but my concerns are more about the ideas behind game ...
4
votes
1answer
3k views

Starting a Java activity in Unity3d Android

I wrote a small Java activity extension of UnityPlayerActivity similar to what is described in the Unity docs. It has a method for displaying a song picking interface using an ACTION_GET_CONTENT ...
4
votes
1answer
3k views

libGDX Multitouch Controls

Has anyone had any trouble implementing multitouch on-screen controls in libGDX, such as multiple joysticks? I've tried and I can't seem to get libGDX to play nice with multitouch/multiple pointers on ...
4
votes
1answer
5k views

Using the AssetManager in LibGDX

I am trying to use the AssetManager class in LibGDX and I understand how it works but I am trying to implement a loading screen. I have followed the AssetManagerTest.java file here, but I am having a ...
4
votes
1answer
421 views

Network Game testing via Wireshark

How can i check/inspect the performance of my network game via Wireshark and specifically the Graphs available in Wireshark,i want to test the performance of my network game. which kind of graphs can ...
4
votes
3answers
2k views

2D basic map system

i'm currently coding a 2D game in Java, and I would like to have some clues on how-to build this system : the screen is moving on a grander map, for instance, the screen represent 800*600 units on a ...
4
votes
1answer
729 views

Most efficient way to handle coordinate maps in Java

I have a rectangular tile-based layout. It's your typical Cartesian system. I would like to have a single class that handles two lookup styles Get me the set of players at position X,Y Get me the ...
4
votes
3answers
2k views

Java and Eclipse setup properly, how do I install JOGL or LWJGL?

I have my Java environment installed alongside Eclipse, and I was successfully able to create and run a new project (simple System.out.println("Yay I work!"); I have the OpenGL SuperBible, and I ...
4
votes
3answers
359 views

How do I change the relative origins of a Box2D World and a TiledMap in Libgdx?

I'm playing around with Box2D and TiledMaps and I've come across this minor annoyance. As you can see, both Box2D and TiledMap render at the center of the screen. This forces me to compensate by ...
4
votes
2answers
186 views

Graphics card settings tampering with my Java game

I'm working on a simple 2D side scrolling platform game in java. It is a canvas with a bufferstrategy which is placed inside a jframe, and that jframe is set as the fullscreenwindow on the graphics ...
4
votes
1answer
1k views

2D Software Lighting Issues in Java

I'm creating a 2D top-down tiled game in pure Java and by now I'm trying to implement a way to do lighting. First, some details on how I render: there is a screen class which handles all the ...
4
votes
1answer
806 views

Networking library compatible C++ and Java

There is any networking library like eNet compatible with Java and C++? 'm trying to find a way to communicate an Android game in Java with a C + + server, but I prefer to use a network library ...
4
votes
2answers
1k views

OpenGL Lighting [duplicate]

I have a simple day and night cycle by at day disabling OpenGL lighting and at night enabling openGL Lighting. When I enable everything appears darker. My question is How would I make it that at a ...