Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Suggestion Box (http://www.alice.org/community/forumdisplay.php?f=26)
-   -   Collision Detection (http://www.alice.org/community/showthread.php?t=5998)

reuben2011 02-18-2011 04:09 AM

Collision Detection
 
I know there has been a lot of people saying "We want collision detection! Blah! Blah!" I'm not going to be that type of person that just demands a feature. Instead, I was wondering, if the people creating Alice 3.0 could access all of the "points" of any particular object.

For example, if we assign a letter for every three-dimensional position, if object1 contains points in the positions {a, b, c, d} and object2 contains points in the positions {d, e, f, g} then it would show as a collision since they share a common point {d} in the same position. I know that most objects contain more than four points, so I'm not sure if checking for collisions using this method would be practical.

So yeah, Alice could have a built in "isColliding" function, using two parameters for the two different objects and the result would return true if the any points in the first object are in the same position as the second object.

So yeah... to sum it up in hard code:

isColliding = function(object1, object2)
{
//object.points is an array containing all the points in that object.
//intersection is a function that returns the commonalities between two arrays
newArray = intersection(object1.points, object2.points);
if (newArray.size >= 1)
{
return true;
}
}

I don't know what data the Alice development team has access to, but hopefully this might help. :)

reuben2011 02-20-2011 01:42 PM

^bump

zonedabone 02-20-2011 04:28 PM

There is a slim chance that to objects would share two points exactly. Shapes are composed of points that are positioned at arbitrary positions, and polygons are drawn between them. So there wouldn't be collisions except in very rare circumstances, and never in the places where collisions would be useful.

arty-fishL 02-21-2011 11:37 AM

Collision detection is one of the many unfinished features that the Alice 2 developers were going to include. In my search for hidden features in Alice I uncovered the hidden collision code within the java source that they never fully implemented.

Its also interesting to note the built in collision available when you add the event "let arrow keys move camera". If you move the camera into an object it will have built in collision detection.

reuben2011 02-21-2011 06:11 PM

I guess I didn't have a good understanding of how 3d objects are rendered in Alice. I assumed that objects are just a continuity of points, as opposed to discrete points connected with lines to form triangles. I totally forgot about the whole camera thing, so I am glad to know that the Alice development team has something going with the collision detection. However people, we must remember that the camera is just an arbitrary point in space. Going from point-to-object collision detection to object-to-object collision detection may or not be the thing that's holding the collision detection engine back.

Watsamax1 02-27-2011 04:09 PM

Couldnt they do polygonal collision in alice but built in?

David B 02-27-2011 04:51 PM

I have a question. What does this post mean?:

[QUOTE=reuben2011;31212]^bump[/QUOTE]

Dameria 02-27-2011 07:01 PM

[QUOTE=David B;31440]I have a question. What does this post mean?:[/QUOTE]

Its what people post when they want their thread to be viewed again. Bumping a thread just brings it back up to the top of the "New Posts" section so that it is more likely that people will read it.

reaper1395 05-12-2011 02:47 PM

doesn't always work though :D

GameKid 11-14-2011 04:51 PM

That is [I]brilliant[/I], but I'm afraid that will require a point for each single polygon.
Otherwise, it would be the exact same thing to use as "[Object] Distance to [Object]".


All times are GMT -5. The time now is 09:43 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.