Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
0
votes
1answer
277 views
Please help me with my 2D isometric tile picking [duplicate]
Possible Duplicate:
How to convert mouse coordinates to isometric indexes?
Okay, I apologise in advance if I make no sense here.
Basically, I've got a simple application that takes in a ...
3
votes
1answer
253 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 ...
0
votes
0answers
39 views
Creating transparent image with localGraphicsConfig not always working
Consider using the following, commented-out code (https://github.com/kozie/twodee/blob/master/src/nl/kozie/twodee/Display.java#L135-L136).
This creates an empty image which i'm filling with a mosaic ...
3
votes
1answer
112 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 ...
0
votes
1answer
114 views
Good way to store entity data
I'm building an RPG style game, but i have some trouble with storing data from entities. These entities can carry data including but not limited to their location, their graphics, whether they are ...
0
votes
1answer
172 views
Box2D and Slick2D: Graphics bug [closed]
The bug
The physics ground represented by a horizontal line. The object is stationary, and seems to be pretending that the ground is lower. This is because the center of the Shape is incorrectly ...
8
votes
2answers
281 views
How well do functional languages perform on Android?
This is a special case of this question that I feel is particularly pertinent.
I'm working on a game for Android, and I'm planning on using Scala with libgdx. I'm planning on making a performant ...
0
votes
0answers
76 views
gluLookat with LWJGL problems
I am very new to any sort of 3D programming and a lot of the resources either don't explain what each function or command is doing, or assume you have all of the knowledge already. I've looked at a ...
3
votes
1answer
204 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 ...
0
votes
0answers
125 views
Slick 2D jar creation
I recently finished making my game using Slick2D, and now I'm trying to create a jar file to play the game. I looked on the Slick forums, and saw that JarSplice was the recommended program. So I used ...
3
votes
1answer
275 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
69 views
Background Y-axis repeated movement [closed]
I'm developing a racing game using eclipse and need to move the background from top to bottom i.e., increment yaxis the backdround moves when required, but is not repeating itself eg. like any bike ...
-6
votes
1answer
199 views
Java 2D tile map and rendering it [closed]
Please help me! I am thinking of generating different terrains environment every time the game loads again. But i am thinking of loading or drawing a image containing all the units like river, land ...
0
votes
1answer
73 views
Creating a alive object list
I'm currently working on a Java game
I know a lot of games created all instances of objects beforehand and then bring then in and out of play when they are needed.
Will it be worth it to have a ...
-3
votes
1answer
343 views
Slick2D TileD Map Editor Properties [closed]
So I used the following post to help me render my isometric map in Slick2D:
Slick2D Isometric TiledMap Rendering Problem
Big thanks and credit to arminb for the code supplied and for the fix to be ...
0
votes
1answer
86 views
How to load images on startup
I want to load all my game's images on the game's startup and have a loading bar to show it's progress. I already know how to create and display the loading bar, but I can't figure out how to load the ...
2
votes
0answers
68 views
Pitch (X-axis) rotation problem [closed]
Situation:
From a first person perspective (camera position) I want to be able to grab an object and have it fixed to the center center of the screen while looking up-down (pitch) and looking ...
0
votes
0answers
61 views
Trouble exporting code from eclipse using JarSplice
I have developed a fairly simple game, 3d dimensional, using lwjgl & lwjgl_util. After exporting it using jarsplice, everything works fine, except for some reason I have to have the res folder in ...
3
votes
2answers
445 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 ...
0
votes
1answer
73 views
Find the footprint of an isometric entity
I'm working on making a 2D isometric engine in Java. I'm getting into collision detection and I've hit a bit of a problem.
Characters in-game are not restricted to movement from tile to tile - they ...
0
votes
1answer
157 views
Changing Yaw, Pitch And Roll OpenGL
I'm using LWJGL and OpenGL 1.1 at this time and I was wondering what command is used to change the yaw, pitch and roll?
3
votes
1answer
136 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 ...
0
votes
6answers
466 views
Can I develop a game on PC in Java and move it to Android?
I have fairly good experience with Java, but new to Android development. I would like to develop a 2D game which would have animations and online play.
Can I initially develop this game on my pc ...
2
votes
2answers
180 views
How to stack units in a tile based game?
I'm trying to make it so that no more than 5 units can be stacked on a tile. I have a Tile class that creates each tile's preferences. Should I store the units in an array or arraylist in this class?
0
votes
1answer
178 views
How do I spawn enemies with a delay using threads?
Right now I have this:
Thread enemySpawner = new Thread(new Runnable() {
public void run() {
if(world.getCurrentState() == gameState.GAME) {
world.spawnEnemy(x, y);
...
0
votes
0answers
36 views
Errors calling certain gl-based classes
Following this example code, I'm trying to use glGenFramebuffersEXT(), GL2.GL_FRAGMENT_SHADER_ARB, but I get these
two types of highlighted errors wherever they are called:
The method ...
1
vote
1answer
143 views
Alternative to JSF for browser-based 4X game [closed]
I intend to make browser based MMO game. Something from Master of Orion genre but with more accent on command ship operations.
I've done some tests and research and turns out that indeed, for ...
5
votes
2answers
327 views
One Dimensional Perlin noise vs Multi-Dimensional
I am reading through a book called "The Nature of Coding" and I am working on porting the examples from Processing.js to Regular old Java. The example I am on uses the following method call in ...
3
votes
1answer
334 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 ...
0
votes
0answers
236 views
3d game Android development libraries? [closed]
Are there any good solutions such as libraries and add on's for developing a 3D Android game in Java, neither of these are designed with 3D Gaming in mind obviously.
1
vote
0answers
84 views
2D Java Networked Game Coordinate Updating [closed]
I'm currently developing a networked 2D MMO-style game in which several thin clients (ran in an applet) are able to connect to a server and well, do MMO-style "things"!
Some more background on the ...
1
vote
1answer
85 views
Deciding when to switch focus between UI elements
I've been coding a simple logic game recently and there is a UI decision that has been bothering me.
Since certain blocks of logic are going to be used across many levels (e.g. logic to reverse the ...
2
votes
2answers
294 views
How do I get the touch event on a body in Box2d(Java)
I have various bodies rotated at some angle with the help of Box2d in libGDX. What I want is to destroy the body when I click on it, but the problem is that I am not able to get the area definition of ...
0
votes
1answer
183 views
Texture will not rotate with gluSphere
I have a gluSphere generated in my display that is rotating, but having a problem with the texture rotating with the sphere as well. So in a nutshell, no matter how the sphere rotates, the texture ...
0
votes
0answers
88 views
Drawing Projected Vertices/Faces In Order
I recently created a 3d engine, and have gotten to what is (as I've found) the hardest part so far. I need to sort the objects and then draw them. I've looked at sorting algorithms, but my case is ...
1
vote
1answer
136 views
Mapped texture to a gluSphere not wrapping correctly
I have a 3D sphere rendered using JOGL by means of GLUquadric. I'm trying to add a texture but it is not rendering as correctly.
Does anyone understand why the texture (upper-right of sphere) isnt ...
0
votes
0answers
130 views
LWJGL Mouse Input [closed]
I have this mouse function in my LWJGL program:
public void mouseInput(){
int mouseX = Mouse.getX();
int mouseY = 600 - Mouse.getY();
int mouseDX = 0, mouseDY = 0;
int lastX = 0, ...
6
votes
4answers
349 views
Implementing AI to hide behind obstacles
I am developing an AI simulation of predator and prey. I would like to simulate the AI hiding behind obstacles, if it is being chased. But I am still trying to figure out the best way to implement ...
0
votes
2answers
157 views
Cant import Sun openGL
I've been working with JOGL and I've ran into a problem. The problem is when I try to import import com.sun.opengl.*; on Eclipse, Eclipse doesn't recognize it. Does anyone know where this library is? ...
1
vote
4answers
460 views
How can I remove enemies from my ArrayList after they have died? [duplicate]
Possible Duplicate:
How do I best remove an entity from my game loop when it is dead?
Right now, I have an ArrayList like this:
List<Enemy> enemies = new ArrayList<Enemy>();
...
0
votes
0answers
76 views
How to monitor the object position while it moves from one place to another?
In my game two objects rotate in opposite directions and at one particular
place, the two objects meet. In that place I want to track the x and y degrees.
If this is possible please share your ideas.
...
1
vote
1answer
236 views
TextureRegions and TextureAtlases in AndEngine
This is my first android game, sorry if my code is bad, any advice will help. I am trying to find ways to improve performance on a game of mine, I'm using AndEngine GLES2. I have a basic question ...
5
votes
4answers
596 views
Should each Entity have its own update and render methods?
First, the questions:
Should each Entity (which are classes like Character, Tree, Enemy) have its own update() and render() methods?
If that's the case, then should I use Interfaces like ...
4
votes
1answer
250 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 ...
-1
votes
1answer
143 views
Tilemap collision detection strangeness [closed]
I have used this code, or code very similar to it, to detect collisions between rectangle shaped entities and a tilemap for a long time. When I read the code it seems to me that it is impossible for ...
15
votes
2answers
737 views
Graphics not being displayed on OUYA
I hope its not too early to be asking OUYA dev questions, but I just got my dev kit and I want to get my game running ASAP! I am using LibGDX as my framework for my game and launching the Android ...
2
votes
2answers
186 views
How to get enemy to follow character using angles? (atan2)
I have an enemy and a character to control. I want to get the enemy to follow the character in a straight line. I already found the angle in which the enemy needs to travel.
double angle = ...
0
votes
2answers
82 views
Pathfinding with Less Desirable Squares that are still passable
I have been looking at different path-finding algorithms for my game. I have almost settled upon D* Lite, but have a question. (perhaps I missed it in the documentation) -
Are there any algorithms, ...
0
votes
0answers
688 views
Issues playing audio with Slick 2D [closed]
Started trying to learn Slick 2D a few days ago and have enjoyed it so far. The only problem is I can't seem to be able to get audio to play. I have tried going through the documentation examples, ...
0
votes
2answers
290 views
Applying Forces to Box2D Bodies
In full disclosure, I am VERY new to box2D let alone the Java version of it.
I have a box (here of type Hero) that I am trying to move. I did this by trying to apply a force as follows...
private ...
