Java is both a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.
4
votes
0answers
183 views
Structuring server-side networking with entity-component systems
I've been working on an online game, and recently have been working on converting the base of the game to use the Artemis Entity System Framework. I'm having a bit of difficulty conceptualizing ...
4
votes
0answers
270 views
Isometric - precise screen coordinates to isometric
I'm trying to translate mouse coords to precise isometric coords (I can already find the tile the mouse is over, but I want it to be more precise). I've tried several different methods but I seem to ...
3
votes
0answers
53 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 ...
3
votes
0answers
101 views
Dynamic “Light Level” System based on alpha levels
My team and I have been working on a game in Java using the Slick2D engine and there are a few things I have questions on. As of right now, the code that I've written basically takes a cosine function ...
2
votes
0answers
37 views
Use “Google Play Game Services” (Multiplayer feature) with LibGDX
i'm developing a simple game (for Android, using LibGDX Framework) and i would like to implement multiplayer feature to it. So, since the main project with the logic of the game in LibGDX is separated ...
2
votes
0answers
60 views
Images out of “sync”
I've been creating a game in Java as a bit of a fun side project over the last few months and I've come across a really peculiar problem, take a look at this image:
The game is made up of various ...
2
votes
0answers
67 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 ...
2
votes
0answers
150 views
How to make the background of an OpenGL object transparent?
It sounds so simple but i didn't get it to work.
The Background of my FrameLayout where i add the GLSurfaceView in is colored blue but there is only black.
So here is my method to initiate the ...
2
votes
0answers
196 views
Rotation of viewplatform in Java3D
I have just started with Java3D programming. I thought I had built up some basic intuition about how the scene graph works, but something that should work, does not work.
I made a simple program for ...
2
votes
0answers
822 views
AndEngine Making Chase Camera Follow Player
I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera ...
2
votes
0answers
628 views
Collision Detection on floor tiles Isometric game
I am having a very hard to time figuring out a bug in my code. It should have taken me 20 minutes but instead I've been working on it for over 12 hours. I am writing a isometric tile based game where ...
1
vote
0answers
46 views
Aiming with a crosshair with a lot of polygons/triangles
I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ...
1
vote
0answers
47 views
Accessing variables from non-neighbouring classes specifically in game development (Android)
Edit
Using direct access while breaking the law of demeter looks like this:
res.sprite.drawQuad(res.sprite.xScreen,res.sprite.yScreen, mMVPMatrix);
Using proxy methods / getters / setter looks ...
1
vote
0answers
75 views
Steering behaviour
So I found this steering behaviour code in a book but i dont really understand the last part of the code what exactly is he doing because im unfamiliar with c++. Why would you need to ...
1
vote
0answers
123 views
JMonkey - Create health bar?
How can I create a health bar in JMonkey? Is there some documentation that can help?
I am working on a game, specifically “Battleship”, using the JMonkey Engine (JME3). I want to add health bars on ...
1
vote
0answers
109 views
How to implement a multi-platform Java 2D game engine's graphics?
I'm not sure whether this question should be posted here. I'm trying to make a basic generic game engine in Java. Here's what I have so far.
public abstract class Device {
public abstract void ...
1
vote
0answers
63 views
How to put OpenGL in a state for drawing blended, colored, nontextured polys?
Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
1
vote
0answers
826 views
TileMapRenderer in libGDX not drawing anything
So I followed the tutorial on the libGDX wiki to draw Tiled maps but it doesn't seem to render anything.
Here's how I setup my OrthographicCamera and load the map:
camera = new ...
1
vote
0answers
1k views
LibGdx drawing weird behaviour
I am finding strange behaviour while rendering TextureRegions in my game, only when pausing it. I am making a game for Android, in Java with LibGdx.
When I comment out the line "drawLevelPaused()" ...
1
vote
0answers
181 views
How do you program the right analog stick of a controller in JInput?
I have the Left Analog Stick programmed and accepting input (moving a character around). (getCompassDir() returns the values of the cardinal directions and NONE means the stick isn't touched):
// ...
1
vote
0answers
95 views
Ardor3D creating items such as guns…?
I am using Ardor3D as a game engine, but I can't seem to find anything anywhere about creating items that the player holds. My game is in first person. I want to make a gun that is always visible on ...
1
vote
0answers
385 views
Problems with moving 2D circle/box collision detection
This is my first game ever and I'm a newbie in computer physics.
I've got this code for the collision detection and it works fine for BOTTOM and TOP collision.It miss the collision detection with the ...
1
vote
0answers
157 views
When attaching AI to a vehicle should I define all steps or try Line of Sight?
This problem is related to an intersection simulation I am building for university. I will try to make it as general as possible.
I am trying to assign AI to a vehicle using the JMonkeyEngine ...
1
vote
0answers
408 views
How to create a collidable map with tiled for cocos2d (Android)?
I am using cocos2d to create a game for Android.
I am making a map in Tiled Map Editor and added a property to the ground tiles.
The property name is Collidable and its value is True.
Now I have ...
0
votes
0answers
16 views
How to find the location of JOGL openGL object , after rotation?
I have a rotating object - a cube , here :
@Override
public void display(GLAutoDrawable gLDrawable)
{
moveFirstPerson();
checkCameraCollisionWithObject();
final GL gl = ...
0
votes
0answers
58 views
Depth Test not working properly on Nvidia
So, I send a Development Test of my in-dev game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia.
I use my own matrices and sent them to the shader, and at ...
0
votes
0answers
143 views
Pac-man animation
So for my intro to java class we need to re create this. http://people.highline.edu/tostrander/142/demo/pacman.htm
We need to use only the Java.awt package so I figure to make the pacman I need to ...
0
votes
0answers
82 views
fire multiple events in InputListener
I have two Actors on my stage in libgdx and and both have a InputListener. I override the touchDown method and it works fine. My Problem is that when I press my Actor Z and a second later Actor Y only ...
0
votes
0answers
69 views
Why does Slick import Tiled object rectangles without width, height, and name tags?
I tried using Tiled rectangle objects as walls with Slick's TiledMapPlus class, but as I soon realized that each GroupObject would return 0 for width and height. The code I used looks like this:
...
0
votes
0answers
159 views
Removing image background color?
I have a sprite sheet (image) and I want to draw it on the screen.
image = sprite sheet image
x = player x position
y = player y position
width = player width
height = player height
public class ...
0
votes
0answers
112 views
How to get ARGB value of pixel from loaded image?
I want to scan GIF image and check every pixel. If pixel isn't transparent I want to add it to array of Points2D (point will have the same x and y as pixel. That's because I need coordinates, not ...
0
votes
0answers
105 views
problem adding bumpmap to textured gluSphere in JOGL
I currently have one texture on a gluSphere that represents the Earth being displayed perfectly, but having trouble figuring out how to implement a bumpmap as well.
The bumpmap resides in ...
0
votes
0answers
52 views
JFrame on OS X with buffer strategy disables rounded corners
I'm trying to create a simple JFrame window in OS X and render a simple black square on it like so using Graphics2d:
public Start() {
running = true;
window = new JFrame("Finest Hour");
...
0
votes
0answers
116 views
Fling and Spin an Object with Touch
For making a bottle to spin, I focused first on the touch dragging via input processor interface. It's a bit unresponsive since when I rotate clockwise or counter-clockwise as long as my finger ...
0
votes
0answers
45 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 ...
0
votes
0answers
79 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 ...
0
votes
0answers
135 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 ...
0
votes
0answers
62 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 ...
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 ...
0
votes
0answers
94 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 ...
0
votes
0answers
78 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.
...
0
votes
0answers
53 views
What could cause dispersed triangles instead of integral model?
So the thing is, I get dispersed triangles instead of model that I'm loading, in this case it's just a cube. It seems as those triangles have no points that connect them. Is there anyone who had this ...
0
votes
0answers
288 views
libGDX using Stage and Actor produces different camera angles on desktop and Android Phone
libGDX using Stage and Actor produces different camera angles on desktop and Android Phone.
Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq
On the desktop ...
0
votes
0answers
95 views
How to manage own bots at the server?
There is a game server and people can play in game rooms of 2, 3 or 4. When a client connects to server he can send a request specifying a number of people or range he wants to play with.
One of this ...
0
votes
0answers
40 views
External classes positions don't work?
I have an external class which reads the user's mouse clicks. I gave a position where the user have to click, and when the user clicks on that position, it would turn my boolean "mouse" to true. But ...
0
votes
0answers
232 views
Making a Background Scrolling in Stacking Game
Hmmm...Is it a good idea to use a LibGDX parallax background for making a stacking game (i.e. PAPA STACKer Lite)? For example, I'm starting to use the blocks to drag-n-drop it. Next, when the next ...
0
votes
0answers
897 views
How To Scale Canvas In Android
I am writing a android game using Canvas as the way to draw everything, the problem is that when i run it on different android phones the canvas dosn't change size i tried using canvas.scale() but ...
0
votes
0answers
41 views
Nifty default controls prevent the rest of my game from rendering
I've been trying to add a basic HUD to my 2D LWJGL game using nifty gui, and while I've been successful in rendering panels and static text on top of the game, using the built-in nifty controls (e.g. ...
0
votes
0answers
63 views
HowTo Enable jBullet DebugMode
I would like to render the physics world of jBullet to debug some issues in my game, and I am not finding too much on enabling the debugDraw method of jBullet. Do I need to write my own debugDraw ...
0
votes
0answers
193 views
Implementing Lighting OpenGL 2D Quads with Textures
Lets say I have a grid of tiles 64x64 and I want to implement lighting using opengl.
I draw the grid with 2D quads that are binded with textures. How would I implement source lighting and stuff like ...

