Alice Community  

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

Reply
 
Thread Tools Display Modes
Ooh.. you could help me.
Old
SammehDx
Guest
 
Status:
Posts: n/a
Red face Ooh.. you could help me. - 02-26-2010, 11:07 AM

Quote:
Originally Posted by tango217 View Post
just kidding, i just found out how lol
Could you please post how you did it? I am having serious issues with something similar and I would really appreciate any way you could help me.
   
Reply With Quote
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Smile 02-26-2010, 04:13 PM

Quote:
Originally Posted by SammehDx View Post
Could you please post how you did it? I am having serious issues with something similar and I would really appreciate any way you could help me.
I made world variable named ballDistanceBelowWall. Then i made in an event called "While the world is running do...." and in the "during" i put a method that says to "set the value of ballDistanceBelowWall to ball distance below wall" and since this value is constantly being calculated by the "while the world is running" event, i can then make another method saying, "if ballDistanceBelowWall <= 0 (or whatever number works), then do ...." which in my case would be running the angular launch equation after the ball hits the wall. i hope this isnt too confusing :/. but im releasing my pong game rather soon that has all this in there so you could look at that when it comes out.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 02-26-2010, 08:21 PM

I can't wait to see it! Please upload it soon!


'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
SammehDx
Guest
 
Status:
Posts: n/a
Smile 02-26-2010, 09:04 PM

Quote:
Originally Posted by tango217 View Post
I made world variable named ballDistanceBelowWall. Then i made in an event called "While the world is running do...." and in the "during" i put a method that says to "set the value of ballDistanceBelowWall to ball distance below wall" and since this value is constantly being calculated by the "while the world is running" event, i can then make another method saying, "if ballDistanceBelowWall <= 0 (or whatever number works), then do ...." which in my case would be running the angular launch equation after the ball hits the wall. i hope this isnt too confusing :/. but im releasing my pong game rather soon that has all this in there so you could look at that when it comes out.
Oh. Alright. I'll give that a try... I hope it works.. I am getting rather desperate. lol Thanks a lot.
   
Reply With Quote
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Default 02-26-2010, 09:20 PM

Quote:
Originally Posted by SammehDx View Post
Oh. Alright. I'll give that a try... I hope it works.. I am getting rather desperate. lol Thanks a lot.
Your very welcome, let me know if there is anything else i can do to help.
   
Reply With Quote
Finally Finished!!
Old
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Talking Finally Finished!! - 02-26-2010, 09:51 PM

I just finished the version 1.0 of my PONG game. I'm very happy with the overall result. I'll post it right here and you can also search for the game under my name or pongiliscious (thats the title) lol

**MAKE SURE YOU READ THE DESCRIPTION IN GAME AND HERE FIRST PLEASE**
If you want to see some of the advanced programming that went into making this game work, take a gander through the various world methods. There's some pretty intense codes goin' on in those. Also take a look at how many variables that the game required for the different distance measurements, speeds, angles, and other values that get tracked. It's these conditions, variables, and advanced methods that cause the game to lag slightly at times unfortunately although IMO I don't think this detracts from the game's fun. I mention the bugs in the game notes.

A couple cool things about the game is that if your paddle is moving downward and if the ball is moving downward as well and they make contact, then the ball will increase speed and steepen its bounce angle. And the other way around too if the paddle and the ball are moving in the opposite direction. This makes the game much more realistic.

I hope everyone enjoys my game! And if you come across any bugs that aren't already mentioned or want to know how I made certain things work please let me know. Thanks!!
Attached Files
File Type: a2w PONGILISCIOUS.a2w (701.4 KB, 15 views)
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 02-26-2010, 10:04 PM

Awesome! I tried it and it was great! I did notice the ball getting stuck, though. I'll see if I can try to fix it. I'll post if I do.


'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
tango217
Member
 
tango217's Avatar
 
Status: Offline
Posts: 48
Join Date: Feb 2010
Default 02-26-2010, 10:25 PM

Thanks! Ya it's tough to stop that, I think it's just cause it lags. If i could convert this to java idt it would lag as much.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-26-2010, 10:43 PM

Nice! I like how you got the turning for the ball right. I remember I tried to make a pong game before but I got stuck with the part in turning the ball to match the angle you hit it at.

Do try to fix that "sponge" glitch though, and also if you hit the ball through the bottom of a paddle, it "sponges" through the paddle and then either goes back into the field or goes out of bounds randomly.


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-26-2010, 10:57 PM

ya i did realize that. well this is only version and ill keep working to eliminate those glitches in the future!!
   
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.