| View previous topic :: View next topic |
| Author |
Message |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sat Aug 04, 2007 7:40 pm Post subject: Colision detection |
|
|
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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sun Aug 05, 2007 1:29 am Post subject: |
|
|
| 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 |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sun Aug 05, 2007 2:53 am Post subject: |
|
|
| 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 |
|
 |
emoon

Joined: 18 Jan 2004 Posts: 91 Location: Stockholm, Sweden
|
Posted: Sun Aug 05, 2007 4:23 am Post subject: |
|
|
| yes. Collision code for a regular Tetris game on PS2 should take like ~1% (or less) of the CPU. |
|
| Back to top |
|
 |
|