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
votes
1answer
304 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
178 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
346 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
1k 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
296 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
287 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
245 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
138 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
143 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
403 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
1k 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
213 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
212 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
662 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
166 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
230 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
701 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
179 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 ...
1
vote
1answer
816 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
212 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
100 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
415 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
238 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
628 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
759 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
218 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
306 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
5k 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
206 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
530 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 ...
0
votes
4answers
1k views

Opengl lighting not working

I have rendered a spinning model in LWJGL. I have calculated normals and enabled lighting. Now I make a light: float lightpos[] = {0, 0, 0, 0}; FloatBuffer lightposb = ...
-1
votes
2answers
385 views

moving from XNA to LWJGL [closed]

Hi StackOverflow people! I would like to know how easy it could be to move from XNA to using LWJGL. Just wanted to throw this out there because of the rumors that MS is shutting down XNA and having ...
6
votes
2answers
514 views

An odd performance problem rendering a simple scene (less than 14k vertices) in OpenGL using two vbos with LWJGL

Problem I have been having a strange degrading performance issue rendering a simple scene containing two "chunks" of 4x4x4 cubes each. Video of problem This is a screen capture showing my console ...
-3
votes
1answer
169 views

How to toggle something using key releases

I'm making an application using lwjgl and I'm having troubles with toggling using the same key. What I want is for the boolean to be toggled when I release the key. I have a method that returns the ...
0
votes
2answers
690 views

How to create texture coordinates for a spritesheet with lwjgl

Using lwjgl and slick-util I've been trying to use certain pieces of a spritesheet as textures. lwjgl uses glTexCoord2f(); to map coordinates to individual vertices, and the coordinates it takes in ...
0
votes
1answer
2k 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 ...
1
vote
1answer
1k 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", ...
-3
votes
1answer
1k 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 ...
4
votes
2answers
888 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
1answer
332 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
469 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); ...
2
votes
2answers
363 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 ...
1
vote
2answers
585 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
334 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, ...
3
votes
3answers
2k 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
176 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
574 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 ...
4
votes
2answers
4k views

Starting Java 2D Platformer using LWJGL [closed]

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 ...
12
votes
1answer
868 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, ...