Just a quick message, as I`m a bit/loads hungover after three days on the cider :( hehe
Sorry you had so much trouble posting Adrian, I didn`t mean to ask so much, or to go into so much detail about what I had been envisioning possible with Basic, so thanks again for replying so fully, I appreciate it :) I`ll just say for now that I like your idea`s about how to control the computer controlled car`s, I`ve never written a car game, even on the Amiga, so it`s something that I`m coming to completely anew, and even with the main player control, I`m pretty certain that things can become complicated (or rather not complicated, but need a lot of code, so slow) and so I`ve been thinking perhaps along the wrong road (sorry, very droll :) ) I love the idea of splitting the map into sections, and having that section `tell` the CPU cars what to do with regards to speediing up, slowing down etc, I hadn`t thought of that, and think that would be a very good (and quick) way of achieving a good compromise. I`ll honestly try and get some temporary graphics knocked up later, and something of a test engine by tonight, just so this is going somewhere, and not just idle chat :) Reply fully later as there`s points I want to ask about/ comment on ! Oh, and thanks for including your example in Basic, it`s lovely to have an example `handed to you on a plate` so to speak, as when MC examples are used, it`s nice to see another bit of code to try and understand, but when your not familar etc etc... Surprised more MC`ers don`t have a dabble with Basic more often tbh :D anyways, must SLEEP *_+ Calvin... Adrian Brown <[EMAIL PROTECTED]> wrote: 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. --------------------------------- Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your freeaccount today.