Great idea! Right now, I have a destination address already calculated for the next frame. I really should stay away from loops. Loops really do add up, but that looks like it doesn't take very long at all. I think I CAN modify my routine to do 1 string of writes per 8 pixels, however I would have to really change my code.
I'm thinking of writing all of my routines at least twice. Since I rewrote my sprite drawing code yesterday, I feel that if I write rough drafts of code, and then write the real routine, I'd do a lot better. My first draft of my code yesterday was really sloppy looking, and it was barely understandable. I wonder if most programmers do this...
Sprite mappings
Moderator: Moderators
Heh, I think I know what you mean. When I started my project, I used to plan everything very carefully, so everything looked nice. Now I just write the stuff directly into the code files, and I'll write whatever it takes to test my new ideas, even if the code is not very pretty.Celius wrote:I'm thinking of writing all of my routines at least twice. Since I rewrote my sprite drawing code yesterday, I feel that if I write rough drafts of code, and then write the real routine, I'd do a lot better. My first draft of my code yesterday was really sloppy looking, and it was barely understandable. I wonder if most programmers do this...
After I see that the ideas work fine, I rewrite the code, making it look better, adding comment and maybe even optimizing a little.