LearnOpenGL

Translation in progress of learnopengl.com.
git clone https://git.mtkn.jp/LearnOpenGL
Log | Files | Refs

Breakout.html (4327B)


      1     <h1 id="content-title">Breakout</h1>
      2 <h1 id="content-url" style='display:none;'>In-Practice/2D-Game/Breakout</h1>
      3 <p>
      4   Over these chapters we learned a fair share about OpenGL's inner workings and how we can use them to create fancy graphics. However, aside from a lot of tech demos, we haven't really created a practical application with OpenGL. This is the introduction of a larger series about creating a relatively simple 2D game using OpenGL. The next chapters will demonstrate how we can use OpenGL in a larger, more complicated, setting. Note that the series does not necessarily introduce new OpenGL concepts but more or less show how we can apply these concepts to a larger whole.
      5 </p>
      6 
      7 <p>
      8   Because we rather keep things simple, we're going to base our 2D game on an already existing 2D arcade game. Introducing <def>Breakout</def>, a classic 2D game released in 1976 on the Atari 2600 console. Breakout requires the player, who controls a small horizontal paddle, to destroy all the bricks by bouncing a small ball against each brick without allowing the ball to reach the bottom edge. Once the player destroys all bricks, he completes the game. 
      9 </p>
     10 
     11 <p>
     12   Below we can see how Breakout originally looked on the Atari 2600:
     13 </p>
     14 
     15 <img src="/img/in-practice/breakout/breakout2600.png" class="medium" alt="Image of Atari 2600's Breakout"/>
     16 
     17 <p>
     18   The game has the following mechanics:
     19 </p>
     20 
     21 <ul>
     22   <li>A small paddle is controlled by the player and can only move horizontally within the bounds of the screen.</li>
     23   <li>The ball travels across the screen and each collision results in the ball changing its direction based on where it hit; this applies to the screen bounds, the bricks, and the paddle.</li>
     24   <li>If the ball reaches the bottom edge of the screen, the player is either game over or loses a life.</li>
     25   <li>As soon as a brick touches the ball, the brick is destroyed.</li>
     26   <li>The player wins as soon as all bricks are destroyed.</li>
     27   <li>The direction of the ball can be manipulated by how far the ball bounces from the paddle's center.</li>
     28 </ul>
     29 
     30 <p>
     31  Because from time to time the ball may find a small gap reaching the area above the brick wall, it will continue to bounce up and forth between the top edge of the level and the top edge of the brick layer. The ball keeps this up, until it eventually finds a gap again. This is logically where the game obtained its name from, since the ball has to <em>break out</em>.
     32 </p>
     33 
     34 <h1>OpenGL Breakout</h1>
     35 <p>
     36   We're going to take this classic arcade game as the basis of a 2D game that we'll completely implement with OpenGL. This version of Breakout will render its graphics on the GPU which gives us the ability to enhance the classical Breakout game with some nice extra features.
     37 </p>
     38 
     39 <p>
     40   Other than the classic mechanics, our version of Breakout will feature:
     41 </p>
     42 
     43 <ul>
     44   <li>Amazing graphics!</li>
     45   <li>Particles</li>
     46   <li>Text rendering</li>
     47   <li>Power-ups</li>
     48   <li>Postprocessing effects</li>  
     49   <li>Multiple (customizable) levels</li>
     50 </ul>
     51 
     52 <p>
     53   To get you excited you can see what the game will look like after you've finished these chapters:
     54 </p>
     55 
     56 <img src="/img/in-practice/breakout/cover.png"  alt="OpenGL version of Breakout"/>
     57 
     58 <p>
     59   These chapters will combine a large number of concepts from previous chapters and demonstrate how they can work together as a whole. Therefore, it is important to have at least finished the <a href="https://learnopengl.com/Getting-started/OpenGL" target="_blank">Getting started</a> chapters before working your way through these series.
     60 </p>
     61 
     62 <p>
     63   Also, several chapters will require concepts from other chapters (<def>Framebuffers</def> for example from the <a href="https://learnopengl.com/Advanced-OpenGL/Framebuffers" target="_blank">Advanced OpenGL</a> section) so where necessary, the required chapters are listed.
     64 </p>
     65 
     66 <p>
     67   If you believe you're ready to get your hands dirty then move on to the <a href="https://learnopengl.com/In-Practice/2D-Game/Setting-up" target="_blank">next</a> chapter.
     68 </p>       
     69 
     70     </div>
     71     
     72     <div id="hover">
     73         HI
     74     </div>
     75    <!-- 728x90/320x50 sticky footer -->
     76 <div id="waldo-tag-6196"></div>
     77 
     78    <div id="disqus_thread"></div>
     79 
     80     
     81 
     82 
     83 </div> <!-- container div -->
     84 
     85 
     86 </div> <!-- super container div -->
     87 </body>
     88 </html>