Tagged Questions
-1
votes
0answers
29 views
VBO for LWJGL to render floor [closed]
I'm trying to change all my rendering from intermediate mode to VBO. However, I'm confused on what to do. So I want to have QUADS for floor tiles from (0,0,0) to (100,100,0). However, it doesn't work. ...
-1
votes
0answers
22 views
Loading Textures on a OBJ - lwjgl
I've created a obj parser that parses the OBJs right. I now need to know how I would load the textures on the model.
I'm using this model: http://thefree3dmodels.com/stuff/furniture/couch/12-1-0-5262
...
0
votes
1answer
38 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
87 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 ...
0
votes
0answers
58 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 ...
-3
votes
2answers
156 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
60 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
81 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
51 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
92 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
1answer
118 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
80 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
56 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
58 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
68 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
227 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:
...
4
votes
2answers
214 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
110 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
177 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
61 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
86 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
1answer
70 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
155 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
102 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
61 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 ...
3
votes
1answer
210 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
223 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
304 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
159 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
754 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
135 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
245 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
114 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 ...
-1
votes
2answers
175 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 ...
0
votes
1answer
87 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?
0
votes
2answers
179 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
267 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
81 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
79 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
136 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 ...
-3
votes
1answer
385 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 ...
0
votes
0answers
62 views
Trouble exporting code from eclipse using JarSplice
I have developed a fairly simple game, 3d dimensional, using lwjgl & lwjgl_util. After exporting it using jarsplice, everything works fine, except for some reason I have to have the res folder in ...
3
votes
2answers
473 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
165 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
197 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);
...
0
votes
0answers
144 views
LWJGL Mouse Input [closed]
I have this mouse function in my LWJGL program:
public void mouseInput(){
int mouseX = Mouse.getX();
int mouseY = 600 - Mouse.getY();
int mouseDX = 0, mouseDY = 0;
int lastX = 0, ...
0
votes
0answers
806 views
Issues playing audio with Slick 2D [closed]
Started trying to learn Slick 2D a few days ago and have enjoyed it so far. The only problem is I can't seem to be able to get audio to play. I have tried going through the documentation examples, ...
0
votes
1answer
224 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, ...
-1
votes
1answer
102 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 ...
