Path: chuka.playstation.co.uk!news From: "Rikki Prince" Newsgroups: scee.yaroze.programming.2d_graphics,scee.yaroze.beginners Subject: Re: Collision Detection with the Background Date: Fri, 2 Apr 1999 13:28:59 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 48 Message-ID: <7e2d8o$5qu18@chuka.playstation.co.uk> References: <7e0ut2$5qu12@chuka.playstation.co.uk> <7e16nc$5qu15@chuka.playstation.co.uk> NNTP-Posting-Host: th-en137-107.pool.dircon.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Xref: chuka.playstation.co.uk scee.yaroze.programming.2d_graphics:930 scee.yaroze.beginners:769 Rad wrote in message news:7e16nc$5qu15@chuka.playstation.co.uk... > Yep thats one way to do it and it's probably the most effiecent way. > Another way is to test the player's sprite against the cell at the pixel > level but this is obviously slower and introduces other problems but it all > depends on the type of game and the type of cells you are using. > Cheers, I'll get going on writing the code then. > p.s. I'm sure most people check all the newsgroups so there really is no > need to post the same messages in multiple groups it just causes duplicate > messages all over the place. > Sorry about that, I'll refrain from multiple posting in the future > Cheers, > > Rad. > rad@cyberdude.com > http://www.netyaroze-europe.com/~radpsx > > > Rikki Prince wrote in message <7e0ut2$5qu12@chuka.playstation.co.uk>... > >Can anyone tell me how to do collision detection between the player's > >sprite, and a background made with the BG functions? I'm not too bothered > >about getting any actual code, I just need the theory behind doing this. > All > >I can think of is to check whenever the player moves through 16 pixels, > then > >say that the player has moved into a new cell, then check whether the cell > >is filled with a block which would stop the player, then move the player > >back to the nearest place where they are not in the cell. However, I don't > >know how efficient this would be. Anyone got any other ideas? > > > >Thanks > > > >Rikki > > > > > >