I've been over the code on "Using Vertex Buffer Objects" at the LWJGL site a fair few times now. The trouble I am having, is that my game does not draw a cube at all. There are two classes in that paste - the VBOHandler class that I wrote is at the bottom. To rule out camera issues, I set up a camera that points at a reference grid around the origin too. This is a screenshot of what my game sees

The reference grid is made with just plain vertices - not buffered, not using an index buffer, nothing. Just vertices.

You forgot to flip your buffers. >_>EDIT: If you're making a DK2 clone, let me tell you I peed on that streetlight first! xD

I am indeed making a DK2 clone. :-) But only to build the engine I need for a different, unique game. How did yours go / is going?

Thanks for the response. I took a look at the LWJGL VBO page again and did a ctrl+F for "flip" -- no mention. I then went to the FloatBuffer documentation and worked out what flip() does before employing some "random engineering" with buffered*.flip() calls and yielded nothing.

Perfect, thanks! It didn't work at first, but then I also noticed that I never actually buffered my colour data. So I threw in "VBOHandler.bufferData(_coloursID, bufferedColours);" as well as your solution and it worked.

Time to hunt around for a "Thanks" or "+rep" button on the forum, and go update all my other posts :-)

@theagentdDamn too many people forgetting to flip buffers these days! Flipping buffers is a pain in the arse!!

Haha, time for a sticky in the OpenGL sub forum? xD I've forgot to flip my buffers so many times since I started with LWJGL that that's the first thing I check if something isn't working when buffers are involved.

I am indeed making a DK2 clone. :-) But only to build the engine I need for a different, unique game. How did yours go / is going?

I haven't gotten very far yet so I won't be posting any screenshots. Hell, I'm not even sure I will ever manage to finish it. I only have terrain rendering, fog of war and exploration (things don't update until your units see them) done at the moment. I'm currently working on the unit system, player system and rooms, all at the same time, while trying to keep all the other stuff I'll have to implement in mind. Loading maps/units from files, multiplayer, semi-static objects, decorations, AI... Everything has to fit together in the end, so because I'm trying to take everything into consideration it's going a little bit slow at the moment. I'm having a big CPU performance issue with my fog of war too, which will require some optimizations later.Without fog of war I get around 200 FPS with 800 units and a 256x256 map. As the the game is extremely CPU-limited now (I will implement multithreading later) and I only have very simple graphics, I can enable as much anti-aliasing as I want without affecting the FPS at all, and I'm on a laptop.

Without fog of war I get around 200 FPS with 800 units and a 256x256 map. As the the game is extremely CPU-limited now (I will implement multithreading later) and I only have very simple graphics, I can enable as much anti-aliasing as I want without affecting the FPS at all, and I'm on a laptop.

Wow. That's not bad. I was getting ~80fps running my clone with 25 units on a 128sq map with XNA. Mine has a map generator, renderer, and a LOT of AI. There's a video (a few months old now) that reflects my progress at the "Game" link in my sig. It doesn't use buffers either, so the first thing I'm doing with my port is making it use VBOs with a chunk system.

Fog of war doesn't have to be rendered every frame, s remaking it every 4th to 10th should be enough with some clever interpolation between the last one map and the current one. The problem is that just rendering the full fog of war (which can cost up to 20ms when the units are in the thousands) gives me so much micro stuttering that it doesn't really change anything. I'll have to split up the fog of war rendering between multiple frames (at the cost of SLI/Crossfire support xD), but I'm not gonna dive into this now. It works, and I have more important things to implement. My point is that I can make fog of war rendering basically free.

Your video looks really nice! Keep it up!

Concerning the appreciate link, were you logged in when taking that screenshot?

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