-1
votes
0answers
34 views

LWJGL - Keyboard.next() not firing

I am trying to make a class which will handle all of my inputs, however Keyboard.next() isn't returning true. Here is my code. while(Keyboard.next()) { if(Keyboard.getEventKey() == ...
0
votes
2answers
52 views

Clamping large content to smaller area

I'm using OpenGL (with LWJGL) in Java, but the question is language independent. I have some region (a rectangle for simplicity), and, let's say, a big tiled map which I want to show in this area. ...
0
votes
0answers
10 views

Slick util TiledMap stops all other drawing

Im trying to add tile maps to my game. Before I added the tile map, I had 3 quads being drawn for testing purposes, but after adding the tile map, the quads are no longer drawn. private static void ...
0
votes
1answer
69 views

Getting the Ray position from View and Projection Matrix

I'm having some trouble calculating the direction and position of the ray from my matrices. I have tried some things such as: private Vec3 getPick(Mat4 projection, Mat4 view) { Mat4 ...
1
vote
1answer
66 views

How to use LWJGL Vertex Buffer Objects?

I have been learning how to make a game with LWJGL for a while now by following YouTube tutorials online but I've recently been having a problem understanding Vertex Buffer Objects. I've looked at ...
0
votes
0answers
33 views

Why isn't my texture changing after calling display list?

I can't bind another texture after calling glCallList. It does nothing. However if I change texture inside the list, it works.
4
votes
1answer
163 views

Are display lists faster than VBOs?

I'm making a voxel rendering engine. My "chunks" are 32 * 32 * 256 blocks and I can render a 16 * 16 square of them (which corresponds to Minecraft's maximal render distance). I'm using VBOs holding ...
0
votes
2answers
111 views

How do I merge quads to simplify a heightmap?

I'm trying to improve my frame rates. My map has an area of 200 * 200 vertices, where each vertex has a height. 200 * 200 = 40000 vertices per frame. I'd like to create a method to simplify the ...
0
votes
0answers
46 views

how to do picking in 2d lwjgl

I searched the whole internet, but I couldn't find something useful. How to do picking (like ray picking) in lwjgl in orthographic mode (2d)? I think this is less confusing than picking in 3d, but I ...
0
votes
2answers
76 views

Slick2D: constructor vs. init method

What is the difference between the constructor of a BasicGameState and the init method? It appears that they are both called at the same time when the BasicGameState is registered in StateBasedGame, ...
0
votes
0answers
47 views

LWJGL Rotating is moving

I am trying to rotate my QUAD even just a little bit. I have read pages like http://www.java-gaming.org/topics/lwjgl-tutorial-series-moving-and-rotating-triangle/30679/view.html In my render() ...
1
vote
1answer
38 views

Slick2D: Initializing graphics object before game loop

I'm using the Slick2D Java game library and I want to set the scale of the graphics object that gets passed to the render method in my game loop. I'd like to do this outside the render method, so ...
-1
votes
2answers
37 views

LWJGL Jumping Down [closed]

I'm currently building a little game using LWJGL, and I got a Game class which contains my game loop, instances etc... And a Player class which contains a constructor (for x and y coords), logic ...
0
votes
1answer
133 views

How do I move the camera in 2D LWJGL openGL?

I am making a top-down rpg game with the LWJGL but I can't figure out how to make the camera follow the player. I've tryed using GLU.gluLookAt() but it seems to be designed for 3D and when I try it ...
0
votes
0answers
56 views

Window resizing doesn't work correctly

im currently having issues on resizing my game. It's a 2d Game and I want resizing to look a little(or exactly) like this: Original size: Smaller window size: My resizing function currently ...
0
votes
1answer
48 views

How can I create a cross-fade between two quads?

I have two quads, and I would like to have each one of them on the screen for 5 seconds, then fade to the next one. How could this be done? My code: package net.makerimages.Unacrawl.stateSys; ...
0
votes
1answer
108 views

LWJGL Camera Rotation Issues

I am quite new to LWJGL and OpenGL and I am trying to create an FPS camera. I had no problem with 2D stuff, so I decided to step things up and try and make some things in 3D. I have this 3D camera ...
0
votes
1answer
142 views

2D Tiled Map - Small tiles or big tiles with pixel-precise movement

I am using Java - LWJGL - Slick2D . I have tried to do a proper collision detection with 32 x 32 tile size but failed three times. I just cant get it to work! I found a youtube video that was using ...
4
votes
3answers
731 views

How do I render a PNG with transparency in LibGDX?

I'm building a simple tic-tac-toe example with LibGDX. I have simple images: cross, circle and board, all pngs created with GIMP with a transparent background. How can I render them as a Texture with ...
0
votes
0answers
38 views

Should tiles in a tile-based game draw themselves? [duplicate]

I'm a beginner in game programming, and I want to start with Java (in which I have a strong background I think) and LWJGL. I want to create tile-based games. Let's say I have an object named Tile, ...
0
votes
2answers
102 views

How can I move a created Image in Slick2D?

I want a image to follow the mouse, and I use Image class of Slick 2D: public void init(GameContainer gameContainer, StateBasedGame stateBasedGame) throws SlickException { mouseImage = new ...
0
votes
1answer
149 views

Break a learning barrier with Java + LWJGL [closed]

I have been coding with Java and LWJGL for some time. I mainly use thebennybox's tutorials, but I can't always remember the 3D rendering. But even when I have a 3D rendering models, planes, cubes, ...
0
votes
1answer
123 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
0
votes
1answer
223 views

LWJGL font not rendering, even with depth test and texture_2D

I'm running into an odd little problem here. I'm attempting to render a basic console over my LWJGL-based application, which should be easy enough through a decorator pattern of renderers (as in, one ...
0
votes
1answer
75 views

Lwjgl or opengl double pixels

I'm working in java with LWJGL and trying to double all my pixels. I'm trying to draw in an area of 800x450 and then stretch all the frame image to the complete 1600x900 pixels without them getting ...
2
votes
1answer
341 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 ...
1
vote
2answers
88 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 ...
0
votes
1answer
213 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
136 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 .
0
votes
3answers
179 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
184 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 ...
0
votes
1answer
79 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
172 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
0answers
83 views

OpenGL rendering tiles buggily

In my Terraria based game i use this code to render all of the tiles in 1 chunk: // TODO Auto-generated method stub GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); for (Tile[] var : ...
5
votes
1answer
231 views

2D Polygon Triangulation

I am creating a game engine using the JBox2D physics engine. It only allows you to create polygon fixtures up to 8 vertices, To create a body with more than 8 vertices, you need to create multiple ...
5
votes
1answer
258 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
216 views

LWJGL texture bleeding fix won't work

I tried a lot of things to fix texture bleeding, but nothing works. I don't want to add a transparent border around my textures, because I already got too many and it would take too much time and I ...
0
votes
1answer
340 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 ...
1
vote
0answers
280 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
122 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 ...
2
votes
1answer
42 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 ...
2
votes
1answer
116 views

Add vertices to “middle” of VBO

I've been playing around with VBOs as of late (mostly because my game necessitates it), and I've found the need to add new vertices to a VBO, but not necessarily at the end. The game in question is a ...
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
169 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" ...
1
vote
0answers
154 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 ...
1
vote
1answer
118 views

How do I use ContactListener in JBOX2D?

I have a character, and I need to know when he's touching a wall/floor. I look for some information but no luck. How do I do that? I saw a few things about ContactListeners and getContactList(). But I ...
4
votes
1answer
360 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
208 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
164 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 ...
1
vote
1answer
330 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. ...