| Member with 601 posts. | | Join Date: Jun 2007 Location: Hertfordshire - England Experience: Advanced | |
Ah... Halcyon days! Just noticed this post... I did a lot of work on this sort of thing in the late 80's and early 90's. Earlier hardware had certain restrictions as to where it could paste images. Sprites had to be a certain width, and could only be placed on 16pix boundaries. To get the speed up, many game devs used a technique called pre-shifted sprites (basically storing multiple copies of the same image at different x offsets) but I worked with a few of the guys at Bitmap Brothers using 'really' optimised MC68K to scroll at run time - it was one of my earliest softy jobs and really fun while it lasted!
Sorry for the old timer stuff, got a bit cloudy eyed there for a minute. The answer to your question is that these days, you don't need worry about it. The sort of stuff that used pre shifted and interleaved sprites was running on an 8MHz CPU with graphics memory measured in little things called 'kilobytes'. If you wanted to be really, really picky (and I'm talking about clock cycles here) it would be (very) marginally faster to access memory on a boundary that is divisible by a power of two, but if you're talking about sprites then you'd never notice the difference unless you had literally thousands of them on screen at once...
Hope that's cleared things up a bit.
Danny
__________________ "An Apple a day keeps the Gatesy at bay" |