Path: chuka.playstation.co.uk!news From: Developer Support Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: in need of assistance... Date: Thu, 24 Jul 1997 09:49:26 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 37 Message-ID: <33D71715.2DFD@interactive.sony.com> References: <01bc970d$ea6221c0$12c562cf@mattguyo> <33D5C790.4BE@interactive.sony.com> <01bc97af$e5fd8780$12c562cf@mattguyo> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Matt Guyot wrote: > > Lewis, > > ouch... little bit embarrassed about that negative velocity thing... sorry > > as far as the headings... i am sure that it only lets the sprite move in 8 > directions... if you rotate the sprite to about 65 degrees, it only moves > in the (+) x direction... it should be imparting some y velocity to it as > well... i dont know if this is because of the way i set up the math or > what; but i wanted to allow lots of headings and this way just doesnt seem > to cut it... I think this problem is because of the use of fixed-point values for pixel speed/position. Try using integer values for position and velocity which are 4096 times larger than pixels, hence you can move very smoothly in variable space; when drawing on screen, divide by 4096 to get actual pixels. Also, try allowing larger velocities for the ship ( ship with maximum speed of 1 pixel per frame in x and y directions can only move 8 ways), and use sin and cos functions which use PlayStation-format angles (4096 is full circle). Existing sin and cos modules, and much other 2d stuff, can be found in the SCEE demos 2d, 2d2 and breakout. Lewis > > if you could tell me where the examples of this type of code might be i > would appreciate it... i dont have codewarrior, so if they come with that, > i need another example... > > thx > matt > > ps i put in the negative velocity limits... they worked like a charm... thx