<?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: Nikunj Ranjan</title>
    <description>The latest articles on DEV Community by Nikunj Ranjan (@nikunj_ranjan_945602853ca).</description>
    <link>https://dev.to/nikunj_ranjan_945602853ca</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%2F2485110%2Feb7ab14a-87d8-4e7e-8c53-75d6b3846713.jpg</url>
      <title>DEV Community: Nikunj Ranjan</title>
      <link>https://dev.to/nikunj_ranjan_945602853ca</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikunj_ranjan_945602853ca"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Nikunj Ranjan</dc:creator>
      <pubDate>Sat, 22 Feb 2025 10:13:09 +0000</pubDate>
      <link>https://dev.to/nikunj_ranjan_945602853ca/-c7d</link>
      <guid>https://dev.to/nikunj_ranjan_945602853ca/-c7d</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/nikunj_ranjan_945602853ca" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F2485110%2Feb7ab14a-87d8-4e7e-8c53-75d6b3846713.jpg" alt="nikunj_ranjan_945602853ca"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/nikunj_ranjan_945602853ca/building-a-temple-run-style-game-in-unity-my-journey-so-far-3ioe" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Building a Temple Run-Style Game in Unity: My Journey So Far&lt;/h2&gt;
      &lt;h3&gt;Nikunj Ranjan ・ Feb 22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#unity3d&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#gamedev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Temple Run-Style Game in Unity: My Journey So Far</title>
      <dc:creator>Nikunj Ranjan</dc:creator>
      <pubDate>Sat, 22 Feb 2025 10:11:14 +0000</pubDate>
      <link>https://dev.to/nikunj_ranjan_945602853ca/building-a-temple-run-style-game-in-unity-my-journey-so-far-3ioe</link>
      <guid>https://dev.to/nikunj_ranjan_945602853ca/building-a-temple-run-style-game-in-unity-my-journey-so-far-3ioe</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Ever since I got into game development, I’ve been fascinated by endless runner games like Temple Run and Subway Surfers. Their fast-paced gameplay, simple yet challenging mechanics, and addictive design made me want to create something similar myself.&lt;/p&gt;

&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%2Fdy3vt5u6xg0fkjoen7un.png" 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%2Fdy3vt5u6xg0fkjoen7un.png" alt="Image description" width="486" height="483"&gt;&lt;/a&gt;&lt;br&gt;
So, I decided to build my own Temple Run-style game in Unity! 🚀&lt;/p&gt;

&lt;p&gt;This is my first time working on an endless runner project, and while it’s still a work in progress, I’ve learned a lot about player movement, obstacle generation, and gameplay mechanics. In this post, I’ll share my journey so far—what I’ve built, the challenges I’ve faced, and what’s next!&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting Up the Project
&lt;/h2&gt;

&lt;p&gt;To start, I set up a basic Unity project and created the foundation for an endless runner. Here’s how I approached it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Player Movement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first thing I implemented was the player’s movement system. Since the game is an auto-runner, I needed the character to:&lt;br&gt;
✅ Move forward automatically&lt;br&gt;
✅ Allow left and right dodging&lt;br&gt;
✅ Jump over obstacles&lt;/p&gt;

&lt;p&gt;I used Unity’s CharacterController to handle movement smoothly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void Update() {
    Vector3 move = transform.forward * speed * Time.deltaTime;
    controller.Move(move);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also added swipe inputs for mobile and keyboard inputs for PC to make the movement intuitive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Generating the Endless Track&lt;/strong&gt;&lt;br&gt;
An endless runner needs an infinite track, so I created a tile-spawning system where:&lt;br&gt;
✅ New road sections generate ahead of the player&lt;br&gt;
✅ Old sections get destroyed to save memory&lt;/p&gt;

&lt;p&gt;Each track tile is a prefab, and I use a simple object pooling technique to reuse them instead of constantly instantiating new ones.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void SpawnTile() {
    GameObject newTile = Instantiate(tilePrefab, nextSpawnPosition, Quaternion.identity);
    nextSpawnPosition += new Vector3(0, 0, tileLength);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding Challenges: Obstacles &amp;amp; Hazards
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Spawning Obstacles&lt;/strong&gt;&lt;br&gt;
To keep the game engaging, I added obstacles like falling rocks, barriers, and pits. These spawn at random intervals, forcing the player to react quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Implementing a Missile System (🚀 WIP)&lt;/strong&gt;&lt;br&gt;
One of the coolest features I’m working on is a missile system that attacks the player every 30 seconds. Here’s how it will work:&lt;br&gt;
✅ A warning symbol appears on the ground before impact&lt;br&gt;
✅ A missile spawns and follows a 45-degree trajectory&lt;br&gt;
✅ The player must dodge before impact&lt;/p&gt;

&lt;p&gt;This system is still under development, but I’m excited to see how it improves the gameplay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges &amp;amp; What I Learned
&lt;/h2&gt;

&lt;p&gt;While developing this game, I faced a few challenges:&lt;br&gt;
🚧 Ensuring smooth terrain transitions – Fixed this using object pooling&lt;br&gt;
🚧 Making movement feel responsive – Tuned the input sensitivity&lt;br&gt;
🚧 Balancing difficulty – Adjusted obstacle spawn rates dynamically&lt;/p&gt;

&lt;p&gt;One big takeaway is that playtesting is key. Small tweaks in movement speed or obstacle placement make a huge difference in game feel!&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;This game is still a work in progress, and I have a lot more to add! Here’s what’s next on my list:&lt;br&gt;
✅ Complete the missile system&lt;br&gt;
✅ Enhance visuals &amp;amp; add effects&lt;br&gt;
✅ Improve UI &amp;amp; score system&lt;br&gt;
✅ Add power-ups (speed boosts, shields, etc.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Building a Temple Run-style game has been an amazing learning experience. Even though it’s not complete yet, I’ve learned so much about endless runner mechanics, object pooling, and gameplay balancing.&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts! Have you ever built an endless runner? Got any tips or feedback? Drop a comment below! 😊&lt;/p&gt;

&lt;p&gt;🚀 Follow my journey for more game dev updates!&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
