Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fourspriter: Alternate Version
#17
britlion Wrote:It's going to take quite a lot of work to get it into ZX Basic, not least of which because it's in Spanish which takes me quite a lot longer to read.
Also... looking closely at it, I'm pretty sure my version is faster. The Fourspriter 2 code has been changed in ways that look remarkably similar to my optimizations. (and, you know, if you are going to say "Úsalo y modifícalo como te de la gana, pero "porfa", menciónanos :-)" you could at least thank ME for some of those ideas in version 2!) It's clear that some of the code came from my updates - the redraw routine is to all intents and purposes identical to the fspredraw sub in my version. There are now two copy routines - screen 2 buffer and buffer 2 screen (which is what I named them) and so on. It's good they liked my ideas; I'm a little nonplussed that they didn't mention me.
Well, the version you see here is v2.0, but with even more optimizations I added. So probably the what looks similar are, in part or totally, my modifications. :oops:

On the other hand, yes, the code is commented in Spanish. I could translate it for you these evening. But the best way to work in team is using SVN. I will update this version to the repository (and yours, if you like). So we can cooperatively work them. What do you think? Have you finaly managed to install tortoiseSVN and downloaded a source revision?
Quote:But not all of my optimizations have been implemented. So I think the version I have is probably faster. At the very least I can see ways to make it faster in the places I did so before.

For example, I got rid of xpos and ypos completely - I held the current position in the BC register, instead of in memory. This actually made a VERY big speed increase.

I'll have to give this one a go - but I suspect it will still be unable to erase-buffer-redraw all the sprites before the screen update rolls down; which means it has to be done after waiting for it to go by.

But yes, it's not going to be five minutes to break it up and make it work for me. Probably more like 5 days. I never said I was a fast programmer. Working the kinks out of fourspriter 1 took me well over a week, and I had a lot of free time to do that.
L
I didn't examine your code in depth, but if you managed to keep the coords in BC, it should be faster, and required a lot of work, that's right. By now, I think we should keep both versions and use a speed test to see if there're performance speed differences between your patch and this one or not.
I prefer to go back to your fast-math routines at this moment and check if they compile and runs ok with -O2 and -O3.
Meanwhile, I will translate the FourSpriter 2.0 optimized version into English and fix it up (it's broken, I think: I really haven't tested it yet).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)