Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2
1  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Frustum Issue on: 2014-10-16 15:01:05
My frustum isn't culling properly when I move the camera around. Its hiding chunks and showing chunks completely incorrectly.
2  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Frustum Issue on: 2014-10-13 21:57:56
Can anyone point me in the right direction?
3  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Frustum Issue on: 2014-10-10 13:00:45
Thats what I figured. But the camera is rotating fine. So doesn't that mean my viewMatrix is rotating? And the projectionMatrix shouldn't change, right?
4  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Frustum Issue on: 2014-10-10 03:14:12
UPDATE:

Analysis: When I point the camera at the origin (0,0,0) all chunks render (I have it counting chunks rendered). And as I rotate over to 180degrees away from the origin the chunks stop rendering at a consistent rate as I approach 180degrees. Then if I continue towards 360 back to origin they start rendering as same rate they were disappearing.

I'm stumped... 
5  Game Development / Newbie & Debugging Questions / LWJGL - 3D Frustum Issue on: 2014-10-10 02:11:08
What is a typical set up for frustum culling?

I've looked at example codes but the culling is coming out wrong.

Chunks that shouldn't be rendering are rendering and some aren't rendering.

This is how I'm setting it up:
1  
2  
3  
4  
Matrix4f.mul(projMatrix, viewMatrix, combinedMatrix);
invProjViewMatrix.load(combinedMatrix);
invProjViewMatrix.invert();
frustum.update(invProjViewMatrix);


And I'm extracting the planes the typical way.

this is how I update my viewMatrix:
1  
2  
3  
4  
5  
setIdentity();
rotate((float) Math.toRadians(camera.getPitch()), new Vector3f(1, 0, 0));
rotate((float) Math.toRadians(camera.getYaw()), new Vector3f(0, 1, 0));
Vector3f cameraPos = camera.getPosition();
translate(new Vector3f(-cameraPos.x, -cameraPos.y, -cameraPos.z));



What's wrong?


EDIT: Heres what it looks like with me rotating the camera around: (It only renders wire mesh when its "outside" frustum. For debugging purposes.)

http://i.imgur.com/uvrYtGc.gifv


Big gif. Takes awhile to load.
6  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Tiled Terrain on: 2014-10-06 21:50:43
Any good resources on shadow mapping?

I can't find any that look promising.
7  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Tiled Terrain on: 2014-10-06 21:47:07
Updated. However there is a slight performance hit.

Ultimately I'm divide into chunks.

Good idea?
8  Game Development / Newbie & Debugging Questions / Re: Would it be better to make a thread for terrain generation> on: 2014-10-06 04:01:32
There would be no benefit (that I can think of) to do it in another thread.

Usually only thing that would be in another thread for a game would be the network thread.
9  Game Development / Newbie & Debugging Questions / Re: Would it be better to make a thread for terrain generation> on: 2014-10-06 02:58:51
Is your terrain going to be dynamic?

If not there is not need to create another thread to generate. Just generate it once.
10  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Tiled Terrain on: 2014-10-05 23:49:51
Thanks brotato. You've been a great help.
11  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Tiled Terrain on: 2014-10-05 23:38:39
So using indices only really decreases 2 vertices per quad. Will it even be worth using indices anymore?

(Trying to get this efficient)
12  Game Development / Newbie & Debugging Questions / Re: LWJGL - 3D Tiled Terrain on: 2014-10-05 23:33:04
I figured so much. So I will have to place use an array of quads?

-going to look at your world now-
13  Game Development / Newbie & Debugging Questions / LWJGL - 3D Tiled Terrain on: 2014-10-05 23:24:39
Hello!

Does anyone know a method of setting the uv for textures using shared vertices and properly binding?

Is there an efficient way to get the "2D tiled" look in 3D? Thats pretty much what I'm going for.

I have this so far however since the vertices are shared the texture flips every other row:






UPDATE: There are now 23% more vertices.



14  Game Development / Newbie & Debugging Questions / Re: [LWJGL] Proper Way to Handle GUI Input. on: 2014-07-09 14:27:25
Nevermind I had it backwards. I've been doing event-driven. But I loop through all events once an update. I'm doing something like this
1  
2  
3  
while(Keyboard.next()) {
    forward to listeners
}
15  Game Development / Newbie & Debugging Questions / Re: [LWJGL] Proper Way to Handle GUI Input. on: 2014-07-09 14:20:34
Can you link or show me a quick example? The only 2 ways that I know of handling events is every update to loop through all the handlers in my UI in zorder and break the loop on a hit. Or using something like Keyboard.isKeyDown(). But how would I use the latter for, say a textbox without having to write out all possible keys?
16  Game Development / Newbie & Debugging Questions / Re: [LWJGL] Proper Way to Handle GUI Input. on: 2014-07-09 14:12:58
So polling is the proper way?
17  Game Development / Newbie & Debugging Questions / [LWJGL] Proper Way to Handle GUI Input. on: 2014-07-09 14:04:06
I've been working on a basic all-in-one 2D game library using LWJGL.
 
The UI that I created works fine just sometimes events are lost, or something.

I am currently polling the input for the UI and if a UI object returns true it breaks the loop through in my listener.

Is polling the best way to do this?
How else can I do this?

Lets make this a discussion!
18  Game Development / Newbie & Debugging Questions / Re: layers-Libgdx on: 2013-12-22 03:42:25
You can set a z-index and use a comparator.
 something like so:
1  
2  
3  
4  
5  
6  
7  
8  
Comparator<Integer> comp = new Comparator<Integer>(){
    @Override
    public int compare(int o1, int o2){
        return new Integer(o1.x).compareTo(o2.x);
    }
};

Collections.sort(list, comp);
19  Game Development / Newbie & Debugging Questions / Re: Making A Slider Component Problem on: 2013-12-21 17:20:12
Back when I used Slick2d and needed a simple ui I used this: https://code.google.com/p/slick-sui/ its clean(for the most part) and easy to edit to your liking.
20  Game Development / Newbie & Debugging Questions / Re: glScissor() does nothing. on: 2013-12-21 16:53:46
Wow, nevermind I just got it. You have to flush before disabling scissor_test
21  Game Development / Newbie & Debugging Questions / glScissor() does nothing. on: 2013-12-21 16:52:51
I started working on a library for my game based off of mattdesl's wiki, and I can't get glScissor to work.

As the title states this code does nothing for me.

1  
2  
3  
4  
        glScissor(100, 100, 100, 100);
        glEnable(GL_SCISSOR_TEST);
        render to spritebatch
        glDisable(GL_SCISSOR_TEST);
22  Game Development / Newbie & Debugging Questions / Re: Printing whole exception. on: 2013-12-02 13:31:23
Have you tried e.printstacktrace ?
23  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-14 05:34:21
Will do. And I have progressed a WHOLE lot now. I will be working on water and world objects soon. My problem before was just the shared vertices, it wouldn't let me UVMap effectively.
24  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-13 17:11:17
Thanks! Terrain patch is exactly what I was looking for in an example. It cleared up what I didn't understand.
25  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-12 00:04:09
Yes, I knew that. That's why I didn't know how a textureatlas helps me.
26  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-11 19:10:18
I know what a textureatlas is.

I just don't see how a TextureAtlas can draw on specified vertices of my mesh.
27  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-11 17:18:59
Thanks, that answer clears a lot. And yeah, if you would like to share I would like to take a look.

Is the effect the one I spoke of?

With a mesh like that UV mapping certain corners of my mesh differently for tiles wouldn't have to be done. Since each set of triangles are symmetrical.
28  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-11 01:33:06
I'm using LibGDX's Mesh class with verticeattribute for texcoords. And simply using mesh.render() with shaders applied. I have it working with 1 texture but since shaders bind using texCoords and the triangles touch texcoords are shared for example its not what I want: 

29  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-11 00:59:12
Well I didn't mean to insult.

Just those answers aren't answering anything.

Its a 3D mesh. I want to texture it like a tile based game.

However, Its 3D.

I want to be able to draw a texture between two triangles that are forming a square.

A tile-based 3D map. Like in the video.
30  Game Development / Newbie & Debugging Questions / Re: LibGDX 3D Multitextured Terrain on: 2013-10-11 00:29:57
Are you guys just trying to get posts? Seriously those comments mean nothing. How would I use a TextureAtlas, explain.
Pages: [1] 2
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (36 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (27 views)
2014-10-15 16:18:58

TehJavaDev (52 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (77 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!