A recent calculation of the modified parameters and adresses in EAWPRO shows the modified adress count of the optimised routines thusfar is 32.145 changed adress locations vs the 1.2 original version, of which currently app. 13.370 bytes were freed up for programming. The numbers show that against the compiled original version app. 30% of the EAW.EXE can be removed to speed up the overall gameloop and this is inpsite of the improvements I've made. In other words, no matter what I can come up with it'll still give a 30% improvement for the the routines I tackle.
Overall the improvement is perhaps less significant since I will never be able to optimise and rewrite everrything but the routines I go for are the ones which take up the most CPU and GPU power, unless ofcourse there's something that really catches my eye. Optimisation sometimes isn't really required for what I want to accomplish, so on such occasions I regularly leave it untill I can think of something else in that routine which will need the freed space.
Instead of searching for solutions I've addapted the strategy to just think of what a routine is capable of doing, within the realms of what I want to accomlish ofcourse. Such usually happens when I'm seeing that the code I can work on can get that 30% speed up by freeing up memory. Sometimes I already know how to use it but often I just think about it later. the approach has more and more develloped into ''let's see if we can get to that 30%'' and then ''lets see what the routine will allow me to do with it''.
There are plenty of ideas I have about the game, but sofar I've been restricted in certain ways as I'm normally not willing to sacrifice memory to get what I want by jumping out of the loop. If it can't be incorporated right there then it'll have to happen somewhere else. I only broke that rule maybe 2 or 3 times for stuff that I really thought was beneficial to the game.but generally I'm staying away from that, as it turns my assembly code into a mess. Having to write down that I borrowed some freed bytes from another routine doesn't help much in terms of keeping oversight.
Most of my time has gone into making notes and updating them as the routines progressed, I'd say some 50% has gone into that, another 25% goes into finding the appropiate mnemonics to do what I want, from the list I have or directly and preferrably from the orignal disassembly itself.. Some 20% of the time goes into thinking about the routine's possibillities and only 5% is about rewriting the code. I think about 1/2 of that again is used for error trapping, because mistakes are easily made.
It has helped me to learn C++ besides the Pentium 32 bit assembly code, the side by side learning has been very usefull in understanding either language, but i must admit there's still a lot to learn, so on we trot.
I'll leave you with a few screenies from my latest mission to test recent changes, to most it will probably look not much different then before but believe me a lot has changed besides the speedup,
VonBeerhofen