Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1461

Re: how do i put an image

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.alt.net!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Philipp" <philipp@THRWHITE.remove-dii-this>
Subject Re: how do i put an image
Message-ID <1176699647_1097@sicinfo3.epfl.ch> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <AeuUh.461369$Ju2.358887@newsfe16.lga>
References <AeuUh.461369$Ju2.358887@newsfe16.lga>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 55
Date Wed, 27 Apr 2011 15:33:27 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918407 96.60.20.240 (Wed, 27 Apr 2011 10:33:27 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:33:27 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1461

Show key headers only | View raw


  To: comp.lang.java.gui
Knute Johnson wrote:
> Philipp wrote:
>> Knute Johnson wrote:
>>> Andrew Thompson wrote:
>>>> Knute Johnson wrote:
>>>> .
>>>>> www.knutejohnson.com
>>>>
>>>> Hey, cool.  When did you get the domain name?
>>>>
>>>> BTW - love the sounds you put to 'Pong', they cracked me up.   :-)
>>>>
>>>
>>> I've had it for a while but I linked it up a couple of months ago.
>>>
>>> I told Jeff Higgins, my wife hates the sounds and leaves the room 
>>> whenever I play the game :-).
>>
>> I got a little bug while playing. When the ball hits an upper corner 
>> more or less exactly (depends on speed), it stays glued to the top 
>> line. This is because the following Y condition
>>
>>   // if ball is hitting top bounce off
>>   } else if (ballY <= 0) {
>>     veloY = -veloY;
>>     bink.play();
>>   }
>>
>> Should not be "else" to the X condition.
>>
>> If the ball crosses both conditions (X&Y) in the same step, the veloY 
>> will be added twice to ballY before the Y condition is evaluated and 
>> so the condition (ballY <= 0) will now be true forever (with the veloY 
>> changing sign at each frame).
>>
>> So take out this "else".
>>
>> :-)
>>
>> Phil
>>
>>
> 
> Fixed!  It still has a few other little bugs.  Feel free to recommend 
> fixes.
> 

Instead of using fillRect for the ball, you might as well use fillOval. 
It looks so much nicer :-)  (but maybe less Commodore-64 era)

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
  Re: how do i put an image "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: how do i put an image "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
      Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
        Re: how do i put an image "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
          Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
      Re: how do i put an image "Philipp" <philipp@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
        Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
          Re: how do i put an image "Philipp" <philipp@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
            Re: how do i put an image "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000

csiph-web