Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.beginners Subject: Re: angles, angles Date: Tue, 24 Nov 1998 19:01:10 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 44 Message-ID: <365B0276.4760@manc.u-net.com> References: <72spa7$dvm12@chuka.playstation.co.uk> <72sr28$dvm13@chuka.playstation.co.uk> <3652971c.228584498@news.playstation.co.uk> <731up3$olq9@chuka.playstation.co.uk> <3654E715.74C8@manc.u-net.com> <739qi2$ekm13@chuka.playstation.co.uk> <36588BB6.65EC@manc.u-net.com> <73cs2m$no810@chuka.playstation.co.uk> Reply-To: james@manc.u-net.com NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) Darren Jackson wrote: > Have you ever been in a position where no matter how many times you > bang your head against a brick wall, the wall doesn't budge? I think > I have a mental block at the minute! Changing the code as you > suggested doesn't make any difference (note I used >>9 because >>12 It is something that will just 'click', usually when you're not banging your head against the wall, but some irrelevant time. I see now that the code I gave you wouldn't sort out the problem (D'OH!) although it did highlight a classic mistake (location of the bitshifts.) Phew. You need to add a scaling function on the SPRITE's coordinates, but you cannot do that if you are still using the .x .y members of the GsSPRITE structure to handle its position -- you will need to create your own player struct: tyedef struct { long x; long y; } TANK; TANK Tank; Then make Tank.x and Tank.y your scaled coordinates (*4096) and just before GsSorting the actual sprite, set the sprite's .x and .y values: tanksprite.x = Tank.x>>12; tanksprite.y = Tank.y>>12; This WILL allow you to get the tank to move as slow as you want. Honest ;-) So when Tank.x = 4096 it actually refers to sprite.x = 1 Also, you can put all of the Tank's variables in its struct, which will tidy it all up and allow you to add more tanks very easily. If you have trouble still I could help much better if you posted more code, but this should sort it out. Keep banging! (oo'er). Later, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj -----------------------------------------