We check all the bubbles each frame to make sure they aren’t colliding with any other bubbles, too. We can also reverse the properties to make the bubble bounce off the side and top walls. We can change these properties at random to give the bubble a bit more of an uncertain direction. After the status property reaches zero, we stop the bubble moving horizontally and let it rise upwards using the driftx and drifty properties. We can check how far it has travelled with the status property of the new bubble. To start with, it will fly out horizontally in the direction Bub is facing. We detect the SPACE bar being pressed, create a new bubble, and add it to a list. The sleek, stylish design fits in to even the. Bubble Bobble is a mix of puzzle and action elements.
#Bubble bobble arcade Pc
To get Bub jumping, we use the on_ key_down() function and test to see if he’s on the ground, and if so, set the Bub Actor property ‘jump’ to 60, which will set off upward motion for 60 frames – at which point Bub will start falling back down as our gravity check takes over again. This Bubble Bobble themed 27-inch Bitcade upright arcade cabinet is the perfect addition to any gamers life. This game debuted in the arcade years ago, then popped up on the NES and PC formats. We cycle through three frames to make him walk along the platforms and then apply some gravity to him so that if he walks off the end, he’ll fall down to the next level. To move Bub around, we can detect the arrow keys in the update() function.
Our draw() function is quite simple, drawing our background, then the platforms, our bubbles, and finally Bub, our little dragon. Each of the platform blocks are Actors which we put into a list before we start the main program. We’ll keep it simple for this example and have a border of walls and three levels of platform that we can define with a simple nested loop. To start with, we’ll need a set of platforms for our little dragon to run around on. Bubble Bobble brought us a whopping 100 levels to explore.įor our Pygame Zero sample this month, we’ll concentrate on the game’s bubble mechanics and see how we can fire them, push them around, and pop them as they float around the level.