Sorting a Linked List? Help please!

Blitz3D Forums/Blitz3D Programming/Sorting a Linked List? Help please!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I understand your concerns Shifty, but it 'needs' to be done the way it is being done.

@octothorpe:
Nope, ported an example of the c code from the quicksort link you gave me to blitz3d with a few minor optimizations for blitz!

2 ms for 1000 is very good, and is also worst case possiblity. You have to remember that chances of me having more than 1000 cloud particles on the screen is very thin.

Also, 16ms per frame is when your waiting for vsync, so it's wasted time. If I turn the flip wait off and frame limit to 60, then I have an extra 16ms to use at my disposal.

Currently the tests have been pretty good. I can do 1000 cloud particles on the screen at a total of 2ms hit to the system. Now thats:
A. Getting all my particle positions relative to the camera,
B. Coloring the particles and setting up their coordinates
C. factoring in a formation value for the cloud
D. Sending all the particles displayed to a list
E. Sorting the list based on distance from the camera
F. Then going through the final list and ordering the 'quad's in the proper order so not to get alpha artifacts.

The system should be complete with a cloud editor within a week or so. Its very similar to the cloud system used in M$ flight simulator 2005.

The hardware I am testing this on is a 2.4 ghz system, so i can expect the 2 ms to double on half a machine.

I can see your a bit new to blitz there Shifty, I am unsure of your past experiences with game development however I assure you I am well qualified to optimize the system to peak performance. I thank you again for your concerns, however there are simply some things you can't cut corners on (such as sorting quads to keep alpha artifacts out).

:-)