├── .buildozer ├── android │ └── app │ │ ├── UI.kv │ │ ├── main.py │ │ ├── main.pyo │ │ ├── sitecustomize.py │ │ └── sitecustomize.pyo └── state.db ├── README.md ├── UI.kv ├── bin ├── ColorSmash-1.1.6-debug.apk ├── ColorSmash-1.1.7-debug.apk ├── ColorSmash-1.1.7-release-signed.apk ├── ColorSmash-1.1.7-release-unsigned.apk ├── TapGame-1.0.1-debug.apk ├── TapGame-1.0.2-debug.apk ├── TapGame-1.0.3-debug.apk ├── TapGame-1.0.4-debug.apk ├── TapGame-1.0.5-debug.apk ├── TapGame-1.0.6-debug.apk ├── TapGame-1.0.7-debug.apk ├── TapGame-1.0.8-debug.apk ├── TapGame-1.0.9-debug.apk ├── TapGame-1.1.0-debug.apk ├── TapGame-1.1.1-debug.apk ├── TapGame-1.1.2-debug.apk ├── TapGame-1.1.3-debug.apk ├── TapGame-1.1.4-debug.apk ├── TapGame-1.1.5-debug.apk └── TapGame-1.1.6-debug.apk ├── buildozer.spec ├── buildozer.spec~ ├── data ├── data.json ├── data.json~ ├── sound.json └── vibrate.json ├── img ├── app_icon.png ├── background.png └── presplash.png ├── main.py ├── screenshots ├── End.png ├── Game.png └── Menu.png └── snd └── click.wav /.buildozer/android/app/UI.kv: -------------------------------------------------------------------------------- 1 | : 2 | 3 | canvas: 4 | Color: 5 | rgba: [1, 1, 1, 1] 6 | Rectangle: 7 | pos: self.pos 8 | size: self.size 9 | 10 | 11 | BoxLayout: 12 | orientation: 'vertical' 13 | 14 | BoxLayout: 15 | orientation: 'vertical' 16 | 17 | Label: 18 | text: 'Color Smash' 19 | font_size: '60sp' 20 | color: [0,0,0,1] 21 | bold: True 22 | 23 | Label: 24 | id: highScoreMenuLabel 25 | text: root.high_score_menu_label_text 26 | font_size: '35sp' 27 | color: [0,0,0,1] 28 | bold: True 29 | 30 | BoxLayout: 31 | orientation: 'vertical' 32 | 33 | Label: 34 | text: '' 35 | 36 | BoxLayout: 37 | orientation: 'horizontal' 38 | 39 | Label: 40 | text: '' 41 | size_hint: (.1,1) 42 | 43 | Button: 44 | id: startGameButton 45 | text: 'Start Game' 46 | font_size: '30sp' 47 | background_color: [0,0,0,1] 48 | on_release: root.call_start() 49 | 50 | Label: 51 | text: '' 52 | size_hint: (.1,1) 53 | 54 | Label: 55 | text: '' 56 | 57 | BoxLayout: 58 | orientation: 'horizontal' 59 | 60 | Label: 61 | text: '' 62 | size_hint: (.1,1) 63 | 64 | Button: 65 | id: settingsButton 66 | text: 'Settings' 67 | font_size: '30sp' 68 | background_color: [0,0,0,1] 69 | on_release: root.change_to_settings() 70 | 71 | Label: 72 | text: '' 73 | size_hint: (.1,1) 74 | 75 | Label: 76 | text: '' 77 | 78 | 79 | 80 | : 81 | 82 | canvas: 83 | Color: 84 | rgba: [1, 1, 1, 1] 85 | Rectangle: 86 | pos: self.pos 87 | size: self.size 88 | 89 | 90 | BoxLayout: 91 | orientation: 'vertical' 92 | 93 | BoxLayout: 94 | orientation: 'horizontal' 95 | size_hint: 1,.1 96 | 97 | Label: 98 | id: scoreLabel 99 | font_size: '23sp' 100 | color: [0,0,0,1] 101 | bold: True 102 | 103 | Label: 104 | id: timeLabel 105 | text: 'Time: 10' 106 | font_size: '23sp' 107 | color: [0,0,0,1] 108 | bold: True 109 | 110 | 111 | GridLayout: 112 | id: buttonsGrid 113 | rows:3 114 | spacing: [3,3] 115 | 116 | Button: 117 | id: button1 118 | on_press: root.start_add_score(1) 119 | disabled: True 120 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 121 | 122 | Button: 123 | id: button2 124 | on_press: root.start_add_score(2) 125 | disabled: True 126 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 127 | 128 | Button: 129 | id: button3 130 | on_press: root.start_add_score(3) 131 | disabled: True 132 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 133 | 134 | Button: 135 | id: button4 136 | on_press: root.start_add_score(4) 137 | disabled: True 138 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 139 | 140 | Button: 141 | id: button5 142 | on_press: root.start_add_score(5) 143 | disabled: True 144 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 145 | 146 | Button: 147 | id: button6 148 | on_press: root.start_add_score(6) 149 | disabled: True 150 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 151 | 152 | Button: 153 | id: button7 154 | on_press: root.start_add_score(7) 155 | disabled: True 156 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 157 | 158 | Button: 159 | id: button8 160 | on_press: root.start_add_score(8) 161 | disabled: True 162 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 163 | 164 | Button: 165 | id: button9 166 | on_press: root.start_add_score(9) 167 | disabled: True 168 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 169 | 170 | 171 | BoxLayout: 172 | size_hint: 1,.2 173 | 174 | Button: 175 | id: startButton 176 | text: 'Start' 177 | font_size: '35sp' 178 | background_color: [0,0,0,1] 179 | on_press: root.start() 180 | 181 | 182 | 183 | : 184 | 185 | canvas: 186 | Color: 187 | rgba: [1, 1, 1, 1] 188 | Rectangle: 189 | pos: self.pos 190 | size: self.size 191 | 192 | BoxLayout: 193 | orientation: 'vertical' 194 | 195 | BoxLayout: 196 | orientation: 'horizontal' 197 | 198 | Label: 199 | text: 'Sound' 200 | font_size: '23sp' 201 | color: [0,0,0,1] 202 | 203 | Switch: 204 | id: soundSwitch 205 | active: root.check_sound() 206 | on_active: root.change_sound(self.active) 207 | 208 | BoxLayout: 209 | orientation: 'horizontal' 210 | 211 | Label: 212 | text: 'Vibrate' 213 | font_size: '23sp' 214 | color: [0,0,0,1] 215 | 216 | Switch: 217 | id: vibrateSwitch 218 | active: root.check_vibrate() 219 | on_active: root.change_vibrate(self.active) 220 | 221 | Button: 222 | id: backToMenuButton 223 | text: 'Back' 224 | font_size: '35sp' 225 | background_color: [0,0,0,1] 226 | on_release: root.back_to_menu() 227 | -------------------------------------------------------------------------------- /.buildozer/android/app/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.lang import Builder 3 | from kivy.uix.screenmanager import ScreenManager, Screen, WipeTransition 4 | from kivy.uix.popup import Popup 5 | from kivy.uix.button import Button 6 | from kivy.uix.boxlayout import BoxLayout 7 | from kivy.uix.label import Label 8 | from kivy.clock import Clock 9 | from kivy.storage.jsonstore import JsonStore 10 | from kivy.core.audio import SoundLoader 11 | from kivy.uix.modalview import ModalView 12 | 13 | from kivy.utils import platform 14 | 15 | from random import randint 16 | from jnius import autoclass 17 | 18 | from plyer import vibrator 19 | 20 | store = JsonStore('data/data.json') 21 | score = 0 22 | countdown = 0 23 | popup = Popup() 24 | blue = [79 / 255.0, 110 / 255.0, 238 / 255.0, 1] 25 | green = [19 / 255.0, 190 / 255.0, 19 / 255.0, 1] 26 | timePopup = Popup() 27 | sound = SoundLoader.load('snd/click.wav') 28 | 29 | Builder.load_file('UI.kv') 30 | 31 | 32 | class Menu(Screen): 33 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 34 | 35 | def call_start(self): 36 | 37 | Clock.schedule_once(self.start_game, 0) 38 | 39 | def start_game(self, dt): 40 | 41 | sm.current = 'game' 42 | Clock.schedule_interval(self.set_high_score, 1) 43 | 44 | def back_to_menu(self): 45 | 46 | sm.current = 'menu' 47 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 48 | self.ids.highScoreMenuLabel.text = high_score_menu_label_text 49 | 50 | def set_high_score(self, dt): 51 | 52 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 53 | self.ids.highScoreMenuLabel.text = high_score_menu_label_text 54 | 55 | def change_to_settings(self): 56 | 57 | sm.current = 'settings' 58 | 59 | 60 | class PressButton(Screen): 61 | def __init__(self, **kwargs): 62 | 63 | super(PressButton, self).__init__(**kwargs) 64 | self.finalScore = '' 65 | 66 | def show_ads(*args): 67 | 68 | if platform == 'android': 69 | global AdBuddiz 70 | AdBuddiz.showAd(PythonActivity.mActivity) 71 | else: 72 | print 'Not on Android' 73 | 74 | def buttons_disabled(self): 75 | 76 | self.ids.button1.disabled = True 77 | self.ids.button2.disabled = True 78 | self.ids.button3.disabled = True 79 | self.ids.button4.disabled = True 80 | self.ids.button5.disabled = True 81 | self.ids.button6.disabled = True 82 | self.ids.button7.disabled = True 83 | self.ids.button8.disabled = True 84 | self.ids.button9.disabled = True 85 | 86 | def buttons_enabled(self): 87 | 88 | self.ids.button1.disabled = False 89 | self.ids.button2.disabled = False 90 | self.ids.button3.disabled = False 91 | self.ids.button4.disabled = False 92 | self.ids.button5.disabled = False 93 | self.ids.button6.disabled = False 94 | self.ids.button7.disabled = False 95 | self.ids.button8.disabled = False 96 | self.ids.button9.disabled = False 97 | 98 | def buttons_reset_color(self): 99 | 100 | global blue 101 | 102 | self.ids.button1.background_color = blue 103 | self.ids.button2.background_color = blue 104 | self.ids.button3.background_color = blue 105 | self.ids.button4.background_color = blue 106 | self.ids.button5.background_color = blue 107 | self.ids.button6.background_color = blue 108 | self.ids.button7.background_color = blue 109 | self.ids.button8.background_color = blue 110 | self.ids.button9.background_color = blue 111 | 112 | def buttons_reset_specific_color(self, button): 113 | 114 | global blue 115 | 116 | if button == 1: 117 | self.ids.button1.background_color = blue 118 | if button == 2: 119 | self.ids.button2.background_color = blue 120 | if button == 3: 121 | self.ids.button3.background_color = blue 122 | if button == 4: 123 | self.ids.button4.background_color = blue 124 | if button == 5: 125 | self.ids.button5.background_color = blue 126 | if button == 6: 127 | self.ids.button6.background_color = blue 128 | if button == 7: 129 | self.ids.button7.background_color = blue 130 | if button == 8: 131 | self.ids.button8.background_color = blue 132 | if button == 9: 133 | self.ids.button9.background_color = blue 134 | 135 | def check_if_all_clicked(self): 136 | 137 | global blue 138 | total = 0 139 | 140 | if self.ids.button1.background_color == blue: 141 | total = total + 1 142 | if self.ids.button2.background_color == blue: 143 | total = total + 1 144 | if self.ids.button3.background_color == blue: 145 | total = total + 1 146 | if self.ids.button4.background_color == blue: 147 | total = total + 1 148 | if self.ids.button5.background_color == blue: 149 | total = total + 1 150 | if self.ids.button6.background_color == blue: 151 | total = total + 1 152 | if self.ids.button7.background_color == blue: 153 | total = total + 1 154 | if self.ids.button8.background_color == blue: 155 | total = total + 1 156 | if self.ids.button9.background_color == blue: 157 | total = total + 1 158 | 159 | if total == 9: 160 | total = 0 161 | return True 162 | 163 | def change_text(self): 164 | 165 | global green 166 | 167 | x = randint(1, 3) 168 | y = randint(4, 6) 169 | z = randint(7, 9) 170 | 171 | if x == 1: 172 | self.ids.button1.background_color = green 173 | elif x == 2: 174 | self.ids.button2.background_color = green 175 | elif x == 3: 176 | self.ids.button3.background_color = green 177 | 178 | if y == 4: 179 | self.ids.button4.background_color = green 180 | elif y == 5: 181 | self.ids.button5.background_color = green 182 | elif y == 6: 183 | self.ids.button6.background_color = green 184 | 185 | if z == 7: 186 | self.ids.button7.background_color = green 187 | elif z == 8: 188 | self.ids.button8.background_color = green 189 | elif z == 9: 190 | self.ids.button9.background_color = green 191 | 192 | def start_add_score(self, button): 193 | 194 | self.add_score(button) 195 | 196 | def call_vibrate(self): 197 | 198 | if JsonStore('data/vibrate.json').get('vibrateState')['activeOrNot'] == 'True': 199 | if platform == 'android': 200 | vibrator.vibrate(.06) 201 | else: 202 | print 'No vibrator' 203 | else: 204 | pass 205 | 206 | def add_score(self, button): 207 | 208 | global green 209 | global blue 210 | global score 211 | global sound 212 | 213 | if button == 1: 214 | if self.ids.button1.background_color == green: 215 | self.add_score_number() 216 | self.animate_after_touch() 217 | self.buttons_reset_specific_color(1) 218 | self.play_sound() 219 | else: 220 | self.minus_score_number() 221 | self.call_vibrate() 222 | elif button == 2: 223 | if self.ids.button2.background_color == green: 224 | self.add_score_number() 225 | self.animate_after_touch() 226 | self.buttons_reset_specific_color(2) 227 | self.play_sound() 228 | else: 229 | self.minus_score_number() 230 | self.call_vibrate() 231 | elif button == 3: 232 | if self.ids.button3.background_color == green: 233 | self.add_score_number() 234 | self.animate_after_touch() 235 | self.buttons_reset_specific_color(3) 236 | self.play_sound() 237 | else: 238 | self.minus_score_number() 239 | self.call_vibrate() 240 | elif button == 4: 241 | if self.ids.button4.background_color == green: 242 | self.add_score_number() 243 | self.animate_after_touch() 244 | self.buttons_reset_specific_color(4) 245 | self.play_sound() 246 | else: 247 | self.minus_score_number() 248 | self.call_vibrate() 249 | elif button == 5: 250 | if self.ids.button5.background_color == green: 251 | self.add_score_number() 252 | self.animate_after_touch() 253 | self.buttons_reset_specific_color(5) 254 | self.play_sound() 255 | else: 256 | self.minus_score_number() 257 | self.call_vibrate() 258 | elif button == 6: 259 | if self.ids.button6.background_color == green: 260 | self.add_score_number() 261 | self.animate_after_touch() 262 | self.buttons_reset_specific_color(6) 263 | self.play_sound() 264 | else: 265 | self.minus_score_number() 266 | self.call_vibrate() 267 | elif button == 7: 268 | if self.ids.button7.background_color == green: 269 | self.add_score_number() 270 | self.animate_after_touch() 271 | self.buttons_reset_specific_color(7) 272 | self.play_sound() 273 | else: 274 | self.minus_score_number() 275 | self.call_vibrate() 276 | elif button == 8: 277 | if self.ids.button8.background_color == green: 278 | self.add_score_number() 279 | self.animate_after_touch() 280 | self.buttons_reset_specific_color(8) 281 | self.play_sound() 282 | else: 283 | self.minus_score_number() 284 | self.call_vibrate() 285 | elif button == 9: 286 | if self.ids.button9.background_color == green: 287 | self.add_score_number() 288 | self.animate_after_touch() 289 | self.buttons_reset_specific_color(9) 290 | self.play_sound() 291 | else: 292 | self.minus_score_number() 293 | self.call_vibrate() 294 | 295 | self.ids.scoreLabel.text = 'Score: ' + str(score) 296 | self.change_after_three() 297 | 298 | def animate_after_touch(self): 299 | 300 | Clock.schedule_once(self.un_animate_after_touch, 0.1) 301 | 302 | def un_animate_after_touch(self, dt): 303 | 304 | self.ids.buttonsGrid.spacing = [3, 3] 305 | 306 | def play_sound(self): 307 | 308 | global sound 309 | 310 | if JsonStore('data/sound.json').get('soundState')['activeOrNot'] == 'True': 311 | sound.play() 312 | else: 313 | pass 314 | 315 | def change_after_three(self): 316 | 317 | global green 318 | global blue 319 | 320 | if self.check_if_all_clicked() == True: 321 | self.change_text() 322 | 323 | def add_score_number(self): 324 | 325 | global score 326 | score = score + 1 327 | 328 | def minus_score_number(self): 329 | 330 | global score 331 | score = score - 1 332 | 333 | def timer(self, dt): 334 | 335 | global countdown 336 | global timePopup 337 | 338 | countdown = countdown - 1 339 | self.ids.timeLabel.text = 'Time: ' + str(countdown) 340 | 341 | if countdown <= 0: 342 | Clock.unschedule(self.timer) 343 | timePopup = ModalView(auto_dismiss=False, background_color=[1, 0, 0, .7]) 344 | timePopup.add_widget(Label(text='Game Over', font_size='50sp', color=[0, 0, 0, 1])) 345 | timePopup.open() 346 | Clock.schedule_once(self.change_to_end, 1.5) 347 | 348 | def start(self): 349 | 350 | global countdown 351 | sm.current = 'game' 352 | 353 | self.ids.startButton.disabled = True 354 | self.buttons_enabled() 355 | self.buttons_reset_color() 356 | 357 | countdown = 10 358 | Clock.schedule_interval(self.timer, 1) 359 | 360 | self.change_text() 361 | 362 | def reset(self): 363 | 364 | global score 365 | score = 0 366 | self.ids.scoreLabel.text = 'Score: ' + str(score) 367 | self.ids.timeLabel.text = 'Time: 10' 368 | self.ids.startButton.disabled = False 369 | self.buttons_disabled() 370 | self.buttons_reset_color() 371 | 372 | def change_to_end(self, dt): 373 | 374 | global score 375 | global popup 376 | global timePopup 377 | 378 | timePopup.dismiss() 379 | self.finalScore = str(score) 380 | 381 | if JsonStore('data/data.json').get('userData')['highScore'] < score: 382 | JsonStore('data/data.json').put('userData', highScore=score) 383 | 384 | popup_content = BoxLayout(orientation='vertical', spacing=3) 385 | play_again_button = Button(text='Play Again', on_release=self.play_again, font_size='40sp', 386 | background_color=[0, 0, 0, 1]) 387 | back_to_menu_button = Button(text='Back To Menu', on_release=self.change_to_menu, font_size='40sp', 388 | background_color=[0, 0, 0, 1]) 389 | final_score_label = Label(text='Score: ' + self.finalScore, font_size='50sp', color=[0, 0, 0, 1]) 390 | high_score_label = Label(text='High Score: ' + str(JsonStore('data/data.json').get('userData', )['highScore']), 391 | font_size='50sp', color=[0, 0, 0, 1]) 392 | 393 | popup_content.add_widget(final_score_label) 394 | popup_content.add_widget(high_score_label) 395 | popup_content.add_widget(play_again_button) 396 | popup_content.add_widget(back_to_menu_button) 397 | 398 | popup = ModalView(auto_dismiss=False, background_color=[1, 0, 0, .7]) 399 | popup.add_widget(popup_content) 400 | popup.open() 401 | 402 | self.reset() 403 | 404 | def change_to_menu(self, dt): 405 | 406 | global popup 407 | Menu().back_to_menu() 408 | popup.dismiss() 409 | 410 | def play_again(self, dt): 411 | 412 | global popup 413 | popup.dismiss() 414 | 415 | 416 | class Settings(Screen): 417 | def back_to_menu(self): 418 | 419 | sm.current = 'menu' 420 | 421 | def check_sound(self): 422 | 423 | if JsonStore('data/sound.json').get('soundState')['activeOrNot'] == 'True': 424 | return True 425 | else: 426 | return False 427 | 428 | def change_sound(self, active): 429 | 430 | if active == True: 431 | JsonStore('data/sound.json').put('soundState', activeOrNot='True') 432 | else: 433 | JsonStore('data/sound.json').put('soundState', activeOrNot='False') 434 | 435 | def check_vibrate(self): 436 | 437 | if JsonStore('data/vibrate.json').get('vibrateState')['activeOrNot'] == 'True': 438 | return True 439 | else: 440 | return False 441 | 442 | def change_vibrate(self, active): 443 | 444 | if active == True: 445 | JsonStore('data/vibrate.json').put('vibrateState', activeOrNot='True') 446 | else: 447 | JsonStore('data/vibrate.json').put('vibrateState', activeOrNot='False') 448 | 449 | 450 | sm = ScreenManager(transition=WipeTransition()) 451 | sm.add_widget(Menu(name='menu')) 452 | sm.add_widget(PressButton(name='game')) 453 | sm.add_widget(Settings(name='settings')) 454 | 455 | 456 | class PressButtonApp(App): 457 | 458 | 459 | def on_pause(self): 460 | return True 461 | 462 | def on_resume(self): 463 | pass 464 | 465 | def build(self): 466 | return sm 467 | 468 | 469 | if __name__ == '__main__': 470 | PressButtonApp().run() 471 | -------------------------------------------------------------------------------- /.buildozer/android/app/main.pyo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/.buildozer/android/app/main.pyo -------------------------------------------------------------------------------- /.buildozer/android/app/sitecustomize.py: -------------------------------------------------------------------------------- 1 | from os.path import join, dirname 2 | import sys 3 | sys.path.append(join(dirname(__file__), '_applibs')) 4 | -------------------------------------------------------------------------------- /.buildozer/android/app/sitecustomize.pyo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/.buildozer/android/app/sitecustomize.pyo -------------------------------------------------------------------------------- /.buildozer/state.db: -------------------------------------------------------------------------------- 1 | {"android.requirements": ["kivy", "plyer", "pyjnius"], "android:available_permissions": ["ACCESS_CHECKIN_PROPERTIES", "ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION", "ACCESS_LOCATION_EXTRA_COMMANDS", "ACCESS_MOCK_LOCATION", "ACCESS_NETWORK_STATE", "ACCESS_SURFACE_FLINGER", "ACCESS_WIFI_STATE", "ACCOUNT_MANAGER", "ADD_SYSTEM_SERVICE", "ADD_VOICEMAIL", "AUTHENTICATE_ACCOUNTS", "BATTERY_STATS", "BIND_ACCESSIBILITY_SERVICE", "BIND_APPWIDGET", "BIND_DEVICE_ADMIN", "BIND_INPUT_METHOD", "BIND_NFC_SERVICE", "BIND_NOTIFICATION_LISTENER_SERVICE", "BIND_PRINT_SERVICE", "BIND_REMOTEVIEWS", "BIND_TEXT_SERVICE", "BIND_TV_INPUT", "BIND_VOICE_INTERACTION", "BIND_VPN_SERVICE", "BIND_WALLPAPER", "BLUETOOTH", "BLUETOOTH_ADMIN", "BLUETOOTH_PRIVILEGED", "BODY_SENSORS", "BRICK", "BROADCAST_PACKAGE_REMOVED", "BROADCAST_SMS", "BROADCAST_STICKY", "BROADCAST_WAP_PUSH", "CALL_PHONE", "CALL_PRIVILEGED", "CAMERA", "CAPTURE_AUDIO_OUTPUT", "CAPTURE_SECURE_VIDEO_OUTPUT", "CAPTURE_VIDEO_OUTPUT", "CHANGE_COMPONENT_ENABLED_STATE", "CHANGE_CONFIGURATION", "CHANGE_NETWORK_STATE", "CHANGE_WIFI_MULTICAST_STATE", "CHANGE_WIFI_STATE", "CLEAR_APP_CACHE", "CLEAR_APP_USER_DATA", "CONTROL_LOCATION_UPDATES", "DELETE_CACHE_FILES", "DELETE_PACKAGES", "DEVICE_POWER", "DIAGNOSTIC", "DISABLE_KEYGUARD", "DUMP", "EXPAND_STATUS_BAR", "FACTORY_TEST", "FLASHLIGHT", "FORCE_BACK", "FOTA_UPDATE", "GET_ACCOUNTS", "GET_PACKAGE_SIZE", "GET_TASKS", "GET_TOP_ACTIVITY_INFO", "GLOBAL_SEARCH", "HARDWARE_TEST", "INJECT_EVENTS", "INSTALL_LOCATION_PROVIDER", "INSTALL_PACKAGES", "INSTALL_SHORTCUT", "INTERNAL_SYSTEM_WINDOW", "INTERNET", "KILL_BACKGROUND_PROCESSES", "LOCATION_HARDWARE", "MANAGE_ACCOUNTS", "MANAGE_APP_TOKENS", "MANAGE_DOCUMENTS", "MASTER_CLEAR", "MEDIA_CONTENT_CONTROL", "MODIFY_AUDIO_SETTINGS", "MODIFY_PHONE_STATE", "MOUNT_FORMAT_FILESYSTEMS", "MOUNT_UNMOUNT_FILESYSTEMS", "NFC", "PERSISTENT_ACTIVITY", "PROCESS_OUTGOING_CALLS", "READ_CALENDAR", "READ_CALL_LOG", "READ_CONTACTS", "READ_EXTERNAL_STORAGE", "READ_FRAME_BUFFER", "READ_HISTORY_BOOKMARKS", "READ_INPUT_STATE", "READ_LOGS", "READ_OWNER_DATA", "READ_PHONE_STATE", "READ_PROFILE", "READ_SMS", "READ_SOCIAL_STREAM", "READ_SYNC_SETTINGS", "READ_SYNC_STATS", "READ_USER_DICTIONARY", "REBOOT", "RECEIVE_BOOT_COMPLETED", "RECEIVE_MMS", "RECEIVE_SMS", "RECEIVE_WAP_PUSH", "RECORD_AUDIO", "REORDER_TASKS", "RESTART_PACKAGES", "SEND_RESPOND_VIA_MESSAGE", "SEND_SMS", "SET_ACTIVITY_WATCHER", "SET_ALARM", "SET_ALWAYS_FINISH", "SET_ANIMATION_SCALE", "SET_DEBUG_APP", "SET_ORIENTATION", "SET_POINTER_SPEED", "SET_PREFERRED_APPLICATIONS", "SET_PROCESS_FOREGROUND", "SET_PROCESS_LIMIT", "SET_TIME", "SET_TIME_ZONE", "SET_WALLPAPER", "SET_WALLPAPER_HINTS", "SIGNAL_PERSISTENT_PROCESSES", "STATUS_BAR", "SUBSCRIBED_FEEDS_READ", "SUBSCRIBED_FEEDS_WRITE", "SYSTEM_ALERT_WINDOW", "TRANSMIT_IR", "UNINSTALL_SHORTCUT", "UPDATE_DEVICE_STATS", "USE_CREDENTIALS", "USE_SIP", "VIBRATE", "WAKE_LOCK", "WRITE_APN_SETTINGS", "WRITE_CALENDAR", "WRITE_CALL_LOG", "WRITE_CONTACTS", "WRITE_EXTERNAL_STORAGE", "WRITE_GSERVICES", "WRITE_HISTORY_BOOKMARKS", "WRITE_OWNER_DATA", "WRITE_PROFILE", "WRITE_SECURE_SETTINGS", "WRITE_SETTINGS", "WRITE_SMS", "WRITE_SOCIAL_STREAM", "WRITE_SYNC_SETTINGS", "WRITE_USER_DICTIONARY"], "android:sdk_installation": ["14", "8", "9c", "/home/paarthri/.buildozer/android/platform/android-sdk-21", "/home/paarthri/.buildozer/android/platform/android-ndk-r9c"], "cache.applibs": [], "cache.build_id": "43", "android:latestmode": "release", "android:latestapk": "ColorSmash-1.1.7-release-unsigned.apk", "android:available_permissions_sdk": "21", "cache.gardenlibs": ""} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Color_Smash 2 | 3 | This is a mobile game I am in the process of creating. It uses python with an open source gui library called Kivy(http://kivy.org/#home). 4 | 5 | The way you play is by hitting the green tiles while avoiding the blue ones. The green ones give you one point while the blue ones reduce one point. You have ten seconds to complete the task. 6 | 7 | The theme I used for this project was created by Federico Curzel. Here it the repository: https://github.com/Cuuuurzel/kivy-material-ui. 8 | I only used the default image, not the whole project. 9 | 10 | Here are some screenshots: 11 | 12 | ![Alt text](/screenshots/Menu.png?raw=true "Menu") 13 | 14 | ![Alt text](/screenshots/Game.png?raw=true "During Gameplay") 15 | 16 | ![Alt text](/screenshots/End.png?raw=true "After Game") 17 | -------------------------------------------------------------------------------- /UI.kv: -------------------------------------------------------------------------------- 1 | : 2 | 3 | canvas: 4 | Color: 5 | rgba: [1, 1, 1, 1] 6 | Rectangle: 7 | pos: self.pos 8 | size: self.size 9 | 10 | 11 | BoxLayout: 12 | orientation: 'vertical' 13 | 14 | BoxLayout: 15 | orientation: 'vertical' 16 | 17 | Label: 18 | text: 'Color Smash' 19 | font_size: '60sp' 20 | color: [0,0,0,1] 21 | bold: True 22 | 23 | Label: 24 | id: highScoreMenuLabel 25 | text: root.high_score_menu_label_text 26 | font_size: '35sp' 27 | color: [0,0,0,1] 28 | bold: True 29 | 30 | BoxLayout: 31 | orientation: 'vertical' 32 | 33 | Label: 34 | text: '' 35 | 36 | BoxLayout: 37 | orientation: 'horizontal' 38 | 39 | Label: 40 | text: '' 41 | size_hint: (.1,1) 42 | 43 | Button: 44 | id: startGameButton 45 | text: 'Start Game' 46 | font_size: '30sp' 47 | background_color: [0,0,0,1] 48 | on_release: root.call_start() 49 | 50 | Label: 51 | text: '' 52 | size_hint: (.1,1) 53 | 54 | Label: 55 | text: '' 56 | 57 | BoxLayout: 58 | orientation: 'horizontal' 59 | 60 | Label: 61 | text: '' 62 | size_hint: (.1,1) 63 | 64 | Button: 65 | id: settingsButton 66 | text: 'Settings' 67 | font_size: '30sp' 68 | background_color: [0,0,0,1] 69 | on_release: root.change_to_settings() 70 | 71 | Label: 72 | text: '' 73 | size_hint: (.1,1) 74 | 75 | Label: 76 | text: '' 77 | 78 | 79 | 80 | : 81 | 82 | canvas: 83 | Color: 84 | rgba: [1, 1, 1, 1] 85 | Rectangle: 86 | pos: self.pos 87 | size: self.size 88 | 89 | 90 | BoxLayout: 91 | orientation: 'vertical' 92 | 93 | BoxLayout: 94 | orientation: 'horizontal' 95 | size_hint: 1,.1 96 | 97 | Label: 98 | id: scoreLabel 99 | font_size: '23sp' 100 | color: [0,0,0,1] 101 | bold: True 102 | 103 | Label: 104 | id: timeLabel 105 | text: 'Time: 10' 106 | font_size: '23sp' 107 | color: [0,0,0,1] 108 | bold: True 109 | 110 | 111 | GridLayout: 112 | id: buttonsGrid 113 | rows:3 114 | spacing: [3,3] 115 | 116 | Button: 117 | id: button1 118 | on_press: root.start_add_score(1) 119 | disabled: True 120 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 121 | 122 | Button: 123 | id: button2 124 | on_press: root.start_add_score(2) 125 | disabled: True 126 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 127 | 128 | Button: 129 | id: button3 130 | on_press: root.start_add_score(3) 131 | disabled: True 132 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 133 | 134 | Button: 135 | id: button4 136 | on_press: root.start_add_score(4) 137 | disabled: True 138 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 139 | 140 | Button: 141 | id: button5 142 | on_press: root.start_add_score(5) 143 | disabled: True 144 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 145 | 146 | Button: 147 | id: button6 148 | on_press: root.start_add_score(6) 149 | disabled: True 150 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 151 | 152 | Button: 153 | id: button7 154 | on_press: root.start_add_score(7) 155 | disabled: True 156 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 157 | 158 | Button: 159 | id: button8 160 | on_press: root.start_add_score(8) 161 | disabled: True 162 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 163 | 164 | Button: 165 | id: button9 166 | on_press: root.start_add_score(9) 167 | disabled: True 168 | background_color: [79/255.0, 110/255.0, 238/255.0, 1] 169 | 170 | 171 | BoxLayout: 172 | size_hint: 1,.2 173 | 174 | Button: 175 | id: startButton 176 | text: 'Start' 177 | font_size: '35sp' 178 | background_color: [0,0,0,1] 179 | on_press: root.start() 180 | 181 | 182 | 183 | : 184 | 185 | canvas: 186 | Color: 187 | rgba: [1, 1, 1, 1] 188 | Rectangle: 189 | pos: self.pos 190 | size: self.size 191 | 192 | BoxLayout: 193 | orientation: 'vertical' 194 | 195 | BoxLayout: 196 | orientation: 'horizontal' 197 | 198 | Label: 199 | text: 'Sound' 200 | font_size: '23sp' 201 | color: [0,0,0,1] 202 | 203 | Switch: 204 | id: soundSwitch 205 | active: root.check_sound() 206 | on_active: root.change_sound(self.active) 207 | 208 | BoxLayout: 209 | orientation: 'horizontal' 210 | 211 | Label: 212 | text: 'Vibrate' 213 | font_size: '23sp' 214 | color: [0,0,0,1] 215 | 216 | Switch: 217 | id: vibrateSwitch 218 | active: root.check_vibrate() 219 | on_active: root.change_vibrate(self.active) 220 | 221 | Button: 222 | id: backToMenuButton 223 | text: 'Back' 224 | font_size: '35sp' 225 | background_color: [0,0,0,1] 226 | on_release: root.back_to_menu() 227 | -------------------------------------------------------------------------------- /bin/ColorSmash-1.1.6-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/ColorSmash-1.1.6-debug.apk -------------------------------------------------------------------------------- /bin/ColorSmash-1.1.7-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/ColorSmash-1.1.7-debug.apk -------------------------------------------------------------------------------- /bin/ColorSmash-1.1.7-release-signed.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/ColorSmash-1.1.7-release-signed.apk -------------------------------------------------------------------------------- /bin/ColorSmash-1.1.7-release-unsigned.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/ColorSmash-1.1.7-release-unsigned.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.1-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.1-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.2-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.2-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.3-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.3-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.4-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.4-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.5-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.5-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.6-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.6-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.7-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.7-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.8-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.8-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.0.9-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.0.9-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.0-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.0-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.1-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.1-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.2-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.2-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.3-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.3-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.4-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.4-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.5-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.5-debug.apk -------------------------------------------------------------------------------- /bin/TapGame-1.1.6-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/bin/TapGame-1.1.6-debug.apk -------------------------------------------------------------------------------- /buildozer.spec: -------------------------------------------------------------------------------- 1 | [app] 2 | 3 | # (str) Title of your application 4 | title = Color Smash 5 | 6 | # (str) Package name 7 | package.name = colorsmash 8 | 9 | # (str) Package domain (needed for android/ios packaging) 10 | package.domain = org.paarthri 11 | 12 | # (str) Source code where the main.py live 13 | source.dir = . 14 | 15 | # (list) Source files to include (let empty to include all the files) 16 | source.include_exts = py,png,jpg,kv,atlas,json,mp3,wav 17 | 18 | # (list) Source files to exclude (let empty to not exclude anything) 19 | #source.exclude_exts = spec 20 | 21 | # (list) List of directory to exclude (let empty to not exclude anything) 22 | #source.exclude_dirs = tests, bin 23 | 24 | # (list) List of exclusions using pattern matching 25 | #source.exclude_patterns = license,images/*/*.jpg 26 | 27 | # (str) Application versioning (method 1) 28 | #version.regex = __version__ = ['"](.*)['"] 29 | #version.filename = %(source.dir)s/main.py 30 | 31 | # (str) Application versioning (method 2) 32 | version = 1.1.7 33 | 34 | # (list) Application requirements 35 | # comma seperated e.g. requirements = sqlite3,kivy 36 | requirements = kivy, plyer, pyjnius 37 | 38 | # (str) Custom source folders for requirements 39 | # Sets custom source for any requirements with recipes 40 | # requirements.source.kivy = ../../kivy 41 | 42 | # (list) Garden requirements 43 | #garden_requirements = 44 | 45 | # (str) Presplash of the application 46 | presplash.filename = img/presplash.png 47 | 48 | # (str) Icon of the application 49 | icon.filename = img/app_icon.png 50 | 51 | # (str) Supported orientation (one of landscape, portrait or all) 52 | orientation = portrait 53 | 54 | # (bool) Indicate if the application should be fullscreen or not 55 | fullscreen = 1 56 | 57 | 58 | # 59 | # Android specific 60 | # 61 | 62 | # (list) Permissions 63 | android.permissions = WRITE_EXTERNAL_STORAGE, INTERNET, VIBRATE, ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE 64 | 65 | # (int) Android API to use 66 | #android.api = 14 67 | 68 | # (int) Minimum API required (8 = Android 2.2 devices) 69 | #android.minapi = 8 70 | 71 | # (int) Android SDK version to use 72 | #android.sdk = 21 73 | 74 | # (str) Android NDK version to use 75 | #android.ndk = 9c 76 | 77 | # (bool) Use --private data storage (True) or --dir public storage (False) 78 | #android.private_storage = True 79 | 80 | # (str) Android NDK directory (if empty, it will be automatically downloaded.) 81 | #android.ndk_path = 82 | 83 | # (str) Android SDK directory (if empty, it will be automatically downloaded.) 84 | #android.sdk_path = 85 | 86 | # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) 87 | #android.p4a_dir = 88 | 89 | # (list) python-for-android whitelist 90 | #android.p4a_whitelist = 91 | 92 | # (str) Android entry point, default is ok for Kivy-based app 93 | #android.entrypoint = org.renpy.android.PythonActivity 94 | 95 | # (list) List of Java .jar files to add to the libs so that pyjnius can access 96 | # their classes. Don't add jars that you do not need, since extra jars can slow 97 | # down the build process. Allows wildcards matching, for example: 98 | # OUYA-ODK/libs/*.jar 99 | #android.add_jars = %(source.dir)s/libs/*.jar 100 | 101 | # (list) List of Java files to add to the android project (can be java or a 102 | # directory containing the files) 103 | #android.add_src = 104 | 105 | # (str) python-for-android branch to use, if not master, useful to try 106 | # not yet merged features. 107 | #android.branch = master 108 | 109 | # (str) OUYA Console category. Should be one of GAME or APP 110 | # If you leave this blank, OUYA support will not be enabled 111 | #android.ouya.category = GAME 112 | 113 | # (str) Filename of OUYA Console icon. It must be a 732x412 png image. 114 | #android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png 115 | 116 | # (str) XML file to include as an intent filters in tag 117 | #android.manifest.intent_filters = 118 | 119 | # (list) Android additionnal libraries to copy into libs/armeabi 120 | #android.add_libs_armeabi = libs/android/*.so 121 | #android.add_libs_armeabi_v7a = libs/android-v7/*.so 122 | #android.add_libs_x86 = libs/android-x86/*.so 123 | #android.add_libs_mips = libs/android-mips/*.so 124 | 125 | # (bool) Indicate whether the screen should stay on 126 | # Don't forget to add the WAKE_LOCK permission if you set this to True 127 | #android.wakelock = False 128 | 129 | # (list) Android application meta-data to set (key=value format) 130 | #android.meta_data = 131 | 132 | # (list) Android library project to add (will be added in the 133 | # project.properties automatically.) 134 | #android.library_references = 135 | 136 | # 137 | # iOS specific 138 | # 139 | 140 | # (str) Name of the certificate to use for signing the debug version 141 | # Get a list of available identities: buildozer ios list_identities 142 | #ios.codesign.debug = "iPhone Developer: ()" 143 | 144 | # (str) Name of the certificate to use for signing the release version 145 | #ios.codesign.release = %(ios.codesign.debug)s 146 | 147 | 148 | [buildozer] 149 | 150 | # (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) 151 | log_level = 2 152 | 153 | # (int) Display warning if buildozer is run as root (0 = False, 1 = True) 154 | warn_on_root = 1 155 | 156 | 157 | # ----------------------------------------------------------------------------- 158 | # List as sections 159 | # 160 | # You can define all the "list" as [section:key]. 161 | # Each line will be considered as a option to the list. 162 | # Let's take [app] / source.exclude_patterns. 163 | # Instead of doing: 164 | # 165 | #[app] 166 | #source.exclude_patterns = license,data/audio/*.wav,data/images/original/* 167 | # 168 | # This can be translated into: 169 | # 170 | #[app:source.exclude_patterns] 171 | #license 172 | #data/audio/*.wav 173 | #data/images/original/* 174 | # 175 | 176 | 177 | # ----------------------------------------------------------------------------- 178 | # Profiles 179 | # 180 | # You can extend section / key with a profile 181 | # For example, you want to deploy a demo version of your application without 182 | # HD content. You could first change the title to add "(demo)" in the name 183 | # and extend the excluded directories to remove the HD content. 184 | # 185 | #[app@demo] 186 | #title = My Application (demo) 187 | # 188 | #[app:source.exclude_patterns@demo] 189 | #images/hd/* 190 | # 191 | # Then, invoke the command line with the "demo" profile: 192 | # 193 | #buildozer --profile demo android debug 194 | -------------------------------------------------------------------------------- /buildozer.spec~: -------------------------------------------------------------------------------- 1 | [app] 2 | 3 | # (str) Title of your application 4 | title = Color Smash 5 | 6 | # (str) Package name 7 | package.name = colorsmash 8 | 9 | # (str) Package domain (needed for android/ios packaging) 10 | package.domain = org.paarthri 11 | 12 | # (str) Source code where the main.py live 13 | source.dir = . 14 | 15 | # (list) Source files to include (let empty to include all the files) 16 | source.include_exts = py,png,jpg,kv,atlas,json,mp3,wav 17 | 18 | # (list) Source files to exclude (let empty to not exclude anything) 19 | #source.exclude_exts = spec 20 | 21 | # (list) List of directory to exclude (let empty to not exclude anything) 22 | #source.exclude_dirs = tests, bin 23 | 24 | # (list) List of exclusions using pattern matching 25 | #source.exclude_patterns = license,images/*/*.jpg 26 | 27 | # (str) Application versioning (method 1) 28 | #version.regex = __version__ = ['"](.*)['"] 29 | #version.filename = %(source.dir)s/main.py 30 | 31 | # (str) Application versioning (method 2) 32 | version = 1.1.7 33 | 34 | # (list) Application requirements 35 | # comma seperated e.g. requirements = sqlite3,kivy 36 | requirements = kivy, plyer, pyjnius 37 | 38 | # (str) Custom source folders for requirements 39 | # Sets custom source for any requirements with recipes 40 | # requirements.source.kivy = ../../kivy 41 | 42 | # (list) Garden requirements 43 | #garden_requirements = 44 | 45 | # (str) Presplash of the application 46 | presplash.filename = img/presplash.png 47 | 48 | # (str) Icon of the application 49 | icon.filename = img/app_icon.png 50 | 51 | # (str) Supported orientation (one of landscape, portrait or all) 52 | orientation = portrait 53 | 54 | # (bool) Indicate if the application should be fullscreen or not 55 | fullscreen = 1 56 | 57 | 58 | # 59 | # Android specific 60 | # 61 | 62 | # (list) Permissions 63 | android.permissions = WRITE_EXTERNAL_STORAGE, INTERNET, VIBRATE, ACCESS_WIFI_STATE, ACCESS_NETWORK_STATE 64 | 65 | # (int) Android API to use 66 | #android.api = 14 67 | 68 | # (int) Minimum API required (8 = Android 2.2 devices) 69 | #android.minapi = 8 70 | 71 | # (int) Android SDK version to use 72 | #android.sdk = 21 73 | 74 | # (str) Android NDK version to use 75 | #android.ndk = 9c 76 | 77 | # (bool) Use --private data storage (True) or --dir public storage (False) 78 | #android.private_storage = True 79 | 80 | # (str) Android NDK directory (if empty, it will be automatically downloaded.) 81 | #android.ndk_path = 82 | 83 | # (str) Android SDK directory (if empty, it will be automatically downloaded.) 84 | #android.sdk_path = 85 | 86 | # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) 87 | #android.p4a_dir = 88 | 89 | # (list) python-for-android whitelist 90 | #android.p4a_whitelist = 91 | 92 | # (str) Android entry point, default is ok for Kivy-based app 93 | #android.entrypoint = org.renpy.android.PythonActivity 94 | 95 | # (list) List of Java .jar files to add to the libs so that pyjnius can access 96 | # their classes. Don't add jars that you do not need, since extra jars can slow 97 | # down the build process. Allows wildcards matching, for example: 98 | # OUYA-ODK/libs/*.jar 99 | android.add_jars = %(source.dir)s/libs/*.jar 100 | 101 | # (list) List of Java files to add to the android project (can be java or a 102 | # directory containing the files) 103 | #android.add_src = 104 | 105 | # (str) python-for-android branch to use, if not master, useful to try 106 | # not yet merged features. 107 | #android.branch = master 108 | 109 | # (str) OUYA Console category. Should be one of GAME or APP 110 | # If you leave this blank, OUYA support will not be enabled 111 | #android.ouya.category = GAME 112 | 113 | # (str) Filename of OUYA Console icon. It must be a 732x412 png image. 114 | #android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png 115 | 116 | # (str) XML file to include as an intent filters in tag 117 | #android.manifest.intent_filters = 118 | 119 | # (list) Android additionnal libraries to copy into libs/armeabi 120 | #android.add_libs_armeabi = libs/android/*.so 121 | #android.add_libs_armeabi_v7a = libs/android-v7/*.so 122 | #android.add_libs_x86 = libs/android-x86/*.so 123 | #android.add_libs_mips = libs/android-mips/*.so 124 | 125 | # (bool) Indicate whether the screen should stay on 126 | # Don't forget to add the WAKE_LOCK permission if you set this to True 127 | #android.wakelock = False 128 | 129 | # (list) Android application meta-data to set (key=value format) 130 | #android.meta_data = 131 | 132 | # (list) Android library project to add (will be added in the 133 | # project.properties automatically.) 134 | #android.library_references = 135 | 136 | # 137 | # iOS specific 138 | # 139 | 140 | # (str) Name of the certificate to use for signing the debug version 141 | # Get a list of available identities: buildozer ios list_identities 142 | #ios.codesign.debug = "iPhone Developer: ()" 143 | 144 | # (str) Name of the certificate to use for signing the release version 145 | #ios.codesign.release = %(ios.codesign.debug)s 146 | 147 | 148 | [buildozer] 149 | 150 | # (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) 151 | log_level = 2 152 | 153 | # (int) Display warning if buildozer is run as root (0 = False, 1 = True) 154 | warn_on_root = 1 155 | 156 | 157 | # ----------------------------------------------------------------------------- 158 | # List as sections 159 | # 160 | # You can define all the "list" as [section:key]. 161 | # Each line will be considered as a option to the list. 162 | # Let's take [app] / source.exclude_patterns. 163 | # Instead of doing: 164 | # 165 | #[app] 166 | #source.exclude_patterns = license,data/audio/*.wav,data/images/original/* 167 | # 168 | # This can be translated into: 169 | # 170 | #[app:source.exclude_patterns] 171 | #license 172 | #data/audio/*.wav 173 | #data/images/original/* 174 | # 175 | 176 | 177 | # ----------------------------------------------------------------------------- 178 | # Profiles 179 | # 180 | # You can extend section / key with a profile 181 | # For example, you want to deploy a demo version of your application without 182 | # HD content. You could first change the title to add "(demo)" in the name 183 | # and extend the excluded directories to remove the HD content. 184 | # 185 | #[app@demo] 186 | #title = My Application (demo) 187 | # 188 | #[app:source.exclude_patterns@demo] 189 | #images/hd/* 190 | # 191 | # Then, invoke the command line with the "demo" profile: 192 | # 193 | #buildozer --profile demo android debug 194 | -------------------------------------------------------------------------------- /data/data.json: -------------------------------------------------------------------------------- 1 | {"userData": {"highScore": 27}} -------------------------------------------------------------------------------- /data/data.json~: -------------------------------------------------------------------------------- 1 | {"userData": {"highScore": 16}} -------------------------------------------------------------------------------- /data/sound.json: -------------------------------------------------------------------------------- 1 | {"soundState": {"activeOrNot": "True"}} -------------------------------------------------------------------------------- /data/vibrate.json: -------------------------------------------------------------------------------- 1 | {"vibrateState": {"activeOrNot": "True"}} -------------------------------------------------------------------------------- /img/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/img/app_icon.png -------------------------------------------------------------------------------- /img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/img/background.png -------------------------------------------------------------------------------- /img/presplash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/img/presplash.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.lang import Builder 3 | from kivy.uix.screenmanager import ScreenManager, Screen, WipeTransition 4 | from kivy.uix.popup import Popup 5 | from kivy.uix.button import Button 6 | from kivy.uix.boxlayout import BoxLayout 7 | from kivy.uix.label import Label 8 | from kivy.clock import Clock 9 | from kivy.storage.jsonstore import JsonStore 10 | from kivy.core.audio import SoundLoader 11 | from kivy.uix.modalview import ModalView 12 | 13 | from kivy.utils import platform 14 | 15 | from random import randint 16 | from jnius import autoclass 17 | 18 | from plyer import vibrator 19 | 20 | store = JsonStore('data/data.json') 21 | score = 0 22 | countdown = 0 23 | popup = Popup() 24 | blue = [79 / 255.0, 110 / 255.0, 238 / 255.0, 1] 25 | green = [19 / 255.0, 190 / 255.0, 19 / 255.0, 1] 26 | timePopup = Popup() 27 | sound = SoundLoader.load('snd/click.wav') 28 | 29 | Builder.load_file('UI.kv') 30 | 31 | 32 | class Menu(Screen): 33 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 34 | 35 | def call_start(self): 36 | 37 | Clock.schedule_once(self.start_game, 0) 38 | 39 | def start_game(self, dt): 40 | 41 | sm.current = 'game' 42 | Clock.schedule_interval(self.set_high_score, 1) 43 | 44 | def back_to_menu(self): 45 | 46 | sm.current = 'menu' 47 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 48 | self.ids.highScoreMenuLabel.text = high_score_menu_label_text 49 | 50 | def set_high_score(self, dt): 51 | 52 | high_score_menu_label_text = 'High Score: ' + str(JsonStore('data/data.json').get('userData')['highScore']) 53 | self.ids.highScoreMenuLabel.text = high_score_menu_label_text 54 | 55 | def change_to_settings(self): 56 | 57 | sm.current = 'settings' 58 | 59 | 60 | class PressButton(Screen): 61 | def __init__(self, **kwargs): 62 | 63 | super(PressButton, self).__init__(**kwargs) 64 | self.finalScore = '' 65 | 66 | def show_ads(*args): 67 | 68 | if platform == 'android': 69 | global AdBuddiz 70 | AdBuddiz.showAd(PythonActivity.mActivity) 71 | else: 72 | print 'Not on Android' 73 | 74 | def buttons_disabled(self): 75 | 76 | self.ids.button1.disabled = True 77 | self.ids.button2.disabled = True 78 | self.ids.button3.disabled = True 79 | self.ids.button4.disabled = True 80 | self.ids.button5.disabled = True 81 | self.ids.button6.disabled = True 82 | self.ids.button7.disabled = True 83 | self.ids.button8.disabled = True 84 | self.ids.button9.disabled = True 85 | 86 | def buttons_enabled(self): 87 | 88 | self.ids.button1.disabled = False 89 | self.ids.button2.disabled = False 90 | self.ids.button3.disabled = False 91 | self.ids.button4.disabled = False 92 | self.ids.button5.disabled = False 93 | self.ids.button6.disabled = False 94 | self.ids.button7.disabled = False 95 | self.ids.button8.disabled = False 96 | self.ids.button9.disabled = False 97 | 98 | def buttons_reset_color(self): 99 | 100 | global blue 101 | 102 | self.ids.button1.background_color = blue 103 | self.ids.button2.background_color = blue 104 | self.ids.button3.background_color = blue 105 | self.ids.button4.background_color = blue 106 | self.ids.button5.background_color = blue 107 | self.ids.button6.background_color = blue 108 | self.ids.button7.background_color = blue 109 | self.ids.button8.background_color = blue 110 | self.ids.button9.background_color = blue 111 | 112 | def buttons_reset_specific_color(self, button): 113 | 114 | global blue 115 | 116 | if button == 1: 117 | self.ids.button1.background_color = blue 118 | if button == 2: 119 | self.ids.button2.background_color = blue 120 | if button == 3: 121 | self.ids.button3.background_color = blue 122 | if button == 4: 123 | self.ids.button4.background_color = blue 124 | if button == 5: 125 | self.ids.button5.background_color = blue 126 | if button == 6: 127 | self.ids.button6.background_color = blue 128 | if button == 7: 129 | self.ids.button7.background_color = blue 130 | if button == 8: 131 | self.ids.button8.background_color = blue 132 | if button == 9: 133 | self.ids.button9.background_color = blue 134 | 135 | def check_if_all_clicked(self): 136 | 137 | global blue 138 | total = 0 139 | 140 | if self.ids.button1.background_color == blue: 141 | total = total + 1 142 | if self.ids.button2.background_color == blue: 143 | total = total + 1 144 | if self.ids.button3.background_color == blue: 145 | total = total + 1 146 | if self.ids.button4.background_color == blue: 147 | total = total + 1 148 | if self.ids.button5.background_color == blue: 149 | total = total + 1 150 | if self.ids.button6.background_color == blue: 151 | total = total + 1 152 | if self.ids.button7.background_color == blue: 153 | total = total + 1 154 | if self.ids.button8.background_color == blue: 155 | total = total + 1 156 | if self.ids.button9.background_color == blue: 157 | total = total + 1 158 | 159 | if total == 9: 160 | total = 0 161 | return True 162 | 163 | def change_text(self): 164 | 165 | global green 166 | 167 | x = randint(1, 3) 168 | y = randint(4, 6) 169 | z = randint(7, 9) 170 | 171 | if x == 1: 172 | self.ids.button1.background_color = green 173 | elif x == 2: 174 | self.ids.button2.background_color = green 175 | elif x == 3: 176 | self.ids.button3.background_color = green 177 | 178 | if y == 4: 179 | self.ids.button4.background_color = green 180 | elif y == 5: 181 | self.ids.button5.background_color = green 182 | elif y == 6: 183 | self.ids.button6.background_color = green 184 | 185 | if z == 7: 186 | self.ids.button7.background_color = green 187 | elif z == 8: 188 | self.ids.button8.background_color = green 189 | elif z == 9: 190 | self.ids.button9.background_color = green 191 | 192 | def start_add_score(self, button): 193 | 194 | self.add_score(button) 195 | 196 | def call_vibrate(self): 197 | 198 | if JsonStore('data/vibrate.json').get('vibrateState')['activeOrNot'] == 'True': 199 | if platform == 'android': 200 | vibrator.vibrate(.06) 201 | else: 202 | print 'No vibrator' 203 | else: 204 | pass 205 | 206 | def add_score(self, button): 207 | 208 | global green 209 | global blue 210 | global score 211 | global sound 212 | 213 | if button == 1: 214 | if self.ids.button1.background_color == green: 215 | self.add_score_number() 216 | self.animate_after_touch() 217 | self.buttons_reset_specific_color(1) 218 | self.play_sound() 219 | else: 220 | self.minus_score_number() 221 | self.call_vibrate() 222 | elif button == 2: 223 | if self.ids.button2.background_color == green: 224 | self.add_score_number() 225 | self.animate_after_touch() 226 | self.buttons_reset_specific_color(2) 227 | self.play_sound() 228 | else: 229 | self.minus_score_number() 230 | self.call_vibrate() 231 | elif button == 3: 232 | if self.ids.button3.background_color == green: 233 | self.add_score_number() 234 | self.animate_after_touch() 235 | self.buttons_reset_specific_color(3) 236 | self.play_sound() 237 | else: 238 | self.minus_score_number() 239 | self.call_vibrate() 240 | elif button == 4: 241 | if self.ids.button4.background_color == green: 242 | self.add_score_number() 243 | self.animate_after_touch() 244 | self.buttons_reset_specific_color(4) 245 | self.play_sound() 246 | else: 247 | self.minus_score_number() 248 | self.call_vibrate() 249 | elif button == 5: 250 | if self.ids.button5.background_color == green: 251 | self.add_score_number() 252 | self.animate_after_touch() 253 | self.buttons_reset_specific_color(5) 254 | self.play_sound() 255 | else: 256 | self.minus_score_number() 257 | self.call_vibrate() 258 | elif button == 6: 259 | if self.ids.button6.background_color == green: 260 | self.add_score_number() 261 | self.animate_after_touch() 262 | self.buttons_reset_specific_color(6) 263 | self.play_sound() 264 | else: 265 | self.minus_score_number() 266 | self.call_vibrate() 267 | elif button == 7: 268 | if self.ids.button7.background_color == green: 269 | self.add_score_number() 270 | self.animate_after_touch() 271 | self.buttons_reset_specific_color(7) 272 | self.play_sound() 273 | else: 274 | self.minus_score_number() 275 | self.call_vibrate() 276 | elif button == 8: 277 | if self.ids.button8.background_color == green: 278 | self.add_score_number() 279 | self.animate_after_touch() 280 | self.buttons_reset_specific_color(8) 281 | self.play_sound() 282 | else: 283 | self.minus_score_number() 284 | self.call_vibrate() 285 | elif button == 9: 286 | if self.ids.button9.background_color == green: 287 | self.add_score_number() 288 | self.animate_after_touch() 289 | self.buttons_reset_specific_color(9) 290 | self.play_sound() 291 | else: 292 | self.minus_score_number() 293 | self.call_vibrate() 294 | 295 | self.ids.scoreLabel.text = 'Score: ' + str(score) 296 | self.change_after_three() 297 | 298 | def animate_after_touch(self): 299 | 300 | Clock.schedule_once(self.un_animate_after_touch, 0.1) 301 | 302 | def un_animate_after_touch(self, dt): 303 | 304 | self.ids.buttonsGrid.spacing = [3, 3] 305 | 306 | def play_sound(self): 307 | 308 | global sound 309 | 310 | if JsonStore('data/sound.json').get('soundState')['activeOrNot'] == 'True': 311 | sound.play() 312 | else: 313 | pass 314 | 315 | def change_after_three(self): 316 | 317 | global green 318 | global blue 319 | 320 | if self.check_if_all_clicked() == True: 321 | self.change_text() 322 | 323 | def add_score_number(self): 324 | 325 | global score 326 | score = score + 1 327 | 328 | def minus_score_number(self): 329 | 330 | global score 331 | score = score - 1 332 | 333 | def timer(self, dt): 334 | 335 | global countdown 336 | global timePopup 337 | 338 | countdown = countdown - 1 339 | self.ids.timeLabel.text = 'Time: ' + str(countdown) 340 | 341 | if countdown <= 0: 342 | Clock.unschedule(self.timer) 343 | timePopup = ModalView(auto_dismiss=False, background_color=[1, 0, 0, .7]) 344 | timePopup.add_widget(Label(text='Game Over', font_size='50sp', color=[0, 0, 0, 1])) 345 | timePopup.open() 346 | Clock.schedule_once(self.change_to_end, 1.5) 347 | 348 | def start(self): 349 | 350 | global countdown 351 | sm.current = 'game' 352 | 353 | self.ids.startButton.disabled = True 354 | self.buttons_enabled() 355 | self.buttons_reset_color() 356 | 357 | countdown = 10 358 | Clock.schedule_interval(self.timer, 1) 359 | 360 | self.change_text() 361 | 362 | def reset(self): 363 | 364 | global score 365 | score = 0 366 | self.ids.scoreLabel.text = 'Score: ' + str(score) 367 | self.ids.timeLabel.text = 'Time: 10' 368 | self.ids.startButton.disabled = False 369 | self.buttons_disabled() 370 | self.buttons_reset_color() 371 | 372 | def change_to_end(self, dt): 373 | 374 | global score 375 | global popup 376 | global timePopup 377 | 378 | timePopup.dismiss() 379 | self.finalScore = str(score) 380 | 381 | if JsonStore('data/data.json').get('userData')['highScore'] < score: 382 | JsonStore('data/data.json').put('userData', highScore=score) 383 | 384 | popup_content = BoxLayout(orientation='vertical', spacing=3) 385 | play_again_button = Button(text='Play Again', on_release=self.play_again, font_size='40sp', 386 | background_color=[0, 0, 0, 1]) 387 | back_to_menu_button = Button(text='Back To Menu', on_release=self.change_to_menu, font_size='40sp', 388 | background_color=[0, 0, 0, 1]) 389 | final_score_label = Label(text='Score: ' + self.finalScore, font_size='50sp', color=[0, 0, 0, 1]) 390 | high_score_label = Label(text='High Score: ' + str(JsonStore('data/data.json').get('userData', )['highScore']), 391 | font_size='50sp', color=[0, 0, 0, 1]) 392 | 393 | popup_content.add_widget(final_score_label) 394 | popup_content.add_widget(high_score_label) 395 | popup_content.add_widget(play_again_button) 396 | popup_content.add_widget(back_to_menu_button) 397 | 398 | popup = ModalView(auto_dismiss=False, background_color=[1, 0, 0, .7]) 399 | popup.add_widget(popup_content) 400 | popup.open() 401 | 402 | self.reset() 403 | 404 | def change_to_menu(self, dt): 405 | 406 | global popup 407 | Menu().back_to_menu() 408 | popup.dismiss() 409 | 410 | def play_again(self, dt): 411 | 412 | global popup 413 | popup.dismiss() 414 | 415 | 416 | class Settings(Screen): 417 | def back_to_menu(self): 418 | 419 | sm.current = 'menu' 420 | 421 | def check_sound(self): 422 | 423 | if JsonStore('data/sound.json').get('soundState')['activeOrNot'] == 'True': 424 | return True 425 | else: 426 | return False 427 | 428 | def change_sound(self, active): 429 | 430 | if active == True: 431 | JsonStore('data/sound.json').put('soundState', activeOrNot='True') 432 | else: 433 | JsonStore('data/sound.json').put('soundState', activeOrNot='False') 434 | 435 | def check_vibrate(self): 436 | 437 | if JsonStore('data/vibrate.json').get('vibrateState')['activeOrNot'] == 'True': 438 | return True 439 | else: 440 | return False 441 | 442 | def change_vibrate(self, active): 443 | 444 | if active == True: 445 | JsonStore('data/vibrate.json').put('vibrateState', activeOrNot='True') 446 | else: 447 | JsonStore('data/vibrate.json').put('vibrateState', activeOrNot='False') 448 | 449 | 450 | sm = ScreenManager(transition=WipeTransition()) 451 | sm.add_widget(Menu(name='menu')) 452 | sm.add_widget(PressButton(name='game')) 453 | sm.add_widget(Settings(name='settings')) 454 | 455 | 456 | class PressButtonApp(App): 457 | 458 | 459 | def on_pause(self): 460 | return True 461 | 462 | def on_resume(self): 463 | pass 464 | 465 | def build(self): 466 | return sm 467 | 468 | 469 | if __name__ == '__main__': 470 | PressButtonApp().run() 471 | -------------------------------------------------------------------------------- /screenshots/End.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/screenshots/End.png -------------------------------------------------------------------------------- /screenshots/Game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/screenshots/Game.png -------------------------------------------------------------------------------- /screenshots/Menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/screenshots/Menu.png -------------------------------------------------------------------------------- /snd/click.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paarthtandon/Color_Smash/3cb7f6e2bc2b0cb49db9a128c5fb94b57a02d4d6/snd/click.wav --------------------------------------------------------------------------------