Breakout game : trying to change paddle width uploading different image , but failed
this is piece of my code in paddle class :
and this is where collision of special ball is detected on paddle and overloaded constructor is called , depending on ctr1/2 paddle is scaled along its width by calling overloaded constructor and loading a new image file
There is no compile time error but run time error the moment constructor is called and game freezes . Please help
paddle = new Paddle(1);
paddle = new Paddle(2);
Thanks in advance for your time
Re: Breakout game : trying to change paddle width uploading different image , but fai
- When you say you have a run-time error, are you causing an exception to be thrown?
- And if so, can you post the Exception stacktrace?
- Do you have any println debug statements to see what is happening when the game freezes?
- What are you using for your game loop? A Swing Timer perhaps?
- Is this a Swing GUI? AWT? Something else?
- Will the ball intersect immediately with the new Paddle object? If so, will this keep happening ad infinitum?