The Lightweight Java Game Library (LWJGL) provides access to high performance, cross-platform libraries OpenGL and OpenAL. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks.
0
votes
0answers
65 views
Returning incorrect camera position (0, 0, 0) [closed]
So I've been trying to do picking code, but I've run across an issue before I even get started. I have a pointer that is rendered as a cube at the camera's position + 10 on the z axis, but when I run ...
0
votes
0answers
79 views
LWJGL not working, need help [closed]
I'm trying to make a simple game in LWJGL but no matter what I do I just get a black screen and it becomes unresponsive. Here is the code that opens the window:
package src;
import ...
0
votes
1answer
1k views
Resource not found: testdata/alphamap.png
I started a tutorial for java's slick 2d library, called SlickBlocks which is essentally a tetris clone. The problem is I have followed and typed in the code examples to the dot, yet when I run it I ...
2
votes
3answers
2k views
Where can I find tutorials for LWJGL?
I don't know if this is against the FAQ so if you close this, it'll be no surprise.
I have done research but all the tutorials I have seen have been to hard to follow; I reckon there are better ones ...
1
vote
1answer
965 views
How to use OpenGL blend mode/functions to brighten/darken a texture.
Tried this code, but the texture didnot get any lighter.
try {
texture = TextureLoader.getTexture("png",
...
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 ...
-3
votes
1answer
355 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 ...
3
votes
2answers
455 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
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
1answer
158 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?
0
votes
1answer
186 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
134 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, ...
2
votes
2answers
202 views
16-bit PNGs in Slick2D
I'm working on a project and I'm using some 3rd party sprites just to get it off the ground; recently I've come into a hitch. Slick2D doesn't seem to want to load my images. That is, it will warn me ...
0
votes
0answers
720 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, ...
1
vote
2answers
388 views
Collision Problems in Pacman Clone
I am working on a Pacman clone. I am using Java for the project. I have been having problems with collisions, and allowing the player to pass through objects. Note that the tile size (and player) is ...
0
votes
1answer
212 views
OpenGL first person camera orientation issues [closed]
I have a "camera" in my opengl program that I recently finished. However, I've noticed that whenever I rotate and then move again, the x, y, and z angles change. For example, when I press the "w" key, ...
2
votes
3answers
1k views
Suggest a simple Java math library for matrix operations for use with OpenGL (lwjgl) [closed]
I'm writing an OpenGL app with Java. I need to do some math for camera and frustum culling (for AABB). Could you suggest a simple and fast Java math library for that?
-1
votes
1answer
97 views
OpenGL glMatrixMode rotation
I'm stuck on trying to figure out how to rotate the viewport(or camera). So far I've figured out I need to use the function glRotatef and glMatrixMode(GL_MODELVIEW). But I have no idea how to apply ...
0
votes
1answer
257 views
Does using LWJGL and Slick2D yield promise for the future of my project? [closed]
I've been looking around the net for months now in an attempt to find the most appropriate tool for my needs. I haven't had a lot of time to devote to the creation of systems that could possibly ...
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 ...
11
votes
1answer
384 views
OpenGL - white edges on cubes
In a minecraft-like game I'm making, I get white edges on my cubes:
It is much more noticeable in darker textures. The textures are being setup like this:
glTexParameteri(GL_TEXTURE_2D, ...
-1
votes
1answer
75 views
Why are only some of my objects being rendered?
Every time I create a new asteroid the previous one is no longer rendered?
I did some debugging and printed out the size of Array-List 'Small' and when a new asteroid is created it doesn't go down, ...
0
votes
1answer
466 views
Trouble programming JInput for game controller
Due to lack of reasonable documentation, I have not been able to program inputs for using a game controller. The most I have ever found was how to detect if a controller is found and what it's name ...
1
vote
1answer
607 views
LWJGL - Mixing 2D and 3D
I'm trying to mix 2D and 3D using LWJGL.
I have wrote 2D little method that allow me to easily switch between 2D and 3D.
protected static void make2D() {
glEnable(GL_BLEND);
...
1
vote
3answers
91 views
Translating an Object to a certain Vector 3 in OpenGL and Java LWJGL
So after almost two hours, I got the hang of using glTranslated() (with Java and LWJGL). If I am correct, applying glTranslated on an object moves that object with the x,y,z relative to the previously ...
0
votes
2answers
493 views
Rotating a Quad around it center
How can you rotate a quad around its center?
This is what im trying to do but it aint working:
GL11.glTranslatef(x-getWidth()/2, y-getHeight()/2, 0);
GL11.glRotatef(30, 0.0f, 0.0f, ...
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
1answer
245 views
Color Picking Troubles - LWJGL/OpenGL
I'm attempting to check which object the user is hovering over. While everything seems to be just how I'd think it should be, I'm not able to get the correct color due to the second time I draw ...
0
votes
1answer
87 views
What is a fast way to darken the vertices I'm rendering?
To make a lighting system for a voxel game, I need to specify a darkness value per vertex. I'm using GL_COLOR_MATERIAL and specifying a color per vertex, like this:
glEnable(GL_COLOR_MATERIAL);
...
1
vote
1answer
149 views
Java game object pool management
Currently I am using arrays to handle all of my game objects in the game I am making, and I know how terrible this is for performance. My question is what is the best way to handle game objects and ...
0
votes
2answers
218 views
LWJGL - OpenGL - Texture shading
I want to use LWJGL to create a shader that all it does is change the color of the given texture. For example I tell it to draw the letter A using a sprite sheet then I can tell the shader to draw the ...
1
vote
1answer
957 views
LWJGL Text Rendering
Currently in my project I am using LWJGL and the Slick2D library to render text onto the screen. Here is a more specific example:
Font f = new Font("Times New Roman",Font.BOLD,18);
font = new ...
1
vote
1answer
179 views
Rotating a cube using jBullet collisions
How would one go about rotating/flipping a cube with the physics of jBullet?
Here is my Draw method for my cube object:
public void Draw() {
// center point posX, posY, posZ
float ...
3
votes
1answer
204 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
237 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 ...
0
votes
1answer
370 views
How can I achieve this lighting with OpenGL?
I'm currently trying to implement a type of "smooth" lighting. How can I achieve lighting which looks like this:
http://dl.dropbox.com/u/1668516/concept/warp3.png
Using OpenGl. I've attempted to use ...
5
votes
3answers
811 views
How Do Day Night Cycles Work?
I know that this is a vage question, but how do day night cycles work in video games? How do I get started programming one? I have researched for a while, but the only thing I saw was "unity 3-d day ...
2
votes
3answers
318 views
OpenGL Get Rotated X and Y of quad
I am developing a game in 2D using LWJGL library.
So far I have a rotating box. I have done basic Rectangle collision, but it doesn't work for rotated rectangles.
Does OpenGL have a function that ...
5
votes
3answers
604 views
Understanding how to create/use textures for games when limited by power of two sizes
I have some questions about the creating graphics for a game.
As an example. I want to create a motorbike. (1pixel = 1centimeter)
So my motorbike will have 200 width and 150 height. (200x150)
But the ...
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 ...
2
votes
1answer
587 views
With Slick, how to change the resolution during gameplay?
I am developing a tile-based strategy game using Java and the Slick API.
So far so good, but I've come to a standstill on my options menu. I have plans for the user to be able to change the ...
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 ...
4
votes
5answers
941 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 ...
1
vote
1answer
954 views
PokeMMO. How they do it?
Well PokeMMO is a JAVA game project which basically is the original FireRed title for the GBA made online. They know this type of projects don't last long because of the copyrighted material used, but ...
-7
votes
1answer
553 views
Is the game Wakfu really fully coded in JAVA? [closed]
If so, this shows that you can develop amazing logic/graphic wise games with JAVA. I think this should be used as an example when people ask about games developed in java instead of just mincraft and ...
1
vote
2answers
420 views
LWJGL GL_QUADS texture artifact
I managed to get working LWJGL in Java, and I loaded a test image (tv test card), but I keep getting weird artifacts outside the image.
Code:
glBegin(GL_QUADS);
glTexCoord2f(0, 0);
glVertex2i(10, ...
2
votes
1answer
134 views
Java getResourceAsStream as local resource
Before using LWJGL, I used the Graphic method, and there I displayed imageicons, and I had the picture file located in the resources.
I used:
ImageIcon tcard = new ...
2
votes
1answer
364 views
Where can I find the library for org.newdawn.slick.opengl.Texture
I started making a game in Java, and someone on stackoverflow recommended me LWJGL.
I found some examples, and they worked. Later I wanted to test sprites and every example that I found that loads ...
