Jump to content

  • Log In with Google      Sign In   
  • Create Account

Ed Welch

Member Since 08 Jun 2009
Offline Last Active Apr 30 2016 01:35 PM

Topics I've Started

The wrong way to count lines of code

10 October 2015 - 05:45 AM

I was just wondering why some projects report such inflated figures for lines of code (google have claimed to have writen a billion lines of code)
I downloaded a tool called cloc and discovered that it automatically doubled the amount of code in my project (c++) - normally, I just search for ";" - a much easier way to do it.
It looks like to me that they are counting everything that isn't a comment and isn't white space as a line of code. A single open curly brace gets counted as an entire line of code. This is obviously wrong. If you format your code for readability you will double the lines of code, compared to some one who writes code in a more compact style - even though it's essentially the same code.

Also, every file gets counted, no mater what it is, stuff auto-generated by the IDE and even html files get counted.


Anyone using Bullet serialization?

29 September 2015 - 11:29 AM

I found that creating a scene with btBvhTriangleMeshShapes is quite slow, so according to the bullet wiki you can speed that up by serializing the bullet data to disk and then loading back again. However, looking into the serialization code I realize there are a number of issues with it. First off, it's creating a 32k file for one single mesh of 100 vertices - that's means the whole scene is going to be massive. Also, I heard that you can't serialize individual shapes, you only can serialize an entire world.

I'm just wondering if anyone has actually used that part of bullet and is it stable.

Tool to measure memory fragmentation

28 September 2015 - 09:01 AM

Does anyone know of a tool to display the memory layout of a c++ program?

Memory fragmentation is a problem that can occur in some long lived apps that delete and assign memory a lot. The problem is the developer can never know that he even has a problem unless there is a tool that displays the heap layout. It would need a graphic display of the entire heap and the "holes" in the memory that aren't getting reallocated.

Maxwell's asynchronous compute flaw

04 September 2015 - 08:48 AM

AMD's Robert Hallock recently made a comment on Reddit that Nvidia's Maxwell architecture asynchronous compute capabilties are poor, because they require a context switch:



This is the reason that Nvidia's GPUs perform the Ashes of the Singularity’s DirectX 12 benchmark, so poorly (according to an Oxide games developer: http://www.overclock.net/t/1569897/various-ashes-of-the-singularity-dx12-benchmarks/1200#post_24356995).

Ashes of the Singularity does not even use asynchronous compute half as much as other console games, so it looks like it's going to be a very important feature in the future.


I am just wondering is this a flaw that can worked around in a future Nvidia driver update, or is it something deeply embedded in the hardware?

temporarily exclude a rigidBody from ray testing

03 September 2015 - 07:05 AM

I am using Bullet physics for ray testing and I want to exclude a rigidBody from the ray test for one call only.
Is there anyway to do this without calling removeBody and addBody?
I looked at using btOverlapFilterCallback, but that seems to be for preventing collisions, not ray testing.