Alice Community  

Go Back   Alice Community > Alice 2 > Suggestion Box

Reply
 
Thread Tools Display Modes
Collision Detection
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default Collision Detection - 02-18-2011, 04:09 AM

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.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 02-20-2011, 01:42 PM

^bump
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 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.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Arrow 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.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬

Last edited by arty-fishL; 02-21-2011 at 11:44 AM.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 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.
   
Reply With Quote
Old
Watsamax1
Senior Member
 
Watsamax1's Avatar
 
Status: Offline
Posts: 155
Join Date: Aug 2009
Default 02-27-2011, 04:09 PM

Couldnt they do polygonal collision in alice but built in?


___________________________________________________

Watsamax Industries
Games Produced for Watsamax Industries Inc. 2010
Watsamax Industries: New York
Watsamax@gmail.com
http://www.facebook.com/profile.php?id=100001253371874#!/profile.php?id=100001253371874&v=wall
http://www.youtube.com/user/Watsamax
___________________________________________________
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 02-27-2011, 04:51 PM

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

Quote:
Originally Posted by reuben2011 View Post
^bump
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 02-27-2011, 07:01 PM

Quote:
Originally Posted by David B View Post
I have a question. What does this post mean?:
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.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
reaper1395
Senior Member
 
reaper1395's Avatar
 
Status: Offline
Posts: 53
Join Date: Nov 2010
Default 05-12-2011, 02:47 PM

doesn't always work though


XBL gt: R3APER 359
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 11-14-2011, 04:51 PM

That is brilliant, 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]".


[COLOR=e4eaf2]Your text here[/COLOR]
Come on, you know you want to try it.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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