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.

learn more… | top users | synonyms

1
vote
2answers
101 views

StringBuffer behavior in LWJGL

Okay, I've been programming in Java for about ten years, but am entirely new to LWJGL. I have a specific problem whilst attempting to create a text console. I have built a class meant to abstract ...
2
votes
1answer
469 views

RTS Voxel Engine using LWJGL - Textures glitching

I'm currently working on an RTS game engine using voxels. I have implemented a basic chunk manager using an Octree of Octrees which contains my voxels (simple square blocks, as in Minecraft). I'm ...
0
votes
1answer
325 views

LWJGL - Continuous key press event without delay

I am checking for key presses and then based on the keys pressed I am moving a square around the screen. I am setting booleans for the keys WASD. But , Whenever I try to keep the key down , it takes a ...
-1
votes
1answer
190 views

OpenGL - zNear and zFar Parameters

I am trying to figure out what each parameter does. In the meantime I am playing around with glOrtho . I have already understood how everything works except zNear and zFar .
1
vote
1answer
175 views

lwjgl request display close when undecorated

I want to create a custom titlebar/border for my display/window so I set the corresponding system property to "true" but how do I send a close request to the window manually to react to the ...
0
votes
3answers
229 views

What are the semantics of glRotate and glTranslate's parameters?

I have been trying to play with OpenGL after watching some tutorials and I don't understand how the glTranslatef and glRotatef functions work. I believe a simple picture would help me. I understand ...
0
votes
2answers
292 views

Slick2D - Entities and rendering

I have been trying to create my very first game for quite a while, followed some tutorials and stuff, but I am stuck at creating my entity system. I have made a class that extends the Entity class and ...
2
votes
1answer
196 views

First frame has a much longer delta time than other frames

I had a problem where my AI moved extreme at the first frame and then normal after that. I then figured out it was my delta. It's about 0.016 seconds (60 fps), but the first frame was about 19000 ...
1
vote
1answer
169 views

Sprite rotation

I'm using OpenGL and people suggest using glRotate for sprite rotation, but I find that strange. My problem with it is that it rotates the whole matrix, which sort of screws up all my collision ...
0
votes
1answer
141 views

LWJGL Java 2D collision when lagging

I'm using a tile based collision, but when the game is lagging (the lag isn't the problem) the collision fails and the player falls through tiles. This is the movement/collision detection code of my ...
0
votes
3answers
267 views

Advantages and disadvantages of LWJGL for a beginner? [closed]

I am starting a 2D side scroller, tile based RPG sort of game in Java. I do have lots of knowledge in Java, so that's not a problem, but I have NO experience in game development, at all. I had found a ...
0
votes
1answer
411 views

Simulate camera movement in two dimensions (OpenGL)

I've been told by the folks over at Stack Overflow that there's no way to move the camera in OpenGL. I'm developing a 2D RPG with LWJGL and need to know the proper way to simulate camera movement as ...
5
votes
1answer
295 views

Implementing Vehicles in your game

In the game i am creating as an hobby (learning is the primal goal of it all) i plan to implement a space ship that the player can enter and use to explore it. I tried to search the internet for the ...
0
votes
1answer
130 views

Optimization with VBOs [closed]

I am currently working on a cube engine and am experiencing some issues with CPU optimization. I store all my quad VBO data inside a Block (at x,y,z of a chunk) class, which is stored inside an array ...
0
votes
1answer
179 views

Textures not rendering with VBOs

After having used display lists for my programs since I started learning OpenGL, I've finally decided to switch to VBOs after experiencing a considerable amount of lag when I started work on a new ...
1
vote
0answers
394 views

Weapon Class Organization [closed]

Im making a game and i want to organise my weapons, and im having a few doubts on not only the best architecture but also on how to use it properly: The First approach is to make a single Weapon ...
0
votes
0answers
127 views

Why must VBOs be “broken in?”

If I create a VBO in LWJGL of, say, 128,000 vertices, and push it to the graphics card, there's a considerable delay. This delay lasts for about 11 to 12 milliseconds. The same thing happens the ...
-1
votes
1answer
208 views

Game Engine Design for the LWJGL [closed]

I'm about to begin on the engine for the game I am making. However, I am quite uncertain how I should design it. I have heard lots about threaded games, component and asynchronous systems. I'm ...
2
votes
1answer
48 views

What measurement units are used in the return value of the getWidth method in the UnicodeFont class supplied by Slick2D?

I'm working on a small component for a game that essentially wraps the provided String so that it fits within the width of the provided rectangle. The rectangle is provided by the Slick2D library as ...
0
votes
0answers
19 views

LWJGL Exporting errors [duplicate]

Whenever I try to open the Jar File I compiled and exported out of Eclipse ( even in the console ) I get this error message: Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: no lwjgl in ...
2
votes
0answers
196 views

VBO = glGenBuffers() IllegalStateException [closed]

i'm kinda noob in OpenGL but I have this problem: I get an IllegalStateException at this code: int vboVertex = glGenBuffers(); In-detail exception: Exception in thread "main" ...
0
votes
5answers
411 views

Limiting a player's movement to the screen's dimensions

I have a player, that I can control using WASD. And I don't want him to leave the screen. So I've tried the following: if (player1.getX()+5 < 974 && player1.getX()-5 > 0) { ...
1
vote
0answers
199 views

Exporting from eclipse with lwjgl using jarsplice

I am in the process of developing a 2D tilebased rpg with eclipse, lwjgl, and slick util. For some reason eclipse seems to be lagging heavily which doesnt make sense as all i have rendering is a ...
4
votes
1answer
864 views

How do I draw a full resolution texture to a window of the same resolution?

My image is 1280x800, and my screen size is 1280x800. It should draw perfectly. I'm creating a quad the size of the screen, and setting the texture to fit the quad. But right now it draws a square ...
0
votes
1answer
245 views

Map handling - Indoors/Outdoors and loading large maps

I have two questions regarding the handling of maps. Question 1. My map will consist of outdoor enviroments as well as dungeons, houses etc. How would I go on about connecting the outdoors with the ...
1
vote
1answer
226 views

LWJGL Wait for key press in a single method

Currently I am implementing the possibility in my game to change the keyboard configuration. Therefor, I have a menu in which is a button for each action the player can do. If the player clicks on one ...
2
votes
1answer
424 views

jMonkeyEngine Pros and Cons

I want to know some good reasons to use jMonkeyEngine for a Java 3d game development tool instead of just creating a game with LWJGL myself? I want to know a good reason I should choose this tool. ...
1
vote
2answers
199 views

Map logical coordinates to graphical for walking

I'm having a problem with mapping logical coordinates to graphical ones when my character is walking. I've been able to map them without the graphical walking in between, i.e it just "jumps" from one ...
0
votes
0answers
202 views

LWJGL Mouse picking when camera rotated

I have third person camera in my game and I have mouse picking which works not so good. It works good only when yaw rotation is lesser than ~75 if yaw is greater than 75 then it fails.. Here is video ...
1
vote
1answer
132 views

(Java + Slick) How to rotate the Graphics (g) around the X-Axis?

I already tried it by using GL11.glRotatef(45, 1, 0, 0), but the result looks like this:
1
vote
2answers
233 views

LWJGL - If I use VBOs what can I do about separate textures?

So basically this is my problem: I am creating a game that needs a texture for each object. Now I would use a sprite sheet but the textures are different sizes. I am using VBOs and I need to some how ...
-2
votes
3answers
775 views

LWJGL vs Slick2D vs OpenGL. What is the difference?

I was wondering what the difference was between LWJGL, Slick2D, and OpenGL. If I'm not mistaken LWJGL is a library and it has the methods and such, but what are the other two for and how do they use ...
3
votes
1answer
207 views

Minimizing amount of comparisons for collisions?

In my 'Terraria' based game I am having lag issues. The cause of the lag is as follows: Every update loop through all the tiles in the world: If the rectangle that was passed as an arg intersects ...
1
vote
1answer
129 views

AI and rendering to screen

I'm using LWJGL, however I'm a bit confused on what to do. I'm trying to write an AI simulation, however I'm stuck at this problem. I have one camera, and I plan to move the camera to the mob ...
2
votes
1answer
252 views

Odd blending result (semi-transparent 2d quad over 3D scene)

I'm working on a GUI library for my game, and I'm having problems with my blending. I have a 3D scene, which I render with glDrawArrays. In the fragment shader the alpha color is hardcoded 1.0f ...
2
votes
2answers
890 views

LWJGL multiple keyboard/mouse input checks

As in many game libraries such as LWJGL, you can check mouse/keyboard events with Mouse.isButtonDown or Keyboard.IsKeyDown. I want to check for button/key presses, not if it's currently pressed down ...
1
vote
0answers
192 views

Why do my LWJGL fonts have dots and lines around them?

When we render fonts there are weird dots and lines around the text. I have no idea why this would happen. Here is an image of what it looks like: Our font class looks like this: package ...
1
vote
1answer
3k views

Rotation of images in Slick2D

I have have a rotation problem in the Slick2d library, the image is just not rotating (ie I set a rotation but no result is shown). Here is the rotation code: if (input.IsKeyDown(Input.KEY_LEFT)) { ...
1
vote
1answer
342 views

Quaternions, Axis Angles and Rotation Matrices. Which of these should I use for FP Camera?

After 2 weeks of reading many math formulas and such I know what is a Quaternion, an Axis Angles and Matrices. I have made my own math libary (Java) to use on my game (LWJGL). But I'm really confused ...
0
votes
1answer
36 views

Can LWJGL support multiple displays

Can LWJGL support multiple displays either as separated windows or as part of an AWT Window?
2
votes
1answer
565 views

How to modify VBO data

I am learning LWJGL so i can start working on my game. In order to learn LWJGL I got the idea to implement the map builder so I can get comfortable with graphics programming. Now, for the map ...
1
vote
1answer
258 views

Packing jar files into library jar files

Firstly, this question is not about packing a simple jar file (e.g. lwjgl) into a runnable jar file. I know how to do this using JarSplice. So if I have a game which uses JInput, I will pack my game ...
-1
votes
1answer
131 views

Multithreading in lwjgl getting rid of sleep.

I'm trying to use multithreading in my game. However, I can't seem to get rid of the sleep. If I don't it's a blank screen, as there is no time for the computer to actually render the triangleMob as ...
0
votes
0answers
77 views

Lwjgl camera causing movement to be mirrored

I'm having a problem in that everything is rendered and the movement is fine. However, everything seems to be mirrored. In the sense that the TriangleMob should move towards me, but it doesn't instead ...
1
vote
2answers
2k 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 ...
0
votes
0answers
165 views

Problem adding texture to VBO with png texmap in OpenGL

I was doing a VBO and able to load all the data of OBJ file but now I have problem adding texture to it. what i did is that I use the slick library to get the texture file and bind it to the VBO ...
2
votes
1answer
230 views

GLSL Multiple Uniform Structs

I'm developing a lighting system for my voxel game, and I have to send multiple (alot, say up to 200) lights to my shader program. Those lights contain the following data: Position (vec3) Color ...
2
votes
1answer
131 views

Manual GLU.gluUnproject

Before I used GLU.gluUnproject to calculate my picking ray in my OpenGL game. Recently I switched to my own calculated matrices, and now I can forget the gluUnproject. How can I calculate the picking ...
0
votes
0answers
118 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 ...
1
vote
1answer
613 views

How to use JBullet in LWJGL? [closed]

I have got a problem, because I wan't to add collision detection to my 3d game, which I am developing in Java, using the Lightweight Java Game Library (LWJGL). I have googled a bit, and I have found ...