Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / collision question

Author
Message
Hishoo
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location:
Posted: 13th Nov 2011 01:54
How can I know if a specific known sprite get collide with any unknown sprite without checking the collision between the known sprite and all sprite exists in the world using the command getspritecolision() and for next stamen
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 13th Nov 2011 15:57
be careful with getspritecolision() it will slow your game down if you don't use it right. It is faster to see if the sprite exist and is active before checking colision.
So I would say before checking if a sprite has colision I do the following steps.

1st. check sprite exist and active.
The first step can be easy by making a bool statement for a active sprite. Usely there is alot of clones of sprite on the screen so make an array that checks all acive sprites for the current screen.

2nd. know check colision

Go through yourself at a wall.

Login to post a reply

Server time is: 2024-04-26 02:12:13
Your offset time is: 2024-04-26 02:12:13