Yer - but not the message i sent before - hang on ill try in plain text at the bottom of this. This was a reply to Calvin
Ok, 1st thing, the advantage of using 2 screens is it doesn’t matter how long it takes to redraw the screen you will never see any flickering / shearing etc as its not being displayed until its ready, so even if the game runs in a frame, i would still use 2 screens, it saves alot of headaches Black track would mean clearing the sprites was quicker and you wouldn’t need to store a mask, but then you wouldn’t be able to go near the edges of the track either. Afraid the black below the cars (well if the cars have 8 rotation angles – it would need to be aaround them) would work, if you had 2 cars near each other one would rub out hte other. Id have to check my timings again, im not sure if unrolling sprites is quicker than compiled sprites. The disadvantage with compiled sprites is clipping them to the edge of screens. (BTW – Did anyone come up with good ways of doing this? I had ways to easily clip to either left/right or top/bottom, depending on which way i stored the sprites, but all 4 was a nightmare). From memory though, compiled sprites are quickest, but use the most memory. You can have a generic sprite drawer for specific sized sprites and make it faster than any size. Loading them all wouldn’t be that much of a problem, even a basic sam has 256k which can easily store uncompressed sprites. A slow part of a car game is the computer drivers, there are various ways to make them move around the track, i wrote a system where i split the screen up into areas and each area told the AI what direction and speed it was ment to be going. That way i could store a table of direction / speed and then, say i split the screen up into 16x16 pixel areas, i would take the AI car x and y, divide by 16 and read the speed, direction from the table 1000 Let CarAI1X = 100, CarAI1Y = 100; 1010 Let Dir = Peek(DirTableStart + (CarAI1X / 16) + ((CarAI1Y / 16) * (256/16)) 1020 Let Speed = Peek(SpeedTableStart + (CarAI1X / 16) + ((CarAI1Y / 16) * (256/16)) Then you can just move the direction and speed towards those values. If you want them to take into account other cars then its alittle harder. (The *256/16) is because for each Y step down the table we have a 256/16 X values to skip over. Collision is always a pain, i would probably just do some sort of box collision, then its a case of checking if car1X+CarWidth < car2X and car1X > car2X+CarWidth (and a similar check of Y) you have a collision, although to be kind you would reduce the size of the cars so they could overlap a little, especially if you have rotating cars. There are lots of other ways though. Ive just been digging up some articles i wrote years ago for a friend on learning to program the Z80, ill dust them off and check them over then hopefully Mr Colin ‘Mayhem’ Piggot will print them up into Sam Revival. Hes just sent me a backup of the code i had started in there, so ill get that finished off as well. Anyway, hope that gives you some help. Adrian APB Computer Services Ltd. Registered Address: 3 Springfield, Trevadlock, Congdons Shop, Launceston, Cornwall, PL15 7PW. Registration Number: 4942193. V.A.T. No: 826 0005 70 This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
