Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1461
| From | "Philipp" <philipp@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: how do i put an image |
| Message-ID | <1176699647_1097@sicinfo3.epfl.ch> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <AeuUh.461369$Ju2.358887@newsfe16.lga> |
| Date | 2011-04-27 15:33 +0000 |
| Organization | TDS.net |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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