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.
-3
votes
2answers
122 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 ...
0
votes
2answers
106 views
+50
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 ...
-1
votes
1answer
40 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 ...
0
votes
1answer
66 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
41 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. ...
0
votes
1answer
61 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
71 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 ...
-1
votes
0answers
63 views
OpenGL 2D Screen to 3D World
I'm in the process of making a block voxel game (not minecraft clone) and I now need to be able find which block I am looking at.
I've come across two methods: Ray tracing and gluUnProject
I found a ...
0
votes
0answers
23 views
How can I find the pixel color of a given position in a SlickUtils Texture?
I'm making a mini-map system for my tile based game, and I thought the best way to accomplish this would be the following: at the beginning of the game, I calculate the predominant color of every ...
-1
votes
1answer
103 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))
...
-1
votes
0answers
59 views
LWJGL - Switching from 3D to 2D to render text with NO external librarys [closed]
I want to render 2D quads on my screen by switching to a 2D scene then switching back to 3D.
I dont want to use any external librarys besides LWJGL.
This is what I got so far:
private static void ...
2
votes
1answer
74 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
54 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 ...
0
votes
0answers
53 views
Rotation method for camera class [closed]
I am in the process of writing a camera class for my game but I'm stuck on how to add a method for rotating the camera.
Here's my code so far.
package Game;
import org.newdawn.slick.Graphics;
...
-2
votes
1answer
63 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
205 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 ...
1
vote
1answer
186 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
89 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?
4
votes
2answers
176 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 ...
-1
votes
1answer
94 views
A paddle in my pong game isn't moving [closed]
I'm working on a little pong game in LWJGL but only one paddle moves. I've tried to switch around some code in the hopes it would work again but it still doesn't.
Here is my paddle class:
public ...
-1
votes
2answers
165 views
Lwjgl Random 2D Map Generation [closed]
First time poster here. I am somewhat (as in mid - low, closer to mid) experienced with Java but I seem to be having some trouble. I'm using the lwjgl library to make a "2D Minecraft-esque" game. ...
0
votes
1answer
53 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
78 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 ...
3
votes
3answers
364 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
62 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 ...
0
votes
1answer
117 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
98 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
59 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
0answers
68 views
Rendering OpenGL to a specific scale [closed]
So I'm making a 2D game that I want to be able to change the window size. I plan on having the game being 4:3 and border any unused edges. Now the problem comes in that I need to take the current ...
3
votes
1answer
206 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 {
...
0
votes
2answers
119 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 ...
-2
votes
2answers
205 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 ...
0
votes
1answer
55 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 ...
1
vote
2answers
259 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
157 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 ...
5
votes
1answer
513 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
127 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
votes
1answer
240 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 ...
1
vote
2answers
105 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
226 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
163 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 ...
-4
votes
1answer
169 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 ...
0
votes
1answer
84 views
Can I use multiple OpenGL version together
I want to use GLSL but keep my current OpenGL 1.1 setup. The thing is that can I use OpenGL 2.0 shaders on OpenGL 1.1 renders?
-3
votes
1answer
77 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
143 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 ...
1
vote
4answers
262 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) {
...
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
78 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
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
126 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 ...
