Link to home
Start Free TrialLog in
Avatar of gamesdev
gamesdev

asked on

Tiles and collision detection

Hi,
ok, you don't need to post any code, it's just a simple discussion, I just want new working ideas that I'm too lazy to search for!

First of all, did you check a game called Xonix before?
or the new AirXonix from atomax.com?
or maybe the classic Jezzball?

For simple games like these, what's the most appropriate method to check for collisions?
do you have to make a map of the entire field? how big should a tile be? or is there another method?

Can you help me find the algorithims for checking collisions between ball/cylinder, ball/polygon, ... using vectors?

Please post any comments you find relevant.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of info_expert
info_expert
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you dont want to opt for code then here is a tutor:

http://www.rookscape.com/vbgaming/tutAP.php

Regards.
Avatar of gamesdev
gamesdev

ASKER

A couple of hyperlinks, wasn't exactly the answer I was looking for.
Thanks anyway.
PS: the second link is broken!
Hey.

I recently tried my luck at making an asteroids game (in VB).  The graphics were all done by drawing lines.. my asteroids were 12 sided, and a simple iscoceles triangle for the ship.

For collisions, I found a wicked formula that calculates if a point (x,y) was within a triangle defined by points A(x,y), B(x,y), C(x,y).  So at every check-point, I'd check to see if any of the 12 points of the asteroid was in the triangle of the spaceship, AND if any of the 3 points of the ship were within the 12 triangles of each asteroid... And I did the same thing with all the active bullets on the screen.. checking the X,Y of each bullet with each triangle of each asteroid.

This made for incredibly accurate collision detection.. right down to the pixel.
Anyways, Thought I'd share that with you...

Sean