Python Forum
[PyGame] arkanoid / breakout clone
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] arkanoid / breakout clone
#1
Hello,
I'm trying to code an arkanoid / breakout clone.
I have to check if the ball collides with the paddle or with one of the bricks (Later I want to use spritecollide for this).

But now I've got an error message for what I need some help.

This is the error message:

Traceback (most recent call last):
File "D:/Daten/Breakout-neu/main.py", line 89, in <module>
main()
File "D:/Daten/Breakout-neu/main.py", line 23, in main
paddlegroup.add(paddle)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 361, in add
sprite.add_internal(self)
File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pygame\sprite.py", line 163, in add_internal
self.__g[group] = 0
AttributeError: 'Paddle' object has no attribute '_Sprite__g'

Please have a look on my code...
(it is attached as text files because I didn't get the code snippet working...)
And please be so kind and let me know what I'm doing wrong...

Greetings, flash77

Attached Files

.txt   ball.txt (Size: 1.41 KB / Downloads: 204)
.txt   brick.txt (Size: 717 bytes / Downloads: 230)
.txt   main.txt (Size: 2.98 KB / Downloads: 215)
.txt   paddle.txt (Size: 506 bytes / Downloads: 201)
Reply


Messages In This Thread
arkanoid / breakout clone - by flash77 - Feb-03-2022, 06:39 PM
RE: arkanoid / breakout clone - by BashBedlam - Feb-04-2022, 01:41 AM
RE: arkanoid / breakout clone - by flash77 - Feb-04-2022, 05:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  breakout clone flash77 32 9,180 Mar-07-2022, 08:12 PM
Last Post: deanhystad
  breakout clone pygame flash77 2 1,904 Feb-06-2022, 06:36 PM
Last Post: flash77

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020