Re: Re: [stella] Star Fire: Getting Closer: Perfect Sorting solution

Subject: Re: Re: [stella] Star Fire: Getting Closer: Perfect Sorting solution
From: "Roger Williams" <mer02@xxxxxxxxxxxxx>
Date: Fri, 29 Mar 2002 19:23:18 -0800
From: <cybergoth@xxxxxxxx>

> Now, exploiting that knowledge, I just do the following:
> 
> I let the outer loop of a bubble sort  run _exactly_ 2 times, 
> every frame.
> 
> While this addmittedly never produces a perfect sort,
> it is -> constantly improving the result.

This is a completely brilliant and very Stella-esque idea.
You can also rip out the "swapped" flag and the code
that sets and checks it since you *always* run two scans,
saving more time and memory.

Note, too, that if you make the "this entry not in use"
flag 255, you can delete entries by setting to 255 and
letting the sort kick 'em out.

I have had some ideas about using my polar coordinate
code for something, but kept getting hung up on the
need for flicker sorting.  (In polar coords, you can't
do *any* of the usual tricks for coinkydink avoisance,
since "up" and "down" are irrelevant.)

This idea is starting to give me ideas.  A deep purry
rumble is starting up in my belly, but maybe that's just
hunger.

Damn, and I have to work out of town next week
again 8-(

--Roger Williams 

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread