Build a Clumsy Bird Game In Browser Using Javascript , CSS and HTML5 Complete Project For learner

Welcome Learner today in this blog post we will be Build a Clumsy Bird game in Browser With Javascript HTML5 and CSS3. All the Complete source code of the application is shown Down.

Let Start

index.html `

 

<!DOCTYPE HTML>
<html lang="en">
    <head>
        <title>Clumsy Bird</title>
        <link rel="apple-touch-icon-precomposed" href="data/img/touch-icon-iphone.png"/>
        <link rel="apple-touch-icon-precomposed" sizes="120x120" href="data/img/touch-icon-iphone-retina.png"/>
        <link rel="shortcut icon" href="data/img/favicon.ico">
        <link rel="stylesheet" type="text/css" media="screen" href="index.css">
        <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-title" content="Clumsy Bird">
        <meta charset="UTF-8" />
        <meta name="description" content="Clumsy Bird - A Flappy Bird clone using MelonJS"/>
        <meta name="keywords" content="flappybird, flappy, bird, game, html5, melonjs,clone"/>
        <meta name="robots" content="index, follow">
        <meta name="google-site-verification" content="RDZI9SqVaffd48uHfZMv67-YdvviOMe2HuULEYqVgd4" />
        <meta property="og:image" content="http://ellisonleao.github.io/clumsy-bird/data/img/bg.png" />
        <meta property="og:title" content="Clumsy Bird - A Flappy Bird clone using MelonJS"/>
        <meta property="og:url" content="http://ellisonleao.github.io/clumsy-bird/"/>
        <meta property="og:site_name" content="Clumsy Bird - MelonJS"/>

        <!-- Twitter Card -->
        <meta name="twitter:hashtag" content="clumsybird" />
        <meta name="twitter:card" content="summary" />
        <meta name="twitter:site" content="@ellisonleao" />
        <meta name="twitter:creator" content="@ellisonleao" />
        <meta name="twitter:title" content="Clumsy Bird" />
        <meta name="twitter:description" content="A Flappy Bird melonJS clone" />

        <!-- Humans -->
        <link rel="author" href="humans.txt" />
    </head>

    <body>
        <!-- Canvas placeholder -->
        <div id="screen"></div>

        <!-- melonJS Library -->
        <script type="text/javascript" src="js/melonJS-min.js" ></script>
        <script type="text/javascript" src="build/clumsy-min.js" ></script>
        <script type="text/javascript">
            window.onReady(function onReady() {
                game.onload();
            });
        </script>

    </body>
</html>

ReadPHP 7 easy Registration Form Validation Demo With Source Code

Now You Create an index.css file and copy-paste the Following Code.

 

index.css

 

body {
  background-color: #0099cc;
  color: #fff;

  /* Allow mouse dragging. */
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  -webkit-user-select: none;
  user-select: none;

  /* disable touch panning/zooming */
  -ms-touch-action: none;
  touch-action: none;

  /* Allow canvas to hit the edges of the browser viewport. */
  margin: 0;
}

#screen canvas {
  margin: auto;
  /* Hide the gap for font descenders. */
  display: block;

  /* disable scaling interpolation */
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: optimize-contrast;
  -ms-interpolation-mode: nearest-neighbor;
}

#share {
  margin: 10px auto;
  text-align: center;
}

#share .fb-share-button iframe {
  margin-top: -4px;
}

@font-face {
  font-family: 'gamefont';
  src: url('data/css/gamefont.eot');
  src: url('data/css/gamefont.eot?#iefix') format('embedded-opentype'),
     url('data/css/gamefont.woff') format('woff'),
     url('data/css/gamefont.ttf') format('truetype'),
     url('data/css/gamefont.svg#gamefont') format('svg');
  font-weight: normal;
  font-style: normal;
}

.google {
  position: absolute;
  left:23%;
}

Leave a Comment

Your email address will not be published. Required fields are marked *