forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Colision detection

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Sat Aug 04, 2007 7:40 pm    Post subject: Colision detection Reply with quote

Well I don't think i'll create the tetris of the y2k (who knows?) but making a small game would be nice to start exploring the homebrew tools. There are interesting and powerful libs (gsKit and the old gsLib) but I saw no support for colision detection...

I'm not very familiar with low level programming of PS2 and I'm not a expert in game development, but an approach to get some col. detec. would be keeping a bitmap mask for borders of each sprite for later to check if any of these pixels overlap with other sprite mask (or background interest regions). This means access to the PS2 video buffer which I must admit I have no clue if its accessible under gsKit... Is this the best way to do things? Is there currently a solution?
Back to top
View user's profile Send private message Visit poster's website
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sun Aug 05, 2007 1:29 am    Post subject: Reply with quote

Don't access the ps2 vram for these kind of things (it should never be need as its both really slow and complex to do in a good fashion) Just do the collision separated from the graphics instead.
Back to top
View user's profile Send private message Visit poster's website
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Sun Aug 05, 2007 2:53 am    Post subject: Reply with quote

emoon wrote:
Don't access the ps2 vram for these kind of things (it should never be need as its both really slow and complex to do in a good fashion) Just do the collision separated from the graphics instead.

I see. So a possible solution would be writting the borders masks into normal (not video) RAM using the CPU and checking it there? Hmm ok.
Back to top
View user's profile Send private message Visit poster's website
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sun Aug 05, 2007 4:23 am    Post subject: Reply with quote

yes. Collision code for a regular Tetris game on PS2 should take like ~1% (or less) of the CPU.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group