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
164 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
250 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
95 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
54 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
126 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
181 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
1k views
Best practice to use Sprites in a game using AndEngine GLES2
Currently I am having static reference to all my sprites and loading and initializing them in my OnCreateResource mthod of SimpleBaseGameActivity, But now I have to override onAreaTouched listener on ...
2
votes
0answers
816 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
616 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
41 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
64 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
71 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
76 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
49 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
734 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
981 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
180 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
91 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
378 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
155 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
398 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
35 views
Good java library for a music game in Java
I'm trying to make a music based game in java for android(similar in theory to audiosurf or music catch 2) which analyzes aspects of a song, and bases a level around them. I've been looking for a few ...
0
votes
0answers
135 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
72 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
66 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
116 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
92 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
100 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
50 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
114 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
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 ...
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 ...
0
votes
0answers
128 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
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 ...
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
90 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
77 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
51 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
267 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
94 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
228 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
832 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
40 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
192 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 ...
0
votes
0answers
106 views
Dynamic proxies for game objects
I am looking for the best approach to build an observer that can monitor the changes in the game object for purposes of client/server synchronization.
For example my game may have multiple game ...
0
votes
0answers
77 views
java find intersection of a block with a surface in 3D space
This question is a copy of the following question on SO. I posted it here after a suggestion from guys at SO.
Hi,
At the moment we have a bunch of 3d blocks (think cubes) that are imported in a ...
0
votes
0answers
374 views
Fastest way to render 2D shapes on Android OS phones
I'm building a game for Android using Adobe Flash/AIR. The problem is that my game consists of a lot of 2D vector graphics that change every frame, and so cannot be cached as bitmaps. As a result, ...
0
votes
0answers
125 views
way to do if(x > x2) x = x2 with rotation?
Alright, so I got this walking code, and some collision detection, now the collision detection returns a Vector3f of the closest point on the triangle that the projected position is at (pos + move), ...

