4 ms·
Compared to now, back then it was a lot more you had to figure out on your own. I remember coding a game on C64 in the eighties. Just to figure out how to prin
by vardump 3y ago
Compared to now, back then it was a lot more you had to figure out on your own.
I remember coding a game on C64 in the eighties. Just to figure out how to print the players score so that it is sufficiently fast was a challenge. Dividing by 10 with modulo to convert numbers to digits was just way too slow.
My method was not to use normal math, but to directly manipulate screen RAM characters when the score increased.
That was a very cheap way to increase the players score by say 1000 – you didn't even have to care about 3 lowest digits, just inc thousands place by 1, if it overflowed past 9, increase next position left, etc.