#77727 - aik6980 - Sun Apr 02, 2006 6:04 pm
Hi guys,
Now, I'm doing my game project. It's a platform game like mario. Here's a question
There are my Collision test code, it's work but is it better to use vector concept rather than check it directly to array?
The problem is, it will grow bigger later when my whole stgabe is full of character and monster.
I use MapEd building map and collision map
any good idea?
Thank alot[/code]
Now, I'm doing my game project. It's a platform game like mario. Here's a question
Code: |
u8 collisionTest_PVMy(){ s16 tx=0,ty=0; tx=alien.px/8; ty=alien.py/8+3; if(bgCollision[(tx+(++ty)*32)]==0x0004){ return HITDOWN; } else return OK; return 0; } u8 collisionTest_PVMx(){ s16 tx=0,ty=0; tx=alien.px/8+1; ty=alien.py/8; if(bgCollision[((++tx)+(ty)*32)]==0x0004){ return HITRIGHT; } return OK; |
There are my Collision test code, it's work but is it better to use vector concept rather than check it directly to array?
The problem is, it will grow bigger later when my whole stgabe is full of character and monster.
I use MapEd building map and collision map
any good idea?
Thank alot[/code]