<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: wiz-aiimages</title>
    <description>The latest articles on DEV Community by wiz-aiimages (@wizaiimages).</description>
    <link>https://dev.to/wizaiimages</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1074195%2Fe3f62267-2b78-46c0-8a58-91493dbd25be.png</url>
      <title>DEV Community: wiz-aiimages</title>
      <link>https://dev.to/wizaiimages</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wizaiimages"/>
    <language>en</language>
    <item>
      <title>How To Make A Snake Game In JavaScript : A Beginners Guide</title>
      <dc:creator>wiz-aiimages</dc:creator>
      <pubDate>Sun, 30 Apr 2023 04:33:55 +0000</pubDate>
      <link>https://dev.to/wizaiimages/how-to-make-a-snake-game-in-javascript-a-beginners-guide-2fad</link>
      <guid>https://dev.to/wizaiimages/how-to-make-a-snake-game-in-javascript-a-beginners-guide-2fad</guid>
      <description>&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja9NUG-_bi2OouSmO91MMrkLVMq3TtBdaNek3aMG9QZIdI-wuF1E6o8b7wK7HPUEkKI95SdxqoRnhveYTUk_F7cI30PgahOj_yqtQNFQnoQAUy-pyxzBOUyIAbv2kFrg6kCT9SNs3fqqiMFRR2A_MHg0GBYI7mLCjH6nPsF7KwYc9OCnTYRl5vwyxh8A/s300/94984424-044e0a80-0509-11eb-903a-c114d5b6f061.png"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h1 id="basic-snake-html-and-javascript-game"&gt;&lt;span&gt;Basic Snake HTML and JavaScript Game&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;

&lt;p&gt;&lt;span&gt;Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Create a fun Snake game with &amp;lt;100 lines of code using HTML and JavaScript. Basic version with room for exploration.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="further-exploration"&gt;&lt;span&gt;Further Exploration&lt;span&gt;&amp;lt;!--more--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;span&gt;Score&lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span&gt;When the snake eats an apple, the score should increase by one. Use &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText"&gt;context.fillText()&lt;/a&gt; to display the score on the screen&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;/li&gt;

&lt;li&gt;
&lt;span&gt;Mobile and touchscreen support&lt;/span&gt;&lt;ul&gt;

&lt;li&gt;&lt;span&gt;Allow the game to be scaled down to a phone size. See &lt;a href="https://codepen.io/straker/pen/VazMaL"&gt;&lt;/a&gt;&lt;a href="https://codepen.io/straker/pen/VazMaL"&gt;&lt;/a&gt;&lt;a href="https://codepen.io/straker/pen/VazMaL"&gt;https://codepen.io/straker/pen/VazMaL&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;

&lt;li&gt;&lt;span&gt;Support &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Touch_events"&gt;touch controls&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;
&lt;span&gt;Better apple spawning&lt;/span&gt;&lt;ul&gt;

&lt;li&gt;&lt;span&gt;Currently, the apple spawns in any random grid in the game, even if the snake is already on that spot. Improve it so it only spawns in empty grid locations&lt;/span&gt;&lt;/li&gt;

&lt;p&gt;&lt;a href="https://wiz-official.blogspot.com/2023/04/how-to-make-snake-game-in-javascript.html"&gt;READ MORE&lt;/a&gt;&lt;/p&gt;


&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
