refalike.blogg.se

Free game bubble breaker
Free game bubble breaker









  1. #Free game bubble breaker code#
  2. #Free game bubble breaker plus#
  3. #Free game bubble breaker windows#

The MarkBubbles method is called recursively to mark the bubbles to be removed whereas the CheckIsGameOver is used to check whether the game has ended (no other neighboring bubbles bearing the same color) One subsequent tap by the user and they’re gone! Plus, we have a (pretty boring, actually, but it serves its purpose) explosion and an audible “boom” sound! If the user selects a bubble that is not marked, then we revert all the selected bubbles to the original color. In which we proceed in selecting the neighboring ones and the other mode is where the user has tapped on a bubble and the game has marked the ones to be removed. We have two modes at the game, while playing one is where the game is expecting the user to tap a bubble We also use each bubble’s name to help us recall in which row and column this bubble currently is positioned. If the beam hits a bubble, then we’ve selected it). If that’s the case, we use Raycasting (imagine your finger pointing a laser beam towards the game. On each Update, we get whether the user has tapped the screen. We keep track of the positions of all bubbles in a 2D array and we initialize each and every one using a random color, dynamically pulled from the ResourcesMaterials folder (yeah, this could have been done in an easier way but I just wanted to experiment with dynamically loading stuff without providing them as fields/parameters to the script). On the game screen, each bubble is a rigidbody (that’s Unity way of saying that each bubble obeys the laws of gravity).

#Free game bubble breaker plus#

Main screen contains some simple Unity GUI buttons in which we can navigate to game and high scores screens, plus a simple checkbox to activate/deactivate sounds (I got that feedback from the single beta tester – that’s me!). Check out some screenshots from the game running inside Unity Editor. Moreover, game tends to push the bubbles onto the right of the screen, so as not to have an empty column during the course of our game. On a second tap to one of the marked bubbles, they will disappear and the ones above these will fall due to gravity. Once the user taps on a bubble, the neighboring ones (vertically and horizontally) will be marked for removal. Purpose of the game is to remove all (or at least most of) the bubbles in the game by tapping. All screens have a script to dynamically change the background color. Then, there is the main game screen (we’re making a game after all!). First, we have the intro screen where you can select either to play the game or view the top 10 scores. Game implementation is pretty basic, it contains 3 screens. For debugging purposes, don’t forget to check the Visual Studio tools for Unity here.

#Free game bubble breaker code#

Game code was written in Visual Studio (check the free Community edition here). Conversion from XNA was not that straightforward (well, I expected that, to be honest) in the matter that only the search and compare algorithms managed to survive.

#Free game bubble breaker windows#

Why did I choose Unity? Well, one of the reasons is that it supports my favorite programming language C# plus games can be exported to my favorite platform, Windows Phone. Since I’ve recently started to get acquainted with the Unit圓D game engine, one of the first things that crossed my mind was to try and recreate it using Unity. About 4 years ago I had blogged about the creation of the classic Bubble Breaker game in XNA.











Free game bubble breaker