Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
3
votes
3answers
417 views
Suitable Client Server setup for Network Game testing
I want to test my Client/Server game for which, currently, I am using localhost for both Client and Server.
Obviously I'm not getting any fluctuation in data and measure idea of performance, and in ...
3
votes
2answers
705 views
Managing animations
I'm developing a 2d game that requires sprite based animations. I was thinking about which is the most convenient way to manage many of these sprites all together with timings.
I already know how ...
3
votes
2answers
94 views
Converting double “perlin noise” value to a set of colors
I've been working all day at learning perlin and other methods for generating terrain. I have a 2d top-down game and I need to generate random regions of connected colors. I've been playing with ...
3
votes
3answers
106 views
How do I undo changing the color of an image in Slick2d?
This code colors the enemy red:
enemies.get(i).image.setColor(0,1,0,0,1);
enemies.get(i).image.setColor(1,1,0,0,1);
enemies.get(i).image.setColor(2,1,0,0,1);
enemies.get(i).image.setColor(3,1,0,0,1);
...
3
votes
1answer
257 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 ...
3
votes
1answer
141 views
How do I export a Java project on Eclipse as an executable? [closed]
I made a Java project with images, external JARs, and natives(the JARs and natives are for LWJGL and Slick). How can I export this as an executable? I already tried JarSplice and WinRun4J, but when I ...
3
votes
1answer
214 views
How can I set the rotation of a shape to the same as my image?
The way you set rotations of images is different from setting shape rotations.
So how can I make the shape have the same rotation as my image?
This is how my image rotates:
...
3
votes
1answer
697 views
Circle-Rectangle collision in a tile map game
I am making a 2D tile map based putt-putt game.
I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
3
votes
3answers
1k views
Ball collisions 'sticking' together
I have a program which simulates many bouncing balls. The balls can bounce off each other and off the sides of the container.
The problem I am having is that sometimes when two balls collide, they ...
3
votes
3answers
693 views
tic tac toe computer opponent
I am just starting to do some very very very basic game dev(in java), i'm trying to create a game of tic tac toe but i am having some trouble implementing an a computer opponent.I just wanted to know ...
3
votes
2answers
2k 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 ...
3
votes
1answer
656 views
Get shape of my bodies using Box2D
I would like to get the shapes of my bodies, but I can't get anything, only null. Why?
Here is the relevant code section:
Body b;
while((b = box2d.physics.PhysicsWorld.world.getBodyList().getNext()) ...
3
votes
1answer
455 views
Online architecture guide
I am a newbie in gamedev, and I don't know about programmer's problems that can appear during development.
So can you advice me some best practice for starting build new online multi-player game ...
3
votes
2answers
661 views
Mouse-driven Movement
I'm trying to write a game where player picks where they are going by just mouse-clicking on that position and it goes there (just like RuneScape's point-and-click mouse interface).
I'm trying to get ...
3
votes
1answer
70 views
LWJGL Eclipse Resource Deployment
I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now ...
3
votes
1answer
294 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 ...
3
votes
2answers
220 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. ...
3
votes
1answer
608 views
Android Coordinates
Is their a way to make it where no matter what the screen size is my sprites will always start at a certain position. I am trying to get my sprites to start in the lower right corner area of the ...
3
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 ...
3
votes
1answer
119 views
Cut a translucent square in a texture
How to remove (cut-out) a transparent rectangle in a Texture, so that the hole will be translucent.
On Android I would use the Xfermodes approach:
...
3
votes
2answers
473 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 ...
3
votes
1answer
151 views
Moving the jBullet collision body to with the player object
I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
3
votes
2answers
154 views
Android Array Lag?
I am making a platform game for Android. It is sort of a tile based game. I added bullets and enemies with AI and a bunch of tile types.
I created a simple map with no Enemies. Everything was running ...
3
votes
1answer
245 views
Best way to Draw a cube for 3D Picking on a specific face
Currently I am drawing a cube for a game that I am making and the cube draw method is below. My question is, what is the best way to draw a cube and to be able to easily find the face that the cursor ...
3
votes
1answer
281 views
How do I call glVertexPointer in Java?
I'm trying to convert the following code to Java:
glVertexPointer( 3, GL_FLOAT, 0, &(mesh.m_PositionBuffer[0]) );
Where mesh::mPositionBuffer is std::vector<glm::vec3>;
How would I make ...
3
votes
1answer
212 views
How can I organize code for views efficiently?
I'm making a video game for the Android platform and I need advice on the overall set up of the activities and views in the code. I don't need actual code, psuedocode will do, but actual code always ...
3
votes
1answer
652 views
Ray picking - get direction from pitch and yaw
I am attempting to cast a ray from the center of the screen and check for collisions with objects.
When rendering, I use these calls to set up the camera:
GL11.glRotated(mPitch, 1, 0, 0);
...
3
votes
2answers
3k views
Starting Java 2D Platformer using LWJGL
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 ...
3
votes
1answer
773 views
Developing for Chrome App/Android?
I have been developing for win7 mobile (XNA/silverlight and will continue to do so, love everything about it) but I wanted to branch a few of my more polished games to google app store online, and ...
3
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 ...
3
votes
1answer
270 views
Implementing a hook (Like pudge in Dota)
I'm coding a new game, which involves hooking.
Ive been testing a couple of ideas now and im quite stuck.
The player can throw a "hook" which fires away in the aimed direction, until it hits ...
3
votes
1answer
118 views
AI surrounding algorithm suggestions
I am building up a simulation where predator groups (tribes) try to hunt other agents in the simulation (whom also are clustered in groups).
Now I got to a point where members of a group follow their ...
3
votes
1answer
223 views
Rotating 3d plane to XY plane
I have a triangle in 3d space and would like to create a grid over the triangle, such as in the image below.
The purpose of this is to store information about each block of the grid. In order to ...
3
votes
1answer
383 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 ...
3
votes
1answer
213 views
Revamping my GUI to be more efficient and less brute
I am building a Java game from scratch right now. So far, it runs fine, but the issue is with my GUI and how it works. Basically, it's a tile-based game. Each time the person moves a different image ...
3
votes
3answers
2k views
How to render axometric/isometric tiles that are a 2d array in logic, but inclined 45º visually?
I am making a tile-based strategy game which i plan to have 2.5D visuals in an axometric/isometric fashion.
Right now i'm programming it's logic and rendering it as a literal 2-dimensional array ...
3
votes
1answer
635 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 ...
3
votes
2answers
2k views
Java Slick2d - How to translate mouse coordinates to world coordinates
I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen
public void render(GameContainer gc, Graphics g) throws SlickException
...
3
votes
1answer
833 views
How do I implement smooth movement in a Box2D platform game?
I have implemented a character in JBox2D which moves with the help of a wheel rotating at the bottom of it. The movement is the best result I've had 'till now but it's a little glitchy when the ...
3
votes
1answer
334 views
Photon alongside LibGDX
Can anyone point me to a possible implementation of the Photon network engine along with LibGDX for Android? Or any multiplayer networking SDK for all that matters.
From reading source code it ...
3
votes
1answer
3k 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 ...
3
votes
1answer
560 views
Fire simulation using java and opengl
i'm newly working with opengl. I'm trying to create a simple program that will simulate fire. My question is what are the ways other than particle effects to simulate fire. And can fire simulation ...
3
votes
1answer
8k views
Loading PNG textures for use in Android OpenGL ES1
I'm very new to Android and OpenGL coding (I have previously used ogre3d). I am trying to find an efficient way to load PNG textures. It is currently taking around 8 secs to load 3 512x512 textures ...
3
votes
2answers
2k views
How do you structure a 2D level format with collisions etc. in Java (Slick 2D)?
I am developing a game in Java. 2D Fighter, Kind of like the 2d flash game Raze(http://armorgames.com/play/5395/raze). I currently am using the Slick 2D game library and am researching how to ...
3
votes
1answer
458 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 ...
3
votes
1answer
652 views
Is there any way to get the HWND from a window in LWJGL?
I've started some experimentation in Java and LWJGL (via Slick), and it seems very solid. However, I have some legacy code that requires a HWND integer as a parameter. I'm not sure how I'd be able to ...
3
votes
1answer
878 views
State of art shadowing technique for OpenGL on isometric terrain?
What's the most efficient way of creating shadows for object on a isometric terrain with OpenGL and JOGL? Note that this terrain is not flat and is not heightmap generated. Think it as another model. ...
3
votes
1answer
1k views
Handling game states for Android
Currently developing a game for Android. I went through a tutorial to get sprites, loop, etc. up and running, and it all works fine. The way it is currently set up is that Main creates a canvas, the ...
3
votes
1answer
115 views
Need some advice on a java api to use for a 'presentation display board' - based on game 2d/3d tech
As part of the project i am working on I am looking to produce some software that works on a LCD display (think call center info boards) and displays various graphs (the bars grow etc in realtime, so ...
3
votes
2answers
134 views
How To Correctly Extend the Sprite Class in LibGDX
I am currently pursuing game development as a hobby, and have run into what seems to be a conflict in my mind regarding how to properly (using best practices) extend the Sprite class in LibGDX (or for ...