Path: chuka.playstation.co.uk!news From: "Rad" Newsgroups: scee.yaroze.programming.2d_graphics,scee.yaroze.beginners Subject: Re: Collision Detection with the Background Date: Fri, 2 Apr 1999 02:32:22 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 35 Message-ID: <7e16nc$5qu15@chuka.playstation.co.uk> References: <7e0ut2$5qu12@chuka.playstation.co.uk> NNTP-Posting-Host: vil-12.village.gre.ac.uk X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Xref: chuka.playstation.co.uk scee.yaroze.programming.2d_graphics:929 scee.yaroze.beginners:768 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. 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. 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 > >