added tuts
[sdlgit/SDL-Site.git] / pages / SDL-Tutorial-Tetris.html-inc
diff --git a/pages/SDL-Tutorial-Tetris.html-inc b/pages/SDL-Tutorial-Tetris.html-inc
new file mode 100644 (file)
index 0000000..c4d9f6a
--- /dev/null
@@ -0,0 +1,65 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a>
+<ul><li><a href="#The_Overall_view">The Overall view</a>
+<ul><li><a href="#The_Game_Loop">The Game Loop</a></li>
+<li><a href="#The_Game_Logic">The Game Logic</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>Let's Make Tetris</p>
+
+</div>
+<h2 id="The_Overall_view">The Overall view</h2>
+<div id="The_Overall_view_CONTENT">
+<p>All games are a while loop. So we will have something like this.</p>
+
+</div>
+<h3 id="The_Game_Loop">The Game Loop</h3>
+<div id="The_Game_Loop_CONTENT">
+<pre> package Tetris;
+
+ sub run_game_fun_times
+ {
+  while(1)
+  {
+   #game logic here
+  }
+ }     
+
+</pre>
+<p>You need more code you say? Ok well, a game does two things more. </p>
+
+</div>
+<h3 id="The_Game_Logic">The Game Logic</h3>
+<div id="The_Game_Logic_CONTENT">
+<dl>
+       <dt>Input Events</dt>
+       <dd>
+               <p>A game essentially move objects (boxes, monsters so on) in time.</p>
+               <p>
+                       <dl>
+                               <dt>Time</dt>
+                               <dd>
+                                       <p>In SDL time is measured in ticks.</p>
+                               </dd>
+                               <dt>User Input</dt>
+                       </dl>
+               </p>
+       </dd>
+       <dt>Draw Everything</dt>
+</dl>
+<p>--Kartik
+</p>
+
+</div>
+</div>
\ No newline at end of file