<?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>Forem: Sudip</title>
    <description>The latest articles on Forem by Sudip (@sudip_4dbdbc6116a9aa4316a).</description>
    <link>https://forem.com/sudip_4dbdbc6116a9aa4316a</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%2F3898919%2Fd6706ff0-76d1-411c-af6b-cd89780c78da.jpg</url>
      <title>Forem: Sudip</title>
      <link>https://forem.com/sudip_4dbdbc6116a9aa4316a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sudip_4dbdbc6116a9aa4316a"/>
    <language>en</language>
    <item>
      <title>🧟 Level 2: The DNA Blueprints &amp; The Zombie Army (Solidity Quest)</title>
      <dc:creator>Sudip</dc:creator>
      <pubDate>Sun, 10 May 2026 23:24:56 +0000</pubDate>
      <link>https://forem.com/sudip_4dbdbc6116a9aa4316a/level-2-the-dna-blueprints-the-zombie-army-solidity-quest-2jbi</link>
      <guid>https://forem.com/sudip_4dbdbc6116a9aa4316a/level-2-the-dna-blueprints-the-zombie-army-solidity-quest-2jbi</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1f0bt63by2epgul5n4d0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1f0bt63by2epgul5n4d0.jpeg" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Level 1, we dropped our "Citadel" (the Smart Contract) onto the Ethereum grid. It’s a safe, empty fortress. But a factory without a product is just a building.&lt;/p&gt;

&lt;p&gt;Today, we are installing the most important part of our factory: The Storage Vaults. We need a way to define what a Zombie is and a place to keep an infinite army of them.&lt;br&gt;
🧬 Step 1: The DNA Blueprint (Structs)&lt;/p&gt;

&lt;p&gt;In a strategy game, every unit has "Stats"—HP, Mana, Attack Power. In our factory, every Zombie has DNA.&lt;/p&gt;

&lt;p&gt;Instead of making separate boxes for every stat, Solidity lets us create a Struct. Think of a struct as a Technical Manual or a Blueprint that groups all the characteristics of a unit together.&lt;br&gt;
Solidity&lt;/p&gt;

&lt;p&gt;struct Zombie {&lt;br&gt;
    string name;&lt;br&gt;
    uint dna;&lt;br&gt;
}&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;👁️ Player Vision: You walk into the center of the citadel and install a holographic terminal. This terminal defines the "Species." Every Zombie created from now on MUST follow this blueprint: It must have a Name and a DNA code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;📦 Step 2: The Infinite Army (Arrays)&lt;/p&gt;

&lt;p&gt;Now that we have a blueprint, where do we keep the Zombies once they are built? We need a List.&lt;/p&gt;

&lt;p&gt;In Solidity, we use an Array. Think of this like a Infinite Baracks. Every time a new Zombie is born, it gets a bunk bed in these barracks and an ID number.&lt;br&gt;
Solidity&lt;/p&gt;

&lt;p&gt;Zombie[] public zombies;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;👁️ Player Vision: You pull a lever, and the floor of your fortress opens up to reveal a massive, underground storage hanger. It's empty for now, but it's labeled "THE ARMY." Because it’s public, anyone can look through the glass floor and see how many Zombies you have.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🔢 Step 3: Setting the "Physics" of DNA (State Variables)&lt;/p&gt;

&lt;p&gt;We want our Zombie DNA to be exactly 16 digits long. To do this, we need a mathematical constant. We use a State Variable.&lt;/p&gt;

&lt;p&gt;State Variables are "Hard-coded" into the blockchain. They are like the Laws of Physics in your game world.&lt;br&gt;
Solidity&lt;/p&gt;

&lt;p&gt;uint dnaDigits = 16;&lt;br&gt;
uint dnaModulus = 10 ** dnaDigits;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;👁️ Player Vision: On the wall of your factory, you bolt down a massive brass plate. It says: "DNA LIMIT: 16 DIGITS." This rule is now permanent. The factory's machines will use this plate to make sure no Zombie is born with a 17-digit mutation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🛠️ The Full Code (Level 2)&lt;/p&gt;

&lt;p&gt;Here is how our ZombieFactory.sol looks now:&lt;br&gt;
Solidity&lt;/p&gt;

&lt;p&gt;// SPDX-License-Identifier: MIT&lt;br&gt;
pragma solidity &amp;gt;=0.5.0 &amp;lt;0.6.0;&lt;/p&gt;

&lt;p&gt;contract ZombieFactory {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uint dnaDigits = 16;
uint dnaModulus = 10 ** dnaDigits;

struct Zombie {
    string name;
    uint dna;
}

Zombie[] public zombies;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;🏆 Level 2 Cleared&lt;/p&gt;

&lt;p&gt;We have the Blueprint (Struct), the Barracks (Array), and the Laws of Physics (State Variables).&lt;/p&gt;

&lt;p&gt;Our factory is now "Data Ready." But wait... the machines aren't moving yet. We have the storage, but we don't have the Functions to actually create the Zombies.&lt;/p&gt;

&lt;p&gt;In Level 3, we will build the "Creation Engine"—the functions that take a name and turn it into a living, breathing (well, undead) monster.&lt;/p&gt;

&lt;p&gt;Is your DNA vault ready? Drop a 🧬 in the comments if you're following the quest!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🏗️ Building Web3: If Solidity Looked Like an Epic Strategy Game (Part 1)</title>
      <dc:creator>Sudip</dc:creator>
      <pubDate>Sun, 26 Apr 2026 15:09:39 +0000</pubDate>
      <link>https://forem.com/sudip_4dbdbc6116a9aa4316a/building-web3-if-solidity-looked-like-an-epic-strategy-game-part-1-5e06</link>
      <guid>https://forem.com/sudip_4dbdbc6116a9aa4316a/building-web3-if-solidity-looked-like-an-epic-strategy-game-part-1-5e06</guid>
      <description>&lt;p&gt;To be honest staring at code on a black screen is really boring. When I first started learning Web3 and Solidity I found that reading text did not work for me. My brain does not process syntax it processes worlds.&lt;/p&gt;

&lt;p&gt;So I changed my perspective. I started looking at my code editor like a gaming console. Every line of code I type is not just text it is an action happening on a map, like a match of Dota 2 or Clash of Clans.&lt;/p&gt;

&lt;p&gt;Today we are starting a journey to build a Zombie Factory on the Ethereum blockchain.. Before we write our first line we need to see the big picture.&lt;/p&gt;

&lt;p&gt;🗺️ The Master Plan: What is our end goal?&lt;/p&gt;

&lt;p&gt;Imagine a tech cyberpunk factory glowing with neon-green energy. This is an automated assembly line that creates digital monsters.&lt;/p&gt;

&lt;p&gt;By the end of this series our Zombie Factory will work like this:&lt;/p&gt;

&lt;p&gt;The input: a player types a name like "Niraj".&lt;/p&gt;

&lt;p&gt;The DNA Mixer: a machine crushes that name. Spits out a random 16-digit DNA code.&lt;/p&gt;

&lt;p&gt;The Assembly Line: robotic arms scan the DNA saying things like " two digits give it laser eyes next two digits, red skin".&lt;/p&gt;

&lt;p&gt;The Vault: the finished Zombie is dropped into a blockchain-locked vault.&lt;/p&gt;

&lt;p&gt;The Alarm: a rings out to the world saying "a new Zombie has spawned".&lt;/p&gt;

&lt;p&gt;Every empire starts with a single base. Let’s claim our land.&lt;/p&gt;

&lt;p&gt;🎮 Level 1: The Drop&lt;/p&gt;

&lt;p&gt;Picture an empty dark grid floating in a digital void. This is the Ethereum blockchain waiting for your command.&lt;/p&gt;

&lt;p&gt;Here is the exact code we are using to drop our "Main Base" onto the map:&lt;/p&gt;

&lt;p&gt;Solidity&lt;/p&gt;

&lt;p&gt;// SPDX-License-Identifier: MIT&lt;/p&gt;

&lt;p&gt;pragma solidity &amp;gt;=0.5.0 &amp;lt;0.6.0;&lt;/p&gt;

&lt;p&gt;contract ZombieFactory {&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;It looks like four lines.. Let’s put on our gaming Heads-Up Display and see what is actually happening.&lt;/p&gt;

&lt;p&gt;📜 Line 1: The Diplomatic Flag (The License)&lt;/p&gt;

&lt;p&gt;Solidity&lt;/p&gt;

&lt;p&gt;// SPDX-License-Identifier: MIT&lt;/p&gt;

&lt;p&gt;If you imagine this a flying drone drops a glowing scroll onto the center of our grid. It projects a MIT" sign.&lt;/p&gt;

&lt;p&gt;The way it works is that this is your permit. You are telling the network "my blueprints are source anyone can read my code for free". You must declare this before you are allowed to build.&lt;/p&gt;

&lt;p&gt;⚙ Line 2: Locking the Physics Engine (The Pragma)&lt;/p&gt;

&lt;p&gt;Solidity&lt;/p&gt;

&lt;p&gt;pragma solidity &amp;gt;=0.5.0 &amp;lt;0.6.0;&lt;/p&gt;

&lt;p&gt;If you picture this a massive mechanical gear slams into the ground and locks the server settings to version 0.5.0.&lt;/p&gt;

&lt;p&gt;The way it works is that pragma tells the computer which tools to use. You are saying, "only use this version to build my factory if you use old or experimental tools my base will collapse".&lt;/p&gt;

&lt;p&gt;🏭 Line 3: Dropping the Citadel (The Contract)&lt;/p&gt;

&lt;p&gt;Solidity&lt;/p&gt;

&lt;p&gt;contract ZombieFactory {&lt;/p&gt;

&lt;p&gt;If you imagine this a massive stone fortress drops from orbit. Crashes onto the grid. The screen shakes a neon sign flickers on: Zombie Factory.&lt;/p&gt;

&lt;p&gt;The way it works is that in Solidity a contract is your Town Hall. It is the container, every piece of data and every machine we build later will be stored safely inside this building.&lt;/p&gt;

&lt;p&gt;🛡️ Line 4: Activating the Kinetic Shield (The Scope)&lt;/p&gt;

&lt;p&gt;Solidity&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;If you picture this as you type the bracket four pillars shoot up and create a pulsing green energy dome over your fortress.&lt;/p&gt;

&lt;p&gt;The way it works is that this is your scope, anything inside the { and }'s safe inside your Zombie Factory walls. This is where your rules work outside the walls is the public blockchain.&lt;/p&gt;

&lt;p&gt;🏆 Level 1 Cleared&lt;/p&gt;

&lt;p&gt;Congratulations you just deployed your Smart Contract, the Zombie Factory.&lt;/p&gt;

&lt;p&gt;If you visualized it right you did not type words you dropped a flag locked the physics crashed a fortress onto the map and activated a shield.&lt;/p&gt;

&lt;p&gt;Now our Zombie Factory is safe but it is empty. In Level 2 we are going to walk and start mounting the Zombie Factory rules onto the walls.&lt;/p&gt;

&lt;p&gt;Are you ready to level up? Drop a comment if your fortress is live.&lt;/p&gt;

&lt;p&gt;📜 Credits &amp;amp; Inspiration&lt;/p&gt;

&lt;p&gt;This series is inspired by the interactive lessons at CryptoZombies.io. They are the best at gamifying the blockchain. I am documenting my journey as I learn from them.&lt;/p&gt;

&lt;p&gt;⚠️ Disclaimer&lt;/p&gt;

&lt;p&gt;This blog is, for entertainment purposes only. I am a learner documenting my journey this is not professional advice. Always test your code before deploying it to a network the Ethereum blockchain.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
