I am struggling to get the frustum culling working for the last day, but i can't find what's wrong with what i do.Here is my code for updating the frustum (called eveytime camera is moved) and checking if a point (a box) is in frustum.

I stopped reading after I saw you pulling matrix info from OpenGL. You're right to not think about speed to start with and just make it work first..I'd stick with that notion for the first (conceptual) part as well.

Using the same kind of logical steps I do on the complex number wiki page let me babble about step #1, point inside the near & far plane. You have a camera at position C with a forward facing vector of F and a test point P. We can translate the system such that we can think of the camera as being at the origin: P' = (P-C). Now all we need to know is the parallel projection of P' into F: If positive it's forward, negative behind and zero at the plane...moreover if F is a unit vector then the result is the distance from the plane. So we have: dist = dot(F, P'). Now this is the distance from the plane which contains the camera and our near plane will be some positive distance forward from that. We'll call that distance 'n'...so if dist-n >= 0 then the point is forward or on the near plane and likewise for the far plane at distance 'f', if f-dist >=0 then we're inside the far plane.

Yeah, that's part of the optimization part. If you have a region oct-tree and values for the four outer points, then next level values are simply the mid-point values. Assuming you're doing a tree walk you can classify the planes and ignore all children when outside of all (planes), and likewise you don't need to test with a given plane once a node is inside it.

I understand what you say. I will optimize the algorithm after i will manage this to work. First i want to make this work, because i understand how it works, but there is a problem with it. Am i using the right matrix? How can i calculate the W component of the points vector? What am i doing wrong in my code? The second thig is that i'm 10th grade (in Romania), this is 2nd grade of high school and I didn't learned matrix and planes at mathematics.I am very towards to learning stuff in advance, just tell me what i should do.

Getting a project done is by far the most hard thing in game development.

No, not if you don't need to know the distance. If you have a normalized plane and plug in some point which returns a distance of 2 and the multiply the plane values by say 3 (and is now not normalized) if you plug the same point into the equation you'd get 6. So for a given point the sign tells you on which side of the plane the point falls (and is still zero if on the plane)...no normalization required.

But how i use frustum culling then? I f i don't update the chunks when I move the camera, then the blocks won't show.I found something on LWJGL Wiki, but it is under GL3.1, but maybe it will work in GL2.1.

You need to check every time the camera is moved whether or not a chunk is in the frustum. If it is, you send the chunk to renderer and render it until it is not in the frustum anymore. Only rebuild chunks when a block is removed or it enters the view frustum. If it leaves the screen, save it to disk or delete it or whatever you want to do. But it's a bad idea to rebuild it every frame. Only rebuild it when you absolutely have to. Otherwise, just have a render method that is constantly running for the chunk.Also, this:

And another thing, I've never used it, but I don't think streaming your chunks would be beneficial because you have static terrain. It doesn't move every frame. The only time it ever changes is when you place or remove a block. If I'm correct, streaming is more for animated models that use VBOs.

You need to check every time the camera is moved whether or not a chunk is in the frustum. If it is, you send the chunk to renderer and render it until it is not in the frustum anymore. Only rebuild chunks when a block is removed or it enters the view frustum. If it leaves the screen, save it to disk or delete it or whatever you want to do. But it's a bad idea to rebuild it every frame. Only rebuild it when you absolutely have to. Otherwise, just have a render method that is constantly running for the chunk.Also, this:

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