{"id":4129,"date":"2023-07-28T06:48:48","date_gmt":"2023-07-28T06:48:48","guid":{"rendered":"https:\/\/rengga.dev\/blog\/?p=4129"},"modified":"2023-08-28T23:51:08","modified_gmt":"2023-08-28T23:51:08","slug":"from-concept-to-creation-building-bango-bingo-game-in-72-hours","status":"publish","type":"post","link":"https:\/\/rengga.dev\/blog\/from-concept-to-creation-building-bango-bingo-game-in-72-hours\/","title":{"rendered":"From Concept to Creation: Building Bango Bingo Game in 72 Hours"},"content":{"rendered":"<p><span style=\"color: #ef3207;\"><a style=\"color: #ef3207;\" href=\"https:\/\/rengga.dev\/\" target=\"_blank\" rel=\"noopener\"><strong>Rengga Dev<\/strong><\/a> <\/span>&#8211; Bango Bingo Game is a HTML5 game which player choosing the numbered tickets and giving prizes to the holders of numbers drawn at random. From concept to Creation, I am building Bango Bingo Game in 72 hours.<\/p>\n<p>Players usually choose a set of numbers from a grid of numbers and then wait for the winning numbers to be drawn. If their selected numbers match the winning numbers, they win a prize (points).<\/p>\n<p>This game can be played on a variety of devices, including desktops, laptops, tablets, and smartphones. It typically requires a stable internet connection and a modern web browser that supports HTML5 technology.<\/p>\n<h2><strong>How To Create<\/strong><\/h2>\n<h3 id=\"cssFiles\"><strong>CSS Files and Structure<\/strong><\/h3>\n<p>I&#8217;m using two CSS files in this game. The first one is a generic reset file. Many browser interpret the default behavior of html elements differently. By using a general reset CSS file, we can work round this. This file also contains some general styling, such as anchor tag colors, font-sizes, etc. Keep in mind, that these values might be overridden somewhere else in the file.<\/p>\n<p>The second file contains all of the specific stylings for the page.<\/p>\n<h3><strong>JavaScript<\/strong><\/h3>\n<p>This game using Javascript files below.<\/p>\n<ol>\n<li><strong>jQuery<\/strong>\u00a0is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.<\/li>\n<li><strong>Detect Mobile Browser<\/strong>\u00a0is a open source scripts to detect mobile browsers and phones.<\/li>\n<li><strong>CreateJs plugin<\/strong>\u00a0is a suite of modular libraries and tools which work together to create interactive content on open web technologies via HTML5.<\/li>\n<li><strong>TweenMax<\/strong>\u00a0is an extremely fast, lightweight, and flexible animation tool that serves as the foundation of the GreenSock Animation Platform (GSAP).<\/li>\n<li><strong>The game have the following js files<\/strong>\n<ul>\n<li><strong>init.js :<\/strong>\u00a0check if browser or device support<\/li>\n<li><strong>loader.js :<\/strong>\u00a0loader to load all game images<\/li>\n<li><strong>main.js :<\/strong>\u00a0initiate game setup and browser resize function<\/li>\n<li><strong>mobile.js :<\/strong>\u00a0mobile orientation change<\/li>\n<li><strong>canvas.js :<\/strong>\u00a0canvas setup and resize<\/li>\n<li><strong>sound.js :<\/strong>\u00a0sound event<\/li>\n<li><strong>game.js :<\/strong>\u00a0game play and logics<\/li>\n<li><strong>plugins.js :<\/strong> additional useful plugins<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3><strong>Sample Code<\/strong><\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">var selectTextDisplay = '[NUMBER]'; \/\/select number text display\r\nvar ballRadius = 60; \/\/ball radius\r\nvar totalBall = 36; \/\/total balls\r\nvar rotateBall = true; \/\/rotate balls in 3d angle\r\n \r\nvar spinDirection = true; \/\/true for anticlockwise\r\nvar spinStartSpeed = 5; \/\/spin starting speed\r\nvar spinEndSpeed = 5; \/\/spin ending speed\r\nvar spinSpeed = 10; \/\/spin speed\r\nvar revealTimer = 6; \/\/reveal ball timer\r\n \r\nvar enablePercentage = true; \/\/option to have result base on percentage\r\n \r\n\/\/score points array and also the total number to reveal\r\nvar score_arr = [\r\n   {prize:100, percent:75},\r\n   {prize:500, percent:65},\r\n   {prize:1000, percent:50},\r\n   {prize:5000, percent:40},\r\n   {prize:10000, percent:25},\r\n   {prize:100000, percent:10}\r\n];<\/pre>\n<h3><strong>Sources and Credits<\/strong><\/h3>\n<p>I&#8217;ve used the following font and sound files as listed.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.dafont.com\/quantify.font\" target=\"_blank\" rel=\"noopener\">Quantify<\/a>\u00a0from file Senhikari<\/li>\n<li><a href=\"https:\/\/www.freepik.com\/free-vector\/green-bingo-background-with-golden-coins_1146864.htm\" target=\"_blank\" rel=\"noopener\">Green bingo background with golden coins<\/a>\u00a0from file freepik<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/GameAudio\/sounds\/220171\/\" target=\"_blank\" rel=\"noopener\">Flourish Spacey 1<\/a>\u00a0from file GameAudio<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/Mativve\/sounds\/391539\/\" target=\"_blank\" rel=\"noopener\">Electro win sound<\/a>\u00a0from file Mativve<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/Andromadax24\/sounds\/186719\/\" target=\"_blank\" rel=\"noopener\">Chime_01.wav<\/a>\u00a0from file Andromadax24<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/Caitlin_100\/sounds\/365535\/\" target=\"_blank\" rel=\"noopener\">Snooker &amp; pool balls.mp3<\/a>\u00a0from file Caitlin_100<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/Soughtaftersounds\/sounds\/145459\/\" target=\"_blank\" rel=\"noopener\">Menu Click-Sparkle<\/a>\u00a0from file Soughtaftersounds<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/joedeshon\/sounds\/81151\/\" target=\"_blank\" rel=\"noopener\">suck_pop_02.wav<\/a>\u00a0from file joedeshon<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/elmasmalo1\/sounds\/350841\/\" target=\"_blank\" rel=\"noopener\">Level-Up Sound FX<\/a>\u00a0from file elmasmalo1<\/li>\n<li><a href=\"https:\/\/freesound.org\/people\/deadsillyrabbit\/sounds\/251390\/\" target=\"_blank\" rel=\"noopener\">Button_Hover (mp3).mp3<\/a>\u00a0from file deadsillyrabbit<\/li>\n<\/ul>\n<h2><strong>How To Play<\/strong><\/h2>\n<p>Select 6 numbers and click start to begin.<\/p>\n<div class=\"su-row\">\n<div class=\"su-column su-column-size-1-2\"><div class=\"su-column-inner su-u-clearfix su-u-trim\"><div class=\"su-button-center\"><a href=\"https:\/\/rengga.dev\/game\/bangobingo-en\/\" class=\"su-button su-button-style-glass su-button-wide\" style=\"color:#FFFFFF;background-color:#3EBD0D;border-color:#32980b;border-radius:50px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:8px 24px;font-size:18px;line-height:27px;border-color:#78d156;border-radius:50px;text-shadow:1px 1px 1px #000000\"><i class=\"sui sui-github-square\" style=\"font-size:18px;color:#FFFFFF\"><\/i> Bango Bingo (English)<\/span><\/a><\/div><\/div><\/div>\n<div class=\"su-column su-column-size-1-2\"><div class=\"su-column-inner su-u-clearfix su-u-trim\"><div class=\"su-button-center\"><a href=\"https:\/\/rengga.dev\/game\/bangobingo-jp\/\" class=\"su-button su-button-style-glass su-button-wide\" style=\"color:#FFFFFF;background-color:#3EBD0D;border-color:#32980b;border-radius:50px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#FFFFFF;padding:8px 24px;font-size:18px;line-height:27px;border-color:#78d156;border-radius:50px;text-shadow:1px 1px 1px #000000\"><i class=\"sui sui-github-square\" style=\"font-size:18px;color:#FFFFFF\"><\/i> Bango Bingo (Japanese)<\/span><\/a><\/div><\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Rengga Dev &#8211; Bango Bingo Game is a HTML5 game which player <a class=\"read-more\" href=\"https:\/\/rengga.dev\/blog\/from-concept-to-creation-building-bango-bingo-game-in-72-hours\/\" title=\"From Concept to Creation: Building Bango Bingo Game in 72 Hours\" itemprop=\"url\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":4404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[493,406],"tags":[499,495,496,497,498,494],"newstopic":[610,571,601],"class_list":{"0":"post-4129","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-game","8":"category-pickup","9":"tag-bango-bingo-game","10":"tag-game","11":"tag-game-development","12":"tag-lottery-game","13":"tag-numbers-game","14":"tag-web-game","15":"newstopic-game","16":"newstopic-javascript","17":"newstopic-jquery"},"_links":{"self":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/comments?post=4129"}],"version-history":[{"count":18,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4129\/revisions"}],"predecessor-version":[{"id":4585,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/4129\/revisions\/4585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media\/4404"}],"wp:attachment":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media?parent=4129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/categories?post=4129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/tags?post=4129"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/newstopic?post=4129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}