A new version of ArkaPygame that changes name to PyBreakNoid, fusion of Pygame / Python Arkanoid and Breakout.
New Feature:
- Big screen
- new sounds
- gun
Changes in the code
I put the display surface as the main surface
# The main surface where the display surface is blitted display = pygame.display.set_mode((850, 850)) # A second surface where the sprite are blitted screen = pygame.Surface((500, 500))
So, all the sprites are blitted on the small surface screen and then it is blitted scaled in display
display.blit(pygame.transform.scale(screen, (850, 850)), (0, 0))
Sound of gun
if event.type == pygame.MOUSEBUTTONDOWN: if bullet.canfire: print("fire") pygame.mixer.Sound.play(sounds["bang"]) bullet.x = bar.x + bar.w // 2 bullet.y = bar.y bullet.fire = 1 bullet.canfire = 0
The sound of the brick broken or hit is now different
pygame.mixer.Sound.play(sounds["brick"])
All the sounds are mp3 now.
Where is the code?
Find the code in the github repository of ArkaPyGame aka PyBreakNoid.
1.1 – Pong the father of Arkanoid
1.2 – Starting arkanoid… from pong
1.3 – Adding background
1.4 – Collision detection
1.5 – Bricks collisions
1.6 – Still on Collisions
1.7 – Fixed strange bouncing
1.8 – How to destroy the bricks
1.9 – More levels
2.1 – Infinite level generator
2.3 – Sounds and faster frame rate tecnique
2.5 – New nicer levels simmetric and in color and menus
2.6 – Keyboard control
2.7 – Mouse exclusive control
2.xxx – Tiny version
5.0 – Arkagame: 5 different versions
Github repository
https://github.com/formazione/arkapygame
Subscribe to the newsletter for updates
Tkinter templates
My youtube channel
Twitter: @pythonprogrammi - python_pygame