| |
Oswald
Registered: Apr 2002 Posts: 5086 |
Sorting
are sorters really so slow in games? :) I have made my unrolled version for my theoretical game (;), and it takes 132 rlines to sort 32 numbers o_O worst case is ~200 lines. tho when its the case of 4 numbers have to be swapped only it does the job in ~10 lines. wastes a lot of memory but I like it :) |
|
... 200 posts hidden. Click here to view all posts.... |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
I mean to use that kind of indirection every time when you want to read Y coo.
so instead of
ldy sorted_virtual_sprite_pointers
lda ycoordinates,y
ldy sorted.....+1
cmp ycoordinsates,y
lda (sortedpointers),y
cmp (sortedpointers+2),y |
| |
mhindsbo
Registered: Dec 2014 Posts: 51 |
Yes that is what I did above. The load and cmp of y coordinates is faster, but the sorting of the indexes becomes slower. And with the double dey all in all the original implementation is faster (unless I missed something). |
| |
Oswald
Registered: Apr 2002 Posts: 5086 |
I see, too bad |
Previous - 1 | ... | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 - Next |