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

0
votes
1answer
35 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
358 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
229 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 ...
0
votes
0answers
78 views

lwjgl custom icon

I have a little problem with the icon in lwjgl, it doesn't work. I google about it, but i haven't found anything that works for me yet. This is my code for now: PNGDecoder imageDecoder = new ...
-1
votes
1answer
110 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
66 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
113 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
208 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
111 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
103 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
424 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 ...
0
votes
1answer
632 views

How can I implement infinite scrolling by scrolling the background's texture, not the quad? [duplicate]

I'm writing a 2D platformer game on Java with LWJGL. I'm doing this just for the sake of learning and not the result itself, so when I decided to implement scrolling I did it two ways I could invent ...
2
votes
1answer
139 views

OpenGL Calculate Matrices

Im trying to switch from the glTranslate etc to my own Matrices, but for some reason it does not work. Here are my 2 functions to create the view- and projection matrix: public Matrix4f ...
-1
votes
1answer
100 views

Slick2D ingoring aplha channel?

When I use the draw method inside a image, it completely ingores the alpha channel and fills it in with white. Is there a way I can draw it where the alpha is see through like it's suppost to be? I ...
0
votes
2answers
604 views

Screen or World Coordinates to tile Coordinates

I have Plane made of tiles in opengl. I start drawing them at (0, 0, -20) after that i do my translations so that the view is rotated somewhat similar to an isometric (kind of) perspective. I'd now ...
-3
votes
2answers
624 views

Terrain Generation - Advanced [closed]

I need to generate terrain. Easy enough you might say, but I need to create Biomes if you will(Can't link of another name) lakes. Trees and on a height map. So I have really no idea how to use a ...
-1
votes
1answer
286 views

Slick2D and TileD [closed]

I've been learning Java for a while, and with my aims of being a game developer later in life, I've came across Slick2D+lwjgl and following tutorials and making some little things. However; I don't ...
-1
votes
1answer
295 views

How compatible is OpenAL?

I'm making a game that needs sounds and LWJGL uses OpenAL. I was wondering out of 1.0, 1.1, C 1.0 and C 1.1 which would be the best to pick? I don't know what the C is but it's there in LWJGL :). My ...
0
votes
1answer
160 views

Would it be inefficient to call LWJGL from C++?

I like LWJGL, but Java? Not so much. I recently found out a way to call Java methods from C++. But would this be inefficient? I mean, calling a C/C++ DLL from Java, just to be called back again into ...
1
vote
1answer
224 views

Can't get Depth testing to work (cube faces shine through)

I'm making my first steps with OpenGL with LWJGL. I am currenlty constructing a... wait for it... CUBE. Quite creative... Up to now i made it to three of its faces and thats where the Problems began. ...
1
vote
1answer
834 views

Drawing in 3D with LibGDX

Is there any way to simply draw in 3D, just like you would draw with ShapeRenderer or SpriteBatch? All I want is to draw circles that are in x.y.z coordinates, so some circles are far away from view ...
1
vote
1answer
255 views

Detecting collision with a 3D array of boxes

I am at the stage of my development process where I want to implement collision. Now I can think of a simple way of doing it, if the camera's x, y or z are inside the position of a certain cube then ...
2
votes
2answers
1k views

OBJ model loaded in LWJGL has a black area with no texture

I have a problem with loading an .obj file in LWJGL and its textures. The object is a tree(it's a paid model from TurboSquid, so I can't post it here,but here's the link if you want to see how it ...
-1
votes
1answer
258 views

Generating a grid of cubes in 3D space [closed]

I am trying to generate a grid of cubes in 3D space and It aint workin... All im doing is for looping YXZ (in that order) (nested for loops) then im doing cubes[x][y][z] = ... (new Location(x,y,z)) ...
2
votes
1answer
193 views

MVC with looping view

For our school project we'd like to develop a game using the MVC pattern. We're all moderate new java programmers and absolutely new in game development. With our current view (containing only menu) ...
-5
votes
1answer
113 views

Writing and reading from an XML file with Slick2D [closed]

I was wondering how you would go about writing and the reading from an XML file using the Java library Slick2D. I have googled for the last couple of days and have found nothing succinct and simple ...
-2
votes
1answer
131 views

Entity moving Up and Down but not Left and Right [closed]

I am trying to create an entity class for my game but I'm having difficulty with the movement, I can get the sprite moving along the Y-Axis but not along the X-Axis. Here's my code:- package Game; ...
4
votes
4answers
375 views

Storing data for a pokemon like game

The game I'm developing is close to Pokemon. How should I store the data? I am currently thinking of text files where I save the map and have a corresponding textfile for the trainers and their teams ...
4
votes
5answers
997 views

How to get more than one window in Java LWJGL

I'm trying to write a game in Java LWJGL. And I need more than one (multiple) display window. By default I've got one display window where I can draw everything. But I'd like to split some data to ...
1
vote
1answer
207 views

Sidescrolling troubles [closed]

I'm making a sidescroller using java and Lwjgl. But I'm having some trouble getting the screen to actually ... well... sidescroll. The world is randomly generated and drawn in blocks. Like so: ...
3
votes
1answer
189 views

Rendering a black and white image in OpenGL 1.1

Is there is any way that I can simple disable the color in OpenGL 1.1? Or can I "grey out" textures in LWJGL?
5
votes
2answers
560 views

3D models on 2D tilemap perspective when scrolling

I am creating a small top-down game, where the player traverses a 2D tilemap, with an illusion of depth provided by 3D models for things like buildings or trees. Having gotten to the point where I ...
0
votes
1answer
141 views

How do I pass textures into a fragment shader in Slick?

I've written a shader that uses three different textures, tex0, tex1, and tex2. I can load it into Slick and successfully display it, but I can't figure out how to set the three different textures. ...
0
votes
2answers
192 views

LWJGL Game crashes on some other machines [closed]

I just tried running my game on a friend's laptop, but for some reason it crashes. The exported .jar runs fine on my machine, and some others too. I can see that is has something to do with the ...
4
votes
3answers
649 views

Voxel engine artifacts

There are white little dots between blocks at random places, mainly at very near blocks. They disappear when I move the mouse and change the view direction. I use Vertex Arrays with ...
3
votes
1answer
132 views

LWJGL Eclipse Resource Deployment

I'm still experimenting with some OpenGL in LWJGL, and as I get to know more and more about OpenGL, I start to do more complicated things like multi texturing, shadowmapping and more. Now, right now ...
2
votes
4answers
1k views

Implementing pausing functionality

I'm working in LWJGL and trying to implement pausing when the user presses the 'P' key. Thus far I have this: boolean gamePaused = false; while(!Display.isCloseRequested()){ ...
1
vote
1answer
655 views

Is there a way to make a game using lwjgl work on android?

I'm working on a platformer and I'd like to make an android version. Do I need to rewrite everything for android, or can I use something to make the lwjgl code work with android?
-1
votes
2answers
159 views

Tile Based Collision Checking In Java?

I have my map stored in 2 arrays: Tiles : Tile names TileTypes : SOLID or BASIC I want to be able to walk through BASIC Tiles (Like ground tiles). But not the SOLID Tiles (Like wall tiles). I ...
0
votes
1answer
93 views

JFrame launcher stays open when I'm finished with it

I have written a launcher that prompts the user for their name then starts the game when they hit enter. The launcher looks like this: But when the user hits enter, this happens: The launcher stays ...
0
votes
2answers
338 views

How to translate from Slick2d coordinates to jBox2d

I read through this question to try and get a grasp on the topic, but I can't figure out how to apply this to my Slick2d window. I'm trying to do something as simple as place an edge on the bottom of ...
3
votes
1answer
234 views

Where should I put my mob rendering code?

I'm making a simple LWJGL game. However, I'm a bit confused about rendering. So I have a Mob class and a TriangleMob is a basic enemy. package daniel.entity.Mob; public class TriangleMob { ...
-2
votes
2answers
523 views

How can I draw a map that is stored in arrays [closed]

I have spent over 12 hours with no avail trying to successfully draw my map. The map is stored in an array called Tiles[]. Each value in Tiles can either be 4 numbers: Grass Stone Water Void (EMPTY ...
1
vote
2answers
669 views

Why cant I use slick-util with image IO and bufferedImage

My problem is that I get errors when I use texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("TEXTURE PATH HERE")); it gives me these errors: Exception in thread "main" ...
3
votes
1answer
198 views

Packaging a Java game for Linux

I'm just about finished developing a small Java/Lwjgl-based game. For Windows users, I intend to use Launch4J to package the game into a nice .exe. For Mac users, I'll be using JarBundler to produce a ...
-4
votes
1answer
277 views

Is OpenGL 1.1 really slow? [closed]

If anyone ever played minecraft and realized no matter what computer you have it normally doesn't give over 100 FPS? While looking at decompiled code from it I noticed it renders with OpenGL 1.1 ...
5
votes
1answer
4k views

OpenGL: Resizing Display and glOrtho/glViewport

I have researched this question from several sources and have yet to find a firm answer saying that "yes that is correct thinking" or "no, here is how it's done." I am trying to ensure resolution ...
1
vote
1answer
186 views

When to Load Assets

I'm writing a game using LWJGL and Java, and I was just wondering if there is a rule/recommended method for when to load resources. I have seen examples that load all of the resources at the ...
1
vote
2answers
404 views

LWJGL MouseY Coordinates are flipped

So I'm very new to using OpenGL and LWJGL, although I am proficient in Java itself. One of the first things I read in the documentation of the Display class was that it maps the origin to the bottom ...