This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Math and Science => Technology & Calculator Open Topic
Author Message
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 09:09:55 am    Post subject:

There's not really a good way to explain this, except its a pong variation.

Try it, and see if you can figure out whats going on Razz had my physics teacher entertained for a good 15 minutes

the controls are W+S, and Up+Down, and its 2 player only at this point.


Download Here
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jan 2008 10:35:28 am    Post subject:

Looks like an interesting idea, except the controls froze about 15 seconds in.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 10:54:34 am    Post subject:

DarkerLine wrote:
Looks like an interesting idea, except the controls froze about 15 seconds in.

hmmm Neutral what platform was this on? I've heard one other report of people having trouble with the controls, but its worked fine on the XP and OS X computers I've tested it on, but java occasionally seems to have trouble with key input and window switching, but its not consistent between OSes.

here are the relevant pieces of the source in case anyone wants to take a look.



Code:
private boolean w, s, up, down;


Code:
w = s = up = down = false;


Code:
parent.addKeyListener(this);


Code:
ActionListener repainter = new ActionListener() {
     public void actionPerformed(ActionEvent evt) {
    if(s && angle1 > - Math.PI / 2) angle1 = (angle1 - (Math.PI / 45.0));
    if(w && angle1 < Math.PI / 2) angle1 = (angle1 + (Math.PI / 45.0)) % (Math.PI * 2.0);
    if(down && angle2 < 3 * Math.PI * 2.0) angle2 = (angle2 + (Math.PI / 45.0)) % (Math.PI * 2.0);
    if(up && angle2 > Math.PI / 2) angle2 = (angle2 - (Math.PI / 45.0)) % (Math.PI * 2.0);
    
    update(thecanvas.getGraphics());
     }
  };
  Timer repainttimer = new Timer(1, repainter);
  repainttimer.start();



Code:
public void keyPressed(KeyEvent e){
  switch(e.getKeyCode()){
     case KeyEvent.VK_S:
    s = true; break;
     case KeyEvent.VK_W:
    w = true; break;
     case KeyEvent.VK_UP:
    up = true; break;
     case KeyEvent.VK_DOWN:
    down = true; break;
  }
   }
   public void keyReleased(KeyEvent e){
  switch(e.getKeyCode()){
     case KeyEvent.VK_S:
    s = false; break;
     case KeyEvent.VK_W:
    w = false; break;
     case KeyEvent.VK_UP:
    up = false; break;
     case KeyEvent.VK_DOWN:
    down = false; break;
  }
   }
   public void keyTyped(KeyEvent e){}


Last edited by Guest on 08 Jan 2008 10:56:11 am; edited 1 time in total
Back to top
alexrudd
pm me if you read this


Bandwidth Hog


Joined: 06 Oct 2004
Posts: 2335

Posted: 08 Jan 2008 11:06:29 am    Post subject:

The keys didn't freeze for me, but the blue (right) player is able to go all the way around via the bottom.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jan 2008 11:15:02 am    Post subject:

That's presumably because the above code has "angle2 < 3 * Math.PI * 2.0" as opposed to "3 * Math.PI / 2".

I tried it again, and this time the controls didn't work entirely, but the ball somehow managed to start orbiting the center.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 11:46:26 am    Post subject:

DarkerLine wrote:
That's presumably because the above code has "angle2 < 3 * Math.PI * 2.0" as opposed to "3 * Math.PI / 2".

fixed and reuploaded
DarkerLine wrote:
I tried it again, and this time the controls didn't work entirely, but the ball somehow managed to start orbiting the center


nice, as in actual full rotations around? and how long did that keep up?
I'm completely baffled on the key input issue though. I'm gonna assume this under XP, but what version of java do you have installed? I want to see if I can recreate the situation somehow.
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 08 Jan 2008 01:00:47 pm    Post subject:

Cool, I like it :biggrin: . There's also a similar program for the 68000 calcs but without gravity.

Last edited by Guest on 08 Jan 2008 01:04:59 pm; edited 1 time in total
Back to top
CoBB


Active Member


Joined: 30 Jun 2003
Posts: 720

Posted: 08 Jan 2008 02:26:23 pm    Post subject:

And for the 83/+ as well, called Circle Pong.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 04:43:26 pm    Post subject:

elfprince13 wrote:



I just uploaded a new version with rotation on the ball as well, *I* dont think it looks as good, but I had a request for it, if anyone wants to take a peek and let me know what you think, that would be great.


new version is Here (if you want the old version the old link still works)


Last edited by Guest on 08 Jan 2008 04:43:43 pm; edited 1 time in total
Back to top
pugboy


Active Member


Joined: 11 Apr 2007
Posts: 544

Posted: 08 Jan 2008 06:03:38 pm    Post subject:

Controls still froze on Vista.
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 08 Jan 2008 06:23:47 pm    Post subject:

cool! I've seen a similar thing, but no gravity, and a different scoring system.

Last edited by Guest on 08 Jan 2008 06:24:54 pm; edited 1 time in total
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 06:31:58 pm    Post subject:

pugboy wrote:
Controls still froze on Vista.


how very odd, it worked fine on my friend's vista laptop today.

which version of vista, and what version of java?


I'm gonna guess my frame is not acquiring focus for some reason, although if its the active window it should....maybe the canvas is picking up focus instead.....I'll play around with it some when I get back to my development computer.




Liazon: thanks Cool


Last edited by Guest on 08 Jan 2008 06:32:32 pm; edited 1 time in total
Back to top
Ph34r_my_l33t_skillz


Advanced Member


Joined: 09 Oct 2007
Posts: 339

Posted: 08 Jan 2008 06:45:16 pm    Post subject:

I have a 1-player game a lot like this on my iPod, but the object is to break bricks.
Back to top
pugboy


Active Member


Joined: 11 Apr 2007
Posts: 544

Posted: 08 Jan 2008 07:41:23 pm    Post subject:

Breakout?

I have the latest Java from their website, and 32bit Vista Ultimate.
Back to top
Ph34r_my_l33t_skillz


Advanced Member


Joined: 09 Oct 2007
Posts: 339

Posted: 08 Jan 2008 09:23:25 pm    Post subject:

It's like breakout, but a little different. It's called Vortex.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 08 Jan 2008 09:33:32 pm    Post subject:

alright new version uploaded, I've consolidated back down to one version, so original link.

I'm planning on adding a game startup window with some options, and hopefully an AI player.



will some of the people who were having key input problems test this now and let me know if it solved the problem?


Last edited by Guest on 08 Jan 2008 09:34:32 pm; edited 1 time in total
Back to top
CoBB


Active Member


Joined: 30 Jun 2003
Posts: 720

Posted: 09 Jan 2008 02:51:00 am    Post subject:

The movement of the paddles is way too fast for me (it’s very difficult to control), the ball is much slower in comparison.
Back to top
elfprince13
Retired


Super Elite (Last Title)


Joined: 11 Apr 2005
Posts: 3500

Posted: 09 Jan 2008 08:28:33 am    Post subject:

CoBB wrote:
The movement of the paddles is way too fast for me (it’s very difficult to control), the ball is much slower in comparison.
[post="118456"]<{POST_SNAPBACK}>[/post]



should the ball be allowed to move faster, or should the paddles move slower?
Back to top
bananaman
Indestructible


Calc Guru


Joined: 12 Sep 2005
Posts: 1124

Posted: 09 Jan 2008 08:34:57 am    Post subject:

I noticed the same thing. I think the paddles should move slightly slower. It is hard to hit the ball sometimes b/c the paddle will move right past the ball. A different fix could be to make the paddles a tiny bit wider.
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 09 Jan 2008 04:48:17 pm    Post subject:

The S button doesn't work on Mac OS X 10.4.11 with the latest version of Java. It would be nice if the paddles were wider.

Last edited by Guest on 09 Jan 2008 04:49:43 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement