Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How do I use the "___ is within ____ meters" function for object boundaries?
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Question How do I use the "___ is within ____ meters" function for object boundaries? - 02-24-2010, 05:23 PM

Hi,
Im trying to find a function similar to "____ is within ____ meters" but instead of the distance being measured from the center origin of the object, I want the distance to be measured from the objects physical boundaries. Like in an if/else statement: "If [ball] is within [.5] meters to the left of square, do ____". maybe not that exact wording but something that will give me that result. I tried doing the function "____'s distance to the left of ____" but that didn't seem to work for some reason :/. I'm currently working on a 2 player 3d "pong" program that I think is quite close to the original. I just need to work this little issue out and it will be almost complete.
   
Reply With Quote
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Smile 02-24-2010, 05:55 PM

just kidding, i just found out how lol
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-24-2010, 05:59 PM

When you are done could you post it to the forums? I would like to play 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
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Default 02-24-2010, 09:50 PM

I will post it as soon as I'm finished. Which should be rather soon. Just fine tuning some things and adding some spice to it.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-25-2010, 07:29 AM

Quote:
Originally Posted by tango217 View Post
just kidding, i just found out how lol

Great


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Sounds good
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default Sounds good - 02-25-2010, 02:59 PM

Ok, cool that sounds fun. Oh, and thanks for posting this because it reminded me that my collision detection engine only works wth the camera.
   
Reply With Quote
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Cool 02-25-2010, 04:24 PM

I just finished the "frame" of the pong game. The basics off the game are there, but at the moment i'm fine tuning it. For example if the paddle is moving downwards, and if the ball is moving downwards and they collide, the angle steepens and the ball speed increases. Stuff like that. should be really cool.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-25-2010, 04:30 PM

Also, if you haven't already, it would be good if there was a stopper on how far up and down you can go with the paddle so that you do not go off the screen.


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
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-25-2010, 04:37 PM

Ive never tried that, i dont even know if I know how to do that


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Default 02-25-2010, 09:07 PM

O of course i have stops on the paddles. I dont mean to sound cocky there it's just that pong isnt pong without the paddle stopping. If you guys like i can post the basic version up as an appetizer lol. its got some bugs in it and it gets a little tedious but it still works for 2 player.
   
Reply With Quote
Reply

Tags
boundaries., distance, game, pong, tango217

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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.