<?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: Rishav Mazumdar</title>
    <description>The latest articles on DEV Community by Rishav Mazumdar (@rishavmz).</description>
    <link>https://dev.to/rishavmz</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%2F599232%2Fc622699e-a417-4efb-b3c5-2213d80cb621.jpg</url>
      <title>DEV Community: Rishav Mazumdar</title>
      <link>https://dev.to/rishavmz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rishavmz"/>
    <language>en</language>
    <item>
      <title>Developing a 3D game which runs on your browser</title>
      <dc:creator>Rishav Mazumdar</dc:creator>
      <pubDate>Fri, 31 Dec 2021 05:30:35 +0000</pubDate>
      <link>https://dev.to/rishavmz/developing-a-3d-game-which-runs-on-your-browser-1g7i</link>
      <guid>https://dev.to/rishavmz/developing-a-3d-game-which-runs-on-your-browser-1g7i</guid>
      <description>&lt;p&gt;So it all begins with a person who is inspired to develop games, but is experienced in web development and has no prior experience with C#. Yes, that person is me 😅. I an a web developer who had previously created a few basic 2D games like PONG, Snake etc using javascript and PyGame but never explored the 3D version of game development, until this year when I discovered this awesome Javascript library Three.js.&lt;/p&gt;

&lt;p&gt;I have created a 3D TPP game which sets your character in a sandbox world where you can move around, eliminate bots, or get eliminated by them. &lt;br&gt;
Along with this, I have also used the previous knowledge I had about backend and developed a multiplayer mode where all the joined users are synchronized to enable a smooth gameplay.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some useful links👀
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/RishavMz/Battleinator5000"&gt;Github Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://battleinator5000.netlify.app/"&gt;Deployment&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hmm, that seems enough of an introduction... Let's elaborate further&lt;/p&gt;

&lt;h2&gt;
  
  
  Singleplayer Mode
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--luSRwxYQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q94upcbdwihhcpzb7n3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--luSRwxYQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q94upcbdwihhcpzb7n3k.png" alt="A screenshot of singleplayer mode" width="880" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some exciting features added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The terrain generation is random, and may reset every time the page is refreshed.&lt;/li&gt;
&lt;li&gt;Position of bots is handled by spatial QuadTree, which reduces the load on processor by handling only the nearest bots movement (not all the bots on the map)&lt;/li&gt;
&lt;li&gt;Added dense fog for a better battleground appearance &lt;/li&gt;
&lt;li&gt;Moving water (cause why not?)&lt;/li&gt;
&lt;li&gt;Some bots chase you, and may damage you if too near&lt;/li&gt;
&lt;li&gt;Switch weapons(for Melee attack) and destroy bots&lt;/li&gt;
&lt;li&gt;Shoot projectiles to destroy bots&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multiplayer Mode
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1JK-gCyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1p153ynzaw2zt0edoph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1JK-gCyf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1p153ynzaw2zt0edoph.png" alt="A screenshot of multiplayer mode" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some exciting features added:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Usernames hover above the players&lt;/li&gt;
&lt;li&gt;Syncing of user positions in real time using SocketIO&lt;/li&gt;
&lt;li&gt;A real time chat feature for better experience&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  System Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Frontend
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5xYjnnnf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ssm1jer11cvj40846k4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5xYjnnnf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ssm1jer11cvj40846k4.png" alt="A schematic view of frontend design" width="880" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Followed OOP patterns to enable efficient handling of shared variables, repeating blocks of code and dependencies&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Backend
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hfxdsTEK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apk6owa06d6hn2vj8crt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hfxdsTEK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/apk6owa06d6hn2vj8crt.png" alt="A schematic view of backend structure" width="721" height="661"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Used SocketIO for syncing of all the clients, and NodeJS as backend&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Ending notes😅:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The server for multiplayer mode is currently down, had some deployment issues due to heavy traffic, would figure out some solution in a while.&lt;/li&gt;
&lt;li&gt;There might be some bugs, if found you may report it &lt;a href="https://github.com/RishavMz/Battleinator5000/issues"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>threejs</category>
      <category>gamedev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
