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

5
votes
1answer
296 views

How can I create a 3D model in Java without using modeling software? [closed]

I am a lightly experienced game developer and this is my first time trying 3D objects in Java for the first time. I have been recently creating and updating games using AWT, Swing, and Graphics, but I ...
4
votes
3answers
2k views

How can I make my main character move in a parabolic arc when jumping?

I'm entering Android game development, and I already have a computer version of a game I want to publish. The thing is, I want to make this as good as it can be. With that said, I need a physics ...
4
votes
3answers
2k views

Why is my velocity decaying?

Programming in Java. Tinkering around with physics. My entities all have position and velocity. In the main loop, all I'm doing is applying gravity and bouncing off the edges, like so: // add ...
4
votes
3answers
319 views

Saving instances of classes, then recreating the instances [closed]

I have many types of entities, each type has a lot of if instanceof Spider (for example ) then do this in the game code... Now I got to the part where I want to save each type. They all are based on ...
4
votes
3answers
2k views

GameState management hierarchical FSM vs stack based FSM

I'm reading a bit on Finite State Machines to handle game states (or screens). I would like to build a rather decent FSM that can handle multiple screens. e.g. while the game is running I want to be ...
4
votes
5answers
2k views

Is there a cross-platform special directory I can use for game save files?

I'm developing with LWJGL and Java on a Windows 7 laptop. I've successfully set up saving to the %appdata%\gamename\saves\ or long form c:\users\user\appdata\roaming\gamename\saves\ folder by using ...
4
votes
1answer
2k views

Scrolling tile system

I know this is a common question, but I can't find an answer to it that isn't written using a huge game library sadly. I'm trying to write a scrollable tile system, which allows the user to move ...
4
votes
2answers
858 views

Sprite batching in OpenGL

I've got a JAVA based game with an OpenGL rendering front that is drawing a large amount of sprites every frame (during testing it peaked at 700). Now this game is completely unoptimized. There is no ...
4
votes
4answers
464 views

Can a high FPS negatively affect how a program runs?

Yeah I know this is a broad question and will get down rated, I'm just hoping for some answer before it gets closed. Anyway, I'm using Slick 2D/Java to play around with graphics. I'm having some ...
4
votes
2answers
3k views

How can I move a sprite in the direction it is facing?

I'm using Java/Slick 2D. I'm trying to use the mouse to rotate the sprite and the arrow keys to move the sprite. I can get the sprite to rotate no problem, but I cannot get it to move in the direction ...
4
votes
3answers
468 views

Java Anti-Cheat Framework? [closed]

Are there any anti-cheating frameworks for Java games in order to make it a bit harder to cheat? (eg. something that protects from things like Cheat-Engine) Obviously if the cheater were to develop ...
4
votes
2answers
284 views

Minesweeper: Mouse listener problem

I have wrote a code for game Minesweeper and there is no problem with the graphics,but there is some problems with MouseListener. Here is my code /* * To change this template, choose Tools | ...
4
votes
4answers
648 views

More efficient in range checking

I am going to use a specific example in my question, but overall it is pretty general. I use java and libgdx. I have a ship that moves through space. In space there is debris that the ship can ...
4
votes
3answers
907 views

How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes?

I have been working on an isometric minecraft-esque game engine for a strategy game I plan on making. As you can see, it really needs some sort of shading. It is difficult to distinguish between ...
4
votes
2answers
331 views

How can I mod an item to take experience from a player in Minecraft?

I am creating a mod that has invincible tools which take experience from the player each time they are used. Can someone please tell me how to make the tools take away the experience when used?
4
votes
4answers
17k views

Android game scrolling background

I'm just trying to figure out the best approach for running a scolling background on an android device. The method I have so far.... its pretty laggy. I use threads, which I believe is not the best ...
4
votes
2answers
647 views

Separate loops for logic (tps) and rendering (fps)

I'm converting a game that was using a very basic game loop that executed update/render methods 20 times per second to lwjgl. I'm using the fps loop examples in their wiki, but have found that while ...
4
votes
1answer
340 views

Clock hand, how much should I rotate the hand by every frame?

I've got a virtual clock. The clock consists of the actual clock sprite, and a hand to go over it. I'm able to set how long the clock duration is. Say I set it to: 5 seconds. While the clock time is ...
4
votes
2answers
4k views

Texture antialiasing?

In my Minecraft-clone style game, blocks are textured with a border that is lighter then the block color. See picture below: To achieve this effect without the textures being blurry I use this ...
4
votes
1answer
1k views

Android Game Dev: Screen Scaling

This question is very closely related to a previous question of mine: Scaling a game view with letterboxes? My game runs at 480x800 right now but when the screen is smaller or bigger than that I ...
4
votes
3answers
5k views

Server-side Architecture for Online Game

basically I have a game client that has communicate with a server for almost every action it takes, the game is in Java (using LWJGL) and right now I will start making the server. The base of the ...
4
votes
1answer
154 views

How do I make a cube move by rolling?

I am learning jMonkeyEngine by making some small games with it. I have a simple rectangular cube that I want the player to be able to roll around the game world. When he presses the arrow keys, the ...
4
votes
3answers
372 views

Are there methods faster than Strings for sending a sprite's state over UDP?

I'm programming a 2.5D networked game in Java. The networking works like this right now: Create new networked sprite object at the client. Send it to the server. Server distributes and saves it. ...
4
votes
1answer
372 views

Splitting logic into threads in Java tower defence game

I'm making a tower defence game in Java! It's my first game development. I want to know how many threads Do I need to create in a game, to split logic.. I've made this one: Main App thread (adds ...
4
votes
1answer
675 views

Particle System OpenGL (ortho)

I want to implement a particle system in my game but i have no idea where to start :S I've never programmed a particle system, so this is my first time >.<. I only want to display pixels ...
4
votes
5answers
995 views

How to get more than one window in Java LWJGL

I'm trying to write a game in Java LWJGL. And I need more than one (multiple) display window. By default I've got one display window where I can draw everything. But I'd like to split some data to ...
4
votes
3answers
3k 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
2k 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
448 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
753 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
1k 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
735 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
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
237 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
374 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
273 views

Move penetrating OBB out of another OBB to resolve collision

I'm working on collision resolution for my game. I just need a good way to get an object out of another object if it gets stuck. In this case a car. Here is a typical scenario. The red car is in ...
4
votes
1answer
295 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
1answer
352 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
1k 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
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
1k 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
378 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
233 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
773 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
4answers
601 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
990 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
1k 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 ...