Yet another voxel engine

Oh sweet, thanks. I’ll put that in^^

@Screem
Yeah I got quite a high numbeer too. I’m dubious of the method I used to calculate it.

I can explain it here:
Because I cap the framerate to 60 every loop, I needed a way to calculate the framerate you would have if you didn’t cap it.
Each frame, I get the amount of nanoseconds/1000 it takes to perform all the calculations (without the bit where I cap the framerate). I add this to a value.
Every 60 frames, I take that value and divide by 60 to give the average nanoseconds/1000 it takes to do all the calculations. Then I divide 1000000 by this value, to get the amount of frames that can elapse in 1 second. Then I update the count.

I’ve been over this and it seems fine - but I was incredibly surprised with the result I got too:s

Yeah, sitting still it’s 2500, moving about 2100.

I am getting the weird glitching at the start position though:

A rather stupid mistake was that I didn’t include the Display.update() function in the FPS calculations. I’ve updated the link to do that - it still stays at a steady 2.5k fps for me though.

Are you on mac?

Windows 7.

It only occurs at the corner you start at, perhaps some division by zero error in the vertex generation?

Just tried it on my new laptop, no glitches but about half the FPS (odd)

It’s a Win8.1 i7 4200 + GT 755

I’m guessing that you’re doing something old drivers/OGL don’t like. That card in my desktop is from 2009 (!).

I tried the original again, I can just barely see the voxels if I move around, I initially assumed it was totally broken because it doesn’t grab the mouse. I can’t run the new version because I don’t have OpenGL 3 :emo:

There is only one way to measure FPS reliably:


int fpsCounter = 0;
long lastSec = System.currentTimeMillis();
while(...) {

   ... 

-  Display.sync(60);
   Display.update();

   fpsCounter++;
   if(System.currentTimeMillis() - lastSec > 1000) {
      lastSec += 1000;
      fps = fpsCounter;
      fpsCounter = 0;
   }
}

Given how asynchronous OpenGL drivers are, measuring it any other way is extremely misleading, as you’re otherwise basically measuring how fast you can fill up the driver’s command-queue. So drop your ‘calculations’, they will never be accurate. Just run the game loop flat out, and measure the actual frames that are rendered per second.

Mm, thanks riven, I’ll pop that in when I get chance - I wondered why the results I was getting were incredibly high.

And sorry, I was playing about with the text rendering and I think I added an unecessary GL30 method. I’ll remove it later, but I’m a little busy currently:P

A wopping 7650 fps for me :smiley:

http://puu.sh/9HTgk/ad001a9530.png

Pretty darn sure that fps count is broken;)

6.2k FPS ^^

Here’s the real test, I’m running on a laptop A6-5200 at 2Ghz Integrated graphics
http://www.cpu-world.com/CPUs/Jaguar/AMD-A6-Series%20A6-5200.html
I’m getting ~500 FPS, although it stops when moving, I assume it’s loading in new blocks

Although the starting area isn’t in good shape :stuck_out_tongue:

4-5k fps. I don’t even know if this project is still going but why not.
i7 4770k oc to 4.4 ghz
GTX 780 ti

Pretty sure i did the FPS counter wrong, looking back on this.

Wouldn’t say it was still going, 3D is hard man;) But I’ll probably go back to it in future.

That’s really weird @Joshua Waring :smiley: I’m not really sure about that, was a bit of a noob when I put all this together (Still am :’) )

Thanks for the replies regardless.

Mind if I ask how you were measuring fps? generally you calculate it by taking the time before and the time after the render function and then dividing 1sec in milliseconds to calculate how many frames per second.
PSEUDO
time before = Millitime();
render();
time after = Millitime();
difference = time after - time before;
fps = difference / tomillis(1);

That doesn’t work if you are using OpenGL. Look at the Riven’s post somewhere above.

Yeah lcass, that’s what I was doing, but as trollwarrior pointed out, that doesn’t work.
In fact, it shouldn’t be any higher than 60 I think, b/c I’m calling Display.sync(60) every frame - although if I’m honest, I’m not entirely sure what this method is doing.

Is there any way to remove this post? I wouldn’t want to bother anyone else with it, as I don’t really care for any more results right now.

Thanks:)